[Freeswitch-users] Setting variables with logic

Avi Marcus avi at avimarcus.net
Tue Oct 2 14:11:38 MSD 2012


http://wiki.freeswitch.org/wiki/Mod_commands#cond /
http://wiki.freeswitch.org/wiki/Function_cond

I don't see any examples, so if you could edit the wiki...

Something like:

<action application="set" data="voicemail_authorized=${cond(${
sip_authorized} && ${cond(${sip_acl_authed_by} != 'domains')}}"/>

Do note that this is completely untested though...
A few lines lua script might be more maintainable.

-Avi Marcus
BestFone


On Tue, Oct 2, 2012 at 11:05 AM, Alex <alex at thewinelake.com> wrote:

> Apologies for the trivial nature of this question, but can I "SET" a
> channel variable to the result of some boolean logic?
>
> Eg. something like
>
> <action application="set" data="voicemail_authorized=${sip_authorized)
> &&( ${sip_acl_authed_by} != domains)"/>
>
>
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121002/46379d82/attachment-0001.html 


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