[Asterisk-Users] Re: Gogoif with variables acting funny?
Ed Pringle
epringle at consolidated.ab.ca
Mon Jul 12 15:44:05 MST 2004
$[expr1 operator expr2]
Spaces (and lack of spaces) are important. There is no space between the opening [ and expr1, or between expr2 and the closing ]. But you do need spaces separating expr1 from operator, and separating operator from expr2.
-----Original Message-----
From: Steve Woolley [mailto:swoolley at adstelecom.com]
Sent: Monday, July 12, 2004 12:33 PM
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Re: Gogoif with variables acting funny?
It is possible and probably most likely that it is being interpreted as
a string. The real question is though, why?
I believe it is syntactically correct.
> Date: Mon, 12 Jul 2004 09:26:02 -0700 (PDT)
> From: Shaun Dawson <bigchiefscd at yahoo.com>
> Subject: Re: [Asterisk-Users] Gogoif with variables acting funny?
> To: asterisk-users at lists.digium.com
> Reply-To: asterisk-users at lists.digium.com
>
>
> <snip>
>
> > -- Executing SetVar("Zap/99-1", "counter=[0+1]")
> > in new stack
> > -- Executing GotoIf("Zap/99-1",
> > "[[0+1]<3]?s|7:h|1") in new stack
> > -- Goto (inbound-analog,h,1)
>
> <snip>
>
> >
> > It looks to me as if the Gotoif thinks that [0+1] is
> > greater than or
> > equal to 3 and therefore jumps to hangup.
> >
> > Am I missing something here?
> >
>
> I apologize in advance for the stupid question, but
> is it at all possible that counter is being evaluated
> in a string context either in the additionor the
> GoToIf command? (One quick way to check that is to
> see what happens if you put a second addition in right
> after the first, and see if you get '2', or
> '[[0+1]+1]').
>
>
> Shaun
--
Steve Woolley
IT Manager
ADS Telecom, Inc.
59 Skyline Drive
Suite 1250
Lake Mary, Florida 32746
Phone: (407)682-6226 x1110
Fax: (407)682-3455
Cell: (321)229-5311
swoolley at adstelecom.com
www.adstelecom.com
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list