[asterisk-users] 10.9.0-rc1 : Help with GoSubIf Parsing

Richard Kenner kenner at gnat.com
Fri Oct 5 07:28:18 CDT 2012


>      I'm getting a parsing error with the folllowing:
> 
>      same=n,GoSubIf($[${CALLERID(num)} = 2024324321]?other,1($
>      {thisexten}):)
> 
>      WARNING[11356]: ast_expr2.fl:468 ast_yyerror: ast_yyerror():  syntax
>      error: syntax error, unexpected '=', expecting $end; Input:
>       = 2024324321
> 
>      I've tried with and without spaces the = sign. Same  Result. I've
>      counted my parens and braces.

If there *is* a caller-ID, it should work without spaces.  But not if
there isn't.  The proper test is:

      $[x${CALLERID(num)}=x2024324321]

And this only works if you're *sure* that it'll be just numbers or blank.
Otherwise, use quotes on both sides.



More information about the asterisk-users mailing list