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 ^ [Oct 4 21:53:35] WARNING[11356]: ast_expr2.fl:472 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables -- Executing [2124531143 at from-teliax-sip:3] GosubIf("DAHDI/1-1", "?other,1(2124531143):") in new stack I've tried with and without spaces the = sign. Same Result. I've counted my parens and braces. Any help really appreciated! sean
At 07:02 PM 10/4/2012, you wrote:>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: > = 2024324321Try :>same=n,GoSubIf($["${CALLERID(num)}" = "2024324321"]?other,1(${thisexten}):)The quotes make sure it doesn't fail on an empty callerid. Ira
Satish Barot
2012-Oct-05 12:14 UTC
[asterisk-users] 10.9.0-rc1 : Help with GoSubIf Parsing
On Fri, Oct 5, 2012 at 7:32 AM, sean darcy <seandarcy2 at gmail.com> 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 > ^ > [Oct 4 21:53:35] WARNING[11356]: ast_expr2.fl:472 ast_yyerror: If you > have questions, please refer to https://wiki.asterisk.org/** > wiki/display/AST/Channel+**Variables<https://wiki.asterisk.org/wiki/display/AST/Channel+Variables> > -- Executing [2124531143 at from-teliax-sip:3] GosubIf("DAHDI/1-1", > "?other,1(2124531143):") in new stack > > I've tried with and without spaces the = sign. Same Result. I've counted > my parens and braces. > > Any help really appreciated! > > sean >Replace your line with this and see.. same=n,GoSubIf($[${CALLERID(**num)} = 2024324321]?other,${**thisexten}:) --Satish Barot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20121005/cb09976f/attachment.htm>