Lief, The MATH function was set to int from the beginning as that is an option with the function. However, I should say that I was naive and your suspension turned out to be true. I have removed the comma and BOOM it all works. Now I see why GotoIf was behaving so.
Thanks for all the input everyone. Regards, Bruce > Date: Fri, 7 Mar 2008 15:23:43 -0500 > From: [EMAIL PROTECTED] > To: [email protected] > Subject: Re: [on-asterisk] Dialplan problem > > On Thu, Mar 6, 2008 at 10:56 PM, Bruce Nik <[EMAIL PROTECTED]> wrote: > > The first statement seems to work and jumps to the right context. The > > second statement yields 0 and always jumps to "true" (which is odd). Can > > anyone please tell me whats wrong here? > > > > Version 1: exten => s,n,GotoIf,($[20 < > > 10]?true:false) > > > > Version 2: exten => s,n,GotoIf,($[${variableA} < > > 10]?true:false) > > > > Version two is run under a MATH condition where variableA is returned as > > an integer bigger than 10. I can see the output to be 0 (being false) and > > yet the jump is gone to "true" context. > > > OK... I'll give this a shot I guess... :) > > First, I'm going to ignore the extra commas you have after the GotoIf > as I'm hoping that is just a cut/paste typo (if not, then please > verify that :)) > > Second, the console output is going to be very handy here in order to > debug the problem. I think Jim is right this is going to be some > little nuance issue with the parsing, so we'll need to see the > relevant dialplan and the output you're generating from that dialplan. > > For debugging purposes, please use a Verbose(1,VARIABLE: > "${VARIABLE}") at each line before you use the variable, and > separately, include the same expression on either a separate Verbose() > line, or in the same line, but separate from the output of the > variables. > > I have a sneaking suspicion it might even have something to do with > the use of the MATH() function since it'll return a float (not just an > integer), and that could be screwing it up too. > > Sorry I can't give you an answer (yet?), but more information is required. > > Thanks! > > -- > Leif Madsen. > http://www.leifmadsen.com > http://www.oreilly.com/catalog/asterisk > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________
