[asterisk-users] Gotoif changed in 1.8?
Bob Beers
bob.beers at gmail.com
Wed Nov 3 15:25:05 CDT 2010
On Wed, Nov 3, 2010 at 4:05 PM, Danny Nicholas <danny at debsinc.com> wrote:
> Hi Gang,
>
> I’m testing 1.8.0 on one of my machines and this snippet
> “chokes” on line 7 (works fine with 1.4.30)
>
> [tb-account-balance]
>
> exten => s,1,Set(BALCOUNT=0)
>
> exten => s,n,NoOp(Verbose(acct ${digitacc} pwd ${digitpwd} ))
>
> exten => s,n(runagi),Set(TEST_RETURN="NONE")
>
> exten =>
> s,n,AGI(acctbal.agi,${ABA},${digitacc},${digittype},${digitport},${CHANNEL(language)},${outtype})
>
> exten => s,n,NoOp(Verbose(bal AGI RETURNED ${TEST_RETURN} ))
>
> exten => s,n,Set(BALCOUNT=$[${BALCOUNT} + 1])
>
> exten => s,n,Gotoif($[${BALCOUNT} > 3]?tb-account-balance,s,reset_bc)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "OK"]?tb-account-balance,s,ok)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "NONE"]?tbstart,s,play-main)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "INVACCT"]?tbstart,s,readacct)
>
> exten => s,n(invacct),Playback(${invacct})
>
> exten => s,n,Goto(tb-account-balance,s,runagi)
>
> exten => s,n(ok),Set(BALCOUNT=0)
>
>
>
> -- Executing [s at tb-account-balance:7] GotoIf("SIP/134-00000000",
> "0?tb-account-balance,s,reset_bc") in new stack
>
> [Nov 3 14:23:02] WARNING[20937]: ast_expr2.fl:468 ast_yyerror:
> ast_yyerror(): syntax error: syntax error, unexpected '<token>', expecting
> $end; Input:
>
> ""NONE"" = "OK"
>
> ^
>
Too many double-quotes?
Try changing line 3 to:
exten => s,n(runagi),Set(TEST_RETURN=NONE)
--
HTH,
-Bob Beers
More information about the asterisk-users
mailing list