[Freeswitch-users] playandgetdigits regex to get '#'

Michael Collins msc at freeswitch.org
Tue Aug 17 10:41:58 PDT 2010


On Tue, Aug 17, 2010 at 9:19 AM, Nigel Kent <ktngl at yahoo.co.uk> wrote:

> I see, how clumsy of me.
>
> I have been focusing too much on capturing two #'s. Still is this not
> possible some way.
>
> I want the two ##'s because it is already the common usage in what I want
> to do so would prefer to keep the same
>
Well, you can capture everything with a regex of ".*" and then just rely on
the timeout. It's the only way to do it without a lot of hassle. If you're
into hassle then you have other options:

Capture digits one at a time and do fun/crazy logic to see if you have what
you need
Hack playandgetdigits to allow ## to be a terminator.

I'd start with eliminating the terminator characters first and testing it
out. You can shorten your timeout value so the user isn't waiting too long
after dialing ##. Give it a test drive and see if it will work.

-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100817/a6e912f4/attachment-0001.html 


More information about the FreeSWITCH-users mailing list