<div dir="ltr"><div>tsk tsk! you should be reading about that in chapters 5 and 8 of the FreeSWITCH book! ;) Also this page has some extra info you might appreciate:<br><br><a href="https://wiki.freeswitch.org/wiki/Dialplan_XML#Availability_of_Variables">https://wiki.freeswitch.org/wiki/Dialplan_XML#Availability_of_Variables</a><br>
<br></div>-MC<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 29, 2013 at 12:06 PM, David Villasmil <span dir="ltr">&lt;<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.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 dir="ltr">You the man! thanks!! I had never heard (read) or that &quot;inline&quot;...<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>David</div></font></span></div><div class="HOEnZb"><div class="h5"><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><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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; Regex<br>
<div>&gt; (PASS) [respond] destination_number(1234) =~ /^.*/ break=on-false<br>
</div>&gt; Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; Action<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; Action<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; Action<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt;) State Change<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; [BREAK]<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt;) State ROUTING<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt;) Running State<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt;) State EXECUTE<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; SOFIA EXECUTE<br>
<div>&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" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; Standard EXECUTE<br>
&gt; EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a> &lt;mailto:<a href="mailto:12345@1.2.3.4" target="_blank">12345@1.2.3.4</a>&gt; log(INFO ASR<br>
<div>&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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>
</div>