[asterisk-users] Gotoif changed in 1.8?

Danny Nicholas danny at debsinc.com
Wed Nov 3 15:32:06 CDT 2010


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Bob Beers
Sent: Wednesday, November 03, 2010 3:25 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Gotoif changed in 1.8?

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(l
anguage)},${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

TAM, Bob! Guess I've got to go through now and "unquote" my literals...




More information about the asterisk-users mailing list