<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>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.<br><br>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:<br>s,202,GotoIf($[ = 1 ]?4)<br><br>and that generates the error.<br><br>--JW<br><br>----- Original Message ----<br>From: Shaun <mailinglists@unix-scripts.com><br>To: asterisk-users@lists.digium.com<br>Sent: Friday, April 7, 2006 1:38:00 AM<br>Subject: [Asterisk-Users] Re: gotoif<br><br><div>Also forgot to say that the error is triggered by the gotoif (reason the <br>subject is labeled that) and not
read...<br><br>-- <br><br>~Shaun<br><br><br>"Shaun" <mailinglists@unix-scripts.com> wrote in message <br>news:e15897$p2t$1@sea.gmane.org...<br>> Here is a section of my dialplan (macro)<br>><br>> exten => s,200,Wait(1)<br>> exten => s,201,read(holdopt|screen-onhold|1)<br>> exten => s,202,GotoIf($[${holdopt} = 1 ]?4)<br>> exten => s,203,GoTo(200)<br>><br>><br>> it's simple really it loops telling you the caller is on hold until you <br>> press 1 and then it sends you off to another area. The problem right now <br>> is that if the read() times out i get these warnings...<br>><br>><br>> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:183 ast_yyerror: <br>> ast_yyerror(): syntax error: syntax error, unexpected TOK_EQ, expecting <br>> TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:<br>> = 1<br>> ^<br>> Apr 7 01:32:13 WARNING[24248]: ast_expr2.fl:187 ast_yyerror: If you have
<br>> questions, please refer to doc/README.variables in the asterisk source.<br>><br>><br>> The dial plan works and all, it's just i want those warnings to go away!<br>><br>><br>> -- <br>><br>> ~Shaun<br>><br>><br>> _______________________________________________<br>> --Bandwidth and Colocation provided by Easynews.com --<br>><br>> Asterisk-Users mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> <a target="_blank" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> <br><br><br><br>_______________________________________________<br>--Bandwidth and Colocation provided by Easynews.com --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a target="_blank"
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></div></div></div></div></body></html>