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

sean darcy seandarcy2 at gmail.com
Fri Oct 5 15:23:52 CDT 2012


So here's what I used:
$['x${CALLERID(num)}'='x2024324321']

And that worked!
On 10/05/2012 08:28 AM, Richard Kenner wrote:
>>       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.
>

So here's what I used:
$['x${CALLERID(num)}'='x2024324321']

and that worked.

Thanks for the help!

sean




More information about the asterisk-users mailing list