<div dir="ltr">I do have the book :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 30, 2013 at 2:55 PM, Nathan Neulinger <span dir="ltr"><<a href="mailto:nneul@mst.edu" target="_blank">nneul@mst.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FYI, even the book isn't completely consistent - I know there was at least one place in it where it said something<br>
explicitly about not being able to use a set variable to make further dialplan decisions with no mention of inline.<br>
<br>
I can try and find it again if it's something you want to update for a future rev.<br>
<br>
-- Nathan<br>
<div class="im"><br>
On 08/29/2013 06:30 PM, Michael Collins wrote:<br>
> tsk tsk! you should be reading about that in chapters 5 and 8 of the FreeSWITCH book! ;) Also this page has some extra<br>
> info you might appreciate:<br>
><br>
> <a href="https://wiki.freeswitch.org/wiki/Dialplan_XML#Availability_of_Variables" target="_blank">https://wiki.freeswitch.org/wiki/Dialplan_XML#Availability_of_Variables</a><br>
><br>
> -MC<br>
><br>
><br>
> On Thu, Aug 29, 2013 at 12:06 PM, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>>> wrote:<br>
><br>
> You the man! thanks!! I had never heard (read) or that "inline"...<br>
><br>
> David<br>
><br>
><br>
</div><div class="im">> On Thu, Aug 29, 2013 at 6:28 PM, Kevin Wormington <<a href="mailto:kworm@sofnet.com">kworm@sofnet.com</a> <mailto:<a href="mailto:kworm@sofnet.com">kworm@sofnet.com</a>>> wrote:<br>
><br>
> I believe you would need to add inline="true" 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>
><br>
> On 08/29/2013 10:10 AM, David Villasmil wrote:<br>
> > Hello guys,<br>
> ><br>
> > I've got this in my dialplan:<br>
> ><br>
> > <action application="set" data="rand_val=${expr<br>
> > randomize(&x);ceil(random(0,100,&x))}"/><br>
> > <action application="log" data="INFO Random dialplan ${expr<br>
> > randomize(&x);ceil(random(0,100,&x))}"/><br>
> > <action application="log" data="INFO Random value is ${rand_val}"/><br>
> ><br>
> > and this is what i see in my cli:<br>
> ><br>
</div>> > Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>> Regex<br>
<div class="im">> > (PASS) [respond] destination_number(1234) =~ /^.*/ break=on-false<br>
</div>> > Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>><br>
<div class="im">> Action<br>
> > set(rand_val=${expr randomize(&x);ceil(random(0,100,&x))})<br>
</div>> > Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>><br>
<div class="im">> Action<br>
> > log(INFO Random dialplan ${expr randomize(&x);ceil(random(0,100,&x))})<br>
</div>> > Dialplan: sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>><br>
<div class="im">> Action<br>
> > log(INFO Random value is ${rand_val})<br>
> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:167<br>
</div>> > (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>>) State Change<br>
<div class="im">> > CS_ROUTING -> CS_EXECUTE<br>
> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_session.c:1341 Send<br>
</div>> > signal sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>> [BREAK]<br>
<div class="im">> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:471<br>
</div>> > (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>>) State ROUTING<br>
<div class="im">> > going to sleep<br>
> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:416<br>
</div>> > (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>>) Running State<br>
<div class="im">> > Change CS_EXECUTE<br>
> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:478<br>
</div>> > (sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>>) State EXECUTE<br>
<div class="im">> > 2013-08-29 16:40:48.834592 [DEBUG] mod_sofia.c:230<br>
</div>> > sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>> SOFIA EXECUTE<br>
<div class="im">> > 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:209<br>
</div>> > sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>> Standard<br>
> EXECUTE<br>
> > EXECUTE sofia/external/<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a> <mailto:<a href="mailto:12345@1.2.3.4">12345@1.2.3.4</a>>><br>
<div class="im">> log(INFO ASR<br>
> > 40 we got )<br>
> > 2013-08-29 16:40:48.854572 [INFO] mod_dptools.c:1567 ASR 40 we got<br>
> ><br>
> ><br>
> > Why is the "${rand_val}" not being parsed?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > David<br>
> ><br>
> ><br>
> ><br>
> > _________________________________________________________________________<br>
> > Professional FreeSWITCH Consulting Services:<br>
</div>> > <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a> <mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>><br>
<div class="im">> > <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>
</div>> > <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a> <mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im">> > <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>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
</div>> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a> <mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>><br>
<div class="im">> <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>
</div>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a> <mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im">> <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>
><br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
</div>> <a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a> <mailto:<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>><br>
<div class="im">> <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>
</div>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a> <mailto:<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>><br>
<div class="im HOEnZb">> <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>
><br>
><br>
><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>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
------------------------------------------------------------<br>
Nathan Neulinger <a href="mailto:nneul@mst.edu">nneul@mst.edu</a><br>
Missouri S&T Information Technology <a href="tel:%28573%29%20612-1412" value="+15736121412">(573) 612-1412</a><br>
System Administrator - Architect<br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>