[asterisk-users] dialplan syntax error: need new eyes

Barry Miller asterisk-users at notanet.net
Sat May 24 01:59:11 CDT 2008


On Sat, May 24, 2008 at 12:01:50AM -0400, sean darcy wrote:
> Barry Miller wrote:
> > On Fri, May 23, 2008 at 05:08:28PM -0400, sean darcy wrote:
> >> This doesn't work:
> >>
> >> exten =>_1NXXNXXXXXX,n,Set( CALLERID(num) = ${IF ( $[${CALLERID(num)} > 
> >> 140] ? ${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})
> > 
> > Change "IF (" to "IF(".
> 
> Same result.

Sorry.  This time I actually tested it.  *After* de-spacing the " = ",

exten => test,n,Set(CALLERID(num)=${IF( $[${CALLERID(num)} > 140] ? ${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})
exten => test,n,NoOp(${CALLERID(num)})

behaved properly.  At least with 1.4.19.1.  FWIW, every time I try to use
whitespace to make a dialplan more readable, it jumps up and bites me.

Again, sorry for jumping in with an untested response.



More information about the asterisk-users mailing list