hello alex,<div><br><div>you must set testvarA and testvarB as inline</div><div><br></div><div>check this 
<a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions">http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a></div><div><br></div><div>huseyin</div><div><br></div><div><br><br><div class="gmail_quote">

On Wed, Jun 13, 2012 at 1:14 PM, Alex Lake <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">

<div class="im">I&#39;ve been struggling a bit with conditions. In particular the &quot;break&quot;<br>
attribute, which I couldn&#39;t really find any documentation on.<br>
<br>
</div>&lt;action application=&quot;set&quot; data=&quot;testvarA=hello/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;testvarB=hello/&gt;<br>
&lt;condition field=&quot;${testvarA}&quot; expression=&quot;^$&quot; /&gt;<br>
&lt;condition field=&quot;${testvarB}&quot; expression=&quot;^$&quot; &gt;<br>
    &lt;action application=&quot;log&quot; data=&quot;WARNING TestVarsA and B are both<br>
empty&quot;/&gt;<br>
    &lt;anti-action application=&quot;log&quot; data=&quot;WARNING TestVarsA and B are NOT<br>
both empty&quot;/&gt;<br>
&lt;/condition&gt;<br>
<br>
The above gives &quot;TestVarsA and B are both empty&quot; which I don&#39;t understand!<br>
<div class="HOEnZb"><div class="h5"><br>
I think it would be nice to put some examples in the wiki that translate<br>
from the usual way of doing things (perhaps using PHP or JavaScript<br>
notation) to the dialplan format.<br>
<br>
For example, I have a requirement that might be expressed like this:<br>
<br>
&lt;context name=&quot;dp0095&quot;&gt;<br>
&lt;extension name=&quot;Outbound_call&quot;&gt;<br>
     if (${default_ani_prefix} == &quot;&quot; and sip_auth_username == &quot;&quot;) {<br>
&lt;action application=&quot;log&quot; data=&quot;WARNING default_ani_prefix and<br>
sip_auth_username are not set (A)&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;default_ani_prefix=${tenant_id}${b_ext}1&quot;/&gt;<br>
     }<br>
     if (${default_ani_prefix} == &quot;&quot;) {<br>
&lt;action application=&quot;log&quot; data=&quot;WARNING default_ani_prefix is not set (B)&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;ani_prefix=${sip_auth_username}0&quot;/&gt;<br>
     } else {<br>
&lt;action application=&quot;set&quot; data=&quot;ani_prefix=${default_ani_prefix}&quot;/&gt;<br>
     }<br>
     if ($destination_number == &quot;^(\d{8}.*)&quot;) {<br>
&lt;action application=&quot;bridge&quot;<br>
data=&quot;[tenant_id=${tenant_id},a_ext=${a_ext},b_ext=${b_ext},origination_callee_id_number=$1,origination_caller_id_number=${ani_prefix}${ani}]sofia/internal/8980000000002$<a href="mailto:1@193.105.54.10">1@193.105.54.10</a>&quot;/&gt;<br>


     }<br>
&lt;/extension&gt;<br>
&lt;/context&gt;<br>
<br>
What is the nefarious combination of conditions, breaks, actions and<br>
anti-actions required to implement this?<br>
<br>
I&#39;m happy to try and put a newbie-perspective updates into some part of<br>
the wiki. Talking of which, maybe it would be good to have more<br>
example-based content in the wiki, but put it in a separate section so<br>
that it doesn&#39;t clutter up the more reference-orientated bits.<br>
<br>
Alex<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>
Join Us At ClueCon - Aug 7-9, 2012<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>
</div></div></blockquote></div><br></div></div>