<div dir="ltr"><a href="http://wiki.freeswitch.org/wiki/Mod_commands#cond">http://wiki.freeswitch.org/wiki/Mod_commands#cond</a> / <a href="http://wiki.freeswitch.org/wiki/Function_cond">http://wiki.freeswitch.org/wiki/Function_cond</a><div>

<br></div><div>I don&#39;t see any examples, so if you could edit the wiki...</div><div><br></div><div>Something like: </div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">&lt;action application=&quot;set&quot; data=&quot;voicemail_authorized=</span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">${</span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">cond(</span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">${</span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">sip_authorized} </span><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">&amp;&amp; </span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">${cond(${sip_acl_authed_by} != &#39;domains&#39;)}</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">}</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">&quot;/&gt;</span></div>

<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">Do note that this is completely untested though...</span></div>

<div><span style="background-color:rgb(255,255,255)"><font face="arial, sans-serif">A few lines lua script might be more maintainable.</font></span></div><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small"><br>

</span></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi Marcus</span><br>BestFone</div>
<br><br><div class="gmail_quote">On Tue, Oct 2, 2012 at 11:05 AM, Alex <span dir="ltr">&lt;<a href="mailto:alex@thewinelake.com" target="_blank">alex@thewinelake.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Apologies for the trivial nature of this question, but can I &quot;SET&quot; a<br>
channel variable to the result of some boolean logic?<br>
<br>
Eg. something like<br>
<br>
&lt;action application=&quot;set&quot; data=&quot;voicemail_authorized=${sip_authorized)<br>
&amp;&amp;( ${sip_acl_authed_by} != domains)&quot;/&gt;<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div>