search for: invalidcount

Displaying 2 results from an estimated 2 matches for "invalidcount".

2004 Aug 27
2
Using regular expression in dialplan
...nu choice. Only 1, 2 and 3 are allowed menu choices. If DTMFSeq contains 1 or 2 or 3 => OK, Goto 4 else Goto 2 I've tried the follwoing syntax but it is alway going to 2 whatever the value of DTMFSeq: exten => s,1,GotoIf($[${DTMFSeq} : 123]?4:2) exten => s,2,SetVar(InvalidCount=$[${InvalidCount} + 1]) .... exten => s,4,SetVar(Result=ok) The only way I managed to make it work is the following : exten => s,1,GotoIf($[${DTMFSeq} : 1|2|3]?s|4:s|2) But I'm not totaly satisfied with it as I'm going to check more complex regex later ... Thank you for your help
2004 Aug 27
0
regex and gotoif question
...s a menu choice. Only 1, 2 and 3 are allowed menu choices. If DTMFSeq contains 1 or 2 or 3 => OK, Goto 4 else Goto 2 I've tried the follwoing syntax but it is alway going to 2 whatever the value of DTMFSeq: exten => s,1,GotoIf($[${DTMFSeq} : 123]?4:2) exten => s,2,SetVar(InvalidCount=$[${InvalidCount} + 1]) ...... exten => s,4,SetVar(Result=ok) The only way I managed to make it work is the following : exten => s,1,GotoIf($[${DTMFSeq} : 1|2|3]?s|4:s|2) But I'm not totaly satisfied with it as I'm going to check more complex regex later (like ^[0-9]{3}$, whcih mat...