[Asterisk-Users] Re: Gogoif with variables acting funny?

Steve Woolley swoolley at adstelecom.com
Mon Jul 12 11:32:32 MST 2004


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 



More information about the asterisk-users mailing list