[Asterisk-Users] regexp in gotoif

Christian B bencokakao at gmail.com
Fri Apr 7 07:22:33 MST 2006


Hello!

this is a short one: in a gotoif-statement i would like to match a
variable to a number, where the number could have digits from 2-6.
asterisk only seems to be capable to match such a digit-range when used
in the extension, but not in a regexp, at least the following query
doesn't work:


exten => _X.,1,GotoIf($[${EXTEN} : 234[2-6]]?jump:)


obviously asterisk has a problem with this since it parses the brackets
differently, i've also tried to do it like:


exten => _X.,1,GotoIf($[${EXTEN} : 234\[2-6\]]?jump:)


but of course this didn't work(was a desperate try anyways).

is there a way to match a range like it is possible with unix regexps
(a-zA-Z1-9)?

thanks for your replies!

christian



More information about the asterisk-users mailing list