[Freeswitch-dev] Lua session:playAndGetDigits regex

Robert Clayton rjcajax at gmail.com
Thu Mar 26 21:05:24 PDT 2009


Ok I know it must be me but...

In the Lua regex portion of session:playAndGetDigits what regex would I use
to match either a numeric entry, or an asterisk. It seems when I attempt to
define an asterisk as a character rather than a metacharacter the regex
script is evaluated other than I would assume.
The error code presents \* as a single * and [*] other than a character,
leading to the hint that there is no preceding character to multiply.

I have at most 15 minutes of proficiency in regular expressions, but, are
not \* or [*] equivalent to an asterisk character, rather than a

Also it seems that the playAndGetDigits evaluates when either the maximum
number of characters is entered or the terminator is pressed. Is there any
way to evaluate the regex on each input and therefore dynamically return
after an acceptable entry? As in the previous example a numeric string and a
single asterisk are, usually, different lengths and if an asterisk was used
for, say, abort, entering an asterisk followed by a terminator would seem

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090327/4939f03f/attachment.html 

More information about the Freeswitch-dev mailing list