[Freeswitch-users] Syntax of cndition to compare two variable values?

Michael Collins msc at freeswitch.org
Tue Oct 9 21:46:36 MSD 2012


Good point - I forget that we could put vars into the expression.
+1 4 U
-MC

On Tue, Oct 9, 2012 at 10:04 AM, Avi Marcus <avi at avimarcus.net> wrote:

> Another way without using the COND api would be like so:
>
> <condition field="${var1}" expression="^${var2}$"> (the ^$ are necessary
> to mean "exact" rather than "contains")
>
> -Avi
>
>
>
> On Tue, Oct 9, 2012 at 6:39 PM, Michael Collins <msc at freeswitch.org>wrote:
>
>> Assuming that your variables are set at the time you perform the
>> condition (hint: see inline="true" for the set command) then you can try
>> something like this:
>>
>> <condition field="${cond(${var1} == ${var2})}" expression="^true$">
>>
>> Standard disclaimer<http://wiki.freeswitch.org/wiki/Reporting_Bugs#Standard_Disclaimer>applies...
>> -MC
>>
>> On Tue, Oct 9, 2012 at 8:52 AM, Yehavi Bourvine <
>> yehavi.bourvine at gmail.com> wrote:
>>
>>> Hello,
>>>
>>>   Suppose I have to variables which I set some values to them at the
>>> dialplan. What is the condition statement syntax to test whether their
>>> values equal?
>>>
>>>                         Thanks, __Yehavi:
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> 
>>> 
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> 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
>>>
>>>
>>
>>
>> --
>> Michael S Collins
>> Twitter: @mercutioviz
>> http://www.FreeSWITCH.org
>> http://www.ClueCon.com
>> http://www.OSTAG.org
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> 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
>>
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121009/88c54fb2/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list