<div dir="ltr">You the man! thanks!! I had never heard (read) or that "inline"...<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"><<a href="mailto:kworm@sofnet.com" target="_blank">kworm@sofnet.com</a>></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="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>
<div class="im"><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>> 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>> Action<br>
<div class="im">> 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>> Action<br>
<div class="im">> 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>> Action<br>
<div class="im">> 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>>) 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>> [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>>) 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>>) 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>>) 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>> 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>> Standard 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>> log(INFO ASR<br>
<div class="im">> 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>
</div>> _________________________________________________________________________<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>
<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>