<div dir="ltr">You the man! thanks!! I had never heard (read) or that &quot;inline&quot;...<div><br></div><div>David</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 29, 2013 at 6:28 PM, Kevin Wormington <span dir="ltr">&lt;<a href="mailto:kworm@sofnet.com" target="_blank">kworm@sofnet.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I believe you would need to add inline=&quot;true&quot; to your action setting the<br>
variable...see <a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions" target="_blank">http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a><br>
<br>
Kevin<br>
<div class="im"><br>
On 08/29/2013 10:10 AM, David Villasmil wrote:<br>
&gt; Hello guys,<br>
&gt;<br>
&gt; I&#39;ve got this in my dialplan:<br>
&gt;<br>
&gt; &lt;action application=&quot;set&quot; data=&quot;rand_val=${expr<br>
&gt; randomize(&amp;x);ceil(random(0,100,&amp;x))}&quot;/&gt;<br>
&gt; &lt;action application=&quot;log&quot; data=&quot;INFO Random dialplan ${expr<br>
&gt; randomize(&amp;x);ceil(random(0,100,&amp;x))}&quot;/&gt;<br>
&gt; &lt;action application=&quot;log&quot; data=&quot;INFO Random value is ${rand_val}&quot;/&gt;<br>
&gt;<br>
&gt; and this is what i see in my cli:<br>
&gt;<br>
</div>&gt; Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; Regex<br>
<div class="im">&gt; (PASS) [respond] destination_number(1234) =~ /^.*/ break=on-false<br>
</div>&gt; Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; Action<br>
<div class="im">&gt; set(rand_val=${expr randomize(&amp;x);ceil(random(0,100,&amp;x))})<br>
</div>&gt; Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; Action<br>
<div class="im">&gt; log(INFO Random dialplan ${expr randomize(&amp;x);ceil(random(0,100,&amp;x))})<br>
</div>&gt; Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; Action<br>
<div class="im">&gt; log(INFO Random value is ${rand_val})<br>
&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:167<br>
</div>&gt; (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt;) State Change<br>
<div class="im">&gt; CS_ROUTING -&gt; CS_EXECUTE<br>
&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_session.c:1341 Send<br>
</div>&gt; signal sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; [BREAK]<br>
<div class="im">&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:471<br>
</div>&gt; (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt;) State ROUTING<br>
<div class="im">&gt; going to sleep<br>
&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:416<br>
</div>&gt; (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt;) Running State<br>
<div class="im">&gt; Change CS_EXECUTE<br>
&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:478<br>
</div>&gt; (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt;) State EXECUTE<br>
<div class="im">&gt; 2013-08-29 16:40:48.834592 [DEBUG] mod_sofia.c:230<br>
</div>&gt; sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; SOFIA EXECUTE<br>
<div class="im">&gt; 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:209<br>
</div>&gt; sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; Standard EXECUTE<br>
&gt; EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>&gt; log(INFO ASR<br>
<div class="im">&gt; 40 we got )<br>
&gt; 2013-08-29 16:40:48.854572 [INFO] mod_dptools.c:1567 ASR 40 we got<br>
&gt;<br>
&gt;<br>
&gt; Why is the &quot;${rand_val}&quot; not being parsed?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; David<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>
&gt; <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
&gt;<br>
&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
&gt;<br>
&gt; Official FreeSWITCH Sites<br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
&gt;<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<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>