[Asterisk-Dev] dialplan eval problem?

Steve Murphy murf at e-tools.com
Tue Jun 7 22:21:49 MST 2005

Matthew Boehm <mboehm at cytelcom.com> wrote:

> exten => _9.,1,GotoIf($[${CALLERIDNUM} : 3091|3144]?cscid:ncid)

Here is an example of the "old" parser syntax differing from the new.

The "|" is an operator in the expr parser syntax, stands for "or". If you meant for 
it to be part of the search pattern, enclose the search pattern in double 

> exten => _9.,1,GotoIf($[${CALLERIDNUM} : "3091|3144"]?cscid:ncid)

The way you wrote it, of course the expression returns true:

${CALLERIDNUM} : 3091 

returns FALSE, in this case.

(or 0, to be exact)...


0 | 3144

returns 1, because the "OR" operator works that way.

Hope this helps.


More information about the asterisk-dev mailing list