[asterisk-users] syntax error, unexpected '<token>'

Gareth Blades list-asterisk at skycomuk.com
Thu Sep 9 05:42:37 CDT 2010


Jonas Kellens wrote:
> Hello list,
> 
> getting warning : *syntax error, unexpected '<token>'*
> 
> 
> dialplan :
> 
> exten => pbx,n,Macro(CheckNetworkProblems,${custID})
> exten => pbx,n,NoOp(status = ${STATUS})
> exten => pbx,n,GoToIf($["${STATUS}"="congestion"]?backup:nocongestion)
> 
> 
> CLI :
> 
> [Sep  9 12:27:07]     -- Executing [pbx at cust:15] 
> NoOp("SIP/test13-0000002a", "status = "congestion"") in new stack
> *[Sep  9 12:27:07] WARNING[5741]: ast_expr2.fl:445 ast_yyerror: 
> ast_yyerror():  syntax error: syntax error, unexpected '<token>', 
> expecting $end; Input:
> ""congestion""="congestion"
>   ^*
> [Sep  9 12:27:07] WARNING[5741]: ast_expr2.fl:449 ast_yyerror: If you 
> have questions, please refer to doc/tex/channelvariables.tex.
> [Sep  9 12:27:07]     -- Executing [pbx at cust:16] 
> GotoIf("SIP/test13-0000002a", """?backup:nocongestion") in new stack
> 
> 
> What is then the correct syntax ?!
> 
> 
> Jonas.
> 

Looks like your ${STATUS} variable contains quotes so you are effectivly 
double quoting it in the gotoif command.



More information about the asterisk-users mailing list