[Freeswitch-users] FreeSWITCH-users Digest, Vol 40, Issue 179

Michael Collins msc at freeswitch.org
Sat Oct 31 22:24:59 PDT 2009


How would you do an expression like: if $x < 24 in a condition tag? Just
curious. I would like to make sure that is properly documented.
-MC

On Sat, Oct 31, 2009 at 10:42 AM, Michael Jerris <mike at jerris.com> wrote:

> You actually can use these in conditions.  Just need to be careful that the
> var you are conditioning on is already set.
>
> Mike
>
> On Oct 22, 2009, at 1:54 PM, Michael Collins wrote:
>
>
>
> On Thu, Oct 22, 2009 at 5:51 AM, Rupa Schomaker <rupa at rupa.com> wrote:
>
>> cond would be helpful here?  I updated the wiki on this one just now
>> with a bit more detail.  It is a api call. so, you'd use it like:
>>
>> ${cond(eval ? trueval : falseval)}
>>
>> so to get a value of ERR if the var my myvar is > 15 you could:
>>
>> ${cond(${myvar} > 15 ? ERR : OK)}
>>
>> If both sides of the comparison operator are numeric then it does
>> numeric comparison otherwise it does lexical string comparison.
>>
>
> Rupa,
>
> Yes, you can do the set/cond API trick but you can only do it in the action
> or anti-action tags, not in the condition tags. I'm sure you know that but I
> want all those reading this thread to make the connection.
> -MC
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091031/0bd3a933/attachment-0002.html 


More information about the FreeSWITCH-users mailing list