[Asterisk-Users] Expressions

Andrew Thompson asteriskuser at aktzero.com
Thu Dec 18 08:12:13 MST 2003


> ----- Original Message -----
> From: "Tais M. Hansen" <tmh at comx.as>
> To: <asterisk-users at 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 1
while
> 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.






More information about the asterisk-users mailing list