-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm having a problem with the following expression examples. exten => s,1,NoOp($[$[${value} >= 10] & $[${value} < 18]]) exten => s,1,GotoIf($[$[${value} >= 10] & $[${value} < 18]]?3) ${value} is 13 in both examples above. First extension evaluates to 1 while second evaluates to 0 even though it's the same expression used in both examples. Am I doing something wrong? - -- Regards, Tais M. Hansen ComX Networks Tel: +45-70257474 Fax: +45-70257374 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/4ZjJ2TEAILET3McRAnUIAJwJJTKPDX1iLxcWxdjcqa+b9LvMNACfX5Yj Cs3L5GjGluSsuBqZhyGn7vs=VWAW -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 18 December 2003 13:08, Tais M. Hansen wrote:> I'm having a problem with the following expression examples. > exten => s,1,NoOp($[$[${value} >= 10] & $[${value} < 18]]) > exten => s,1,GotoIf($[$[${value} >= 10] & $[${value} < 18]]?3) > ${value} is 13 in both examples above. First extension evaluates to 1 while > second evaluates to 0 even though it's the same expression used in both > examples. Am I doing something wrong?Answer() apparently changes channels and thus clears variables set prior to the Answer() call. :( ... Setting variables in spooled calls becomes even more useless. - -- Regards, Tais M. Hansen ComX Networks Tel: +45-70257474 Fax: +45-70257374 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/4ZqT2TEAILET3McRAm99AKCOiJ2UMgUn3e5HoUzKsCnqUIo1swCdExvK uSfwYxsrN5N+UyGgFd18T2Q=uU4p -----END PGP SIGNATURE-----
> ----- Original Message ----- > From: "Tais M. Hansen" <tmh@comx.as> > To: <asterisk-users@lists.digium.com> > Sent: Thursday, December 18, 2003 7:08 AM > Subject: [Asterisk-Users] Expressions > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I'm having a problem with the following expression examples. > > exten => s,1,NoOp($[$[${value} >= 10] & $[${value} < 18]]) > > exten => s,1,GotoIf($[$[${value} >= 10] & $[${value} < 18]]?3) > > ${value} is 13 in both examples above. First extension evaluates to 1while> second evaluates to 0 even though it's the same expression used in both > examples. Am I doing something wrong?Your example sort of confuses me. How do you know what NoOp returns? Even though NoOp could theoretically take arguments, the point (IMHO) of NoOp is to do nothing. If it did return something, why wouldn't it always return the same thing? Also, doesn't the "?3" in thesecond expression change things? Or is that outside the scope of what you're asking? ----- Andrew Thompson http://aktzero.com/ Your eyes are weary from staring at the CRT. You feel sleepy. Notice how restful it is to watch the cursor blink. Close your eyes. The opinions stated above are yours. You cannot imagine why you ever felt otherwise.