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

Rupa Schomaker rupa at rupa.com
Thu Oct 22 05:51:04 PDT 2009


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.


On Wed, Oct 21, 2009 at 11:41 PM, Michael Collins <msc at freeswitch.org> wrote:
>
>
> On Wed, Oct 21, 2009 at 9:08 PM, Ahmed Munir <ahmedmunir007 at gmail.com>
> wrote:
>>
>> Hi,
>>
>> Thanks for reply, it really helped me. One more thing to ask, how can we
>> make decision against >,<, >=, <= in condition header? Like we use == for
>> action and != for anti-action.
>>
>> Kindly highlight it.
>>
>
> You can only do greater than and less than in the date/time matching. See
> the date/time example in the default.xml dialplan file.
>
> You can also use regular expressions if you're in a pinch. For example, if
> you need to match numbers >= 1100 and <= 1500 you could just use this regex:
>
> ^(1[1234]\d\d|1500)$
>
> The real question, though, is this: what types of values do you need to
> match for GT or LT? Date/time? Money? Other? That will determine if you need
> to use a script or just the dialplan.
> -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
>
>



-- 
-Rupa




More information about the FreeSWITCH-users mailing list