I had the same problem on a script, I suspect this is the first time you're using the "holdopt" variable? Try setting it to zero before the read.
It looks like if holdopt is "NULL" (the user doesn't input anything and you haven't got something in the variable to start with) asterisk interprets that line as:
s,202,GotoIf($[ = 1 ]?4)
and that generates the error.
--JW
----- Original Message ----
From: Shaun <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, April 7, 2006 1:38:00 AM
Subject: [Asterisk-Users] Re: gotoif
It looks like if holdopt is "NULL" (the user doesn't input anything and you haven't got something in the variable to start with) asterisk interprets that line as:
s,202,GotoIf($[ = 1 ]?4)
and that generates the error.
--JW
----- Original Message ----
From: Shaun <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, April 7, 2006 1:38:00 AM
Subject: [Asterisk-Users] Re: gotoif
Also forgot to say that the error is triggered by the gotoif (reason the
subject is labeled that) and not read...
--
~Shaun
"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here is a section of my dialplan (macro)
>
> exten => s,200,Wait(1)
> exten => s,201,read(holdopt|screen-onhold|1)
> exten => s,202,GotoIf($[${holdopt} = 1 ]?4)
> exten => s,203,GoTo(200)
>
>
> it's simple really it loops telling you the caller is on hold until you
> press 1 and then it sends you off to another area. The problem right now
> is that if the read() times out i get these warnings...
>
>
> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:183 ast_yyerror:
> ast_yyerror(): syntax error: syntax error, unexpected TOK_EQ, expecting
> TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
> = 1
> ^
> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:187 ast_yyerror: If you have
> questions, please refer to doc/README.variables in the asterisk source.
>
>
> The dial plan works and all, it's just i want those warnings to go away!
>
>
> --
>
> ~Shaun
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
subject is labeled that) and not read...
--
~Shaun
"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here is a section of my dialplan (macro)
>
> exten => s,200,Wait(1)
> exten => s,201,read(holdopt|screen-onhold|1)
> exten => s,202,GotoIf($[${holdopt} = 1 ]?4)
> exten => s,203,GoTo(200)
>
>
> it's simple really it loops telling you the caller is on hold until you
> press 1 and then it sends you off to another area. The problem right now
> is that if the read() times out i get these warnings...
>
>
> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:183 ast_yyerror:
> ast_yyerror(): syntax error: syntax error, unexpected TOK_EQ, expecting
> TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
> = 1
> ^
> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:187 ast_yyerror: If you have
> questions, please refer to doc/README.variables in the asterisk source.
>
>
> The dial plan works and all, it's just i want those warnings to go away!
>
>
> --
>
> ~Shaun
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
