You the man! thanks!! I had never heard (read) or that "inline"...DavidOn Thu, Aug 29, 2013 at 6:28 PM, Kevin Wormington <kworm@sofnet.com> wrote:
I believe you would need to add inline="true" to your action setting the
variable...see http://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions
Kevin
> Dialplan: sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> Regex
On 08/29/2013 10:10 AM, David Villasmil wrote:
> Hello guys,
>
> I've got this in my dialplan:
>
> <action application="set" data="rand_val=${expr
> randomize(&x);ceil(random(0,100,&x))}"/>
> <action application="log" data="INFO Random dialplan ${expr
> randomize(&x);ceil(random(0,100,&x))}"/>
> <action application="log" data="INFO Random value is ${rand_val}"/>
>
> and this is what i see in my cli:
>
> (PASS) [respond] destination_number(1234) =~ /^.*/ break=on-false> Dialplan: sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> Action
> set(rand_val=${expr randomize(&x);ceil(random(0,100,&x))})> Dialplan: sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> Action
> log(INFO Random dialplan ${expr randomize(&x);ceil(random(0,100,&x))})> Dialplan: sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> Action
> log(INFO Random value is ${rand_val})> (sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4>) State Change
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:167
> CS_ROUTING -> CS_EXECUTE> signal sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> [BREAK]
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_session.c:1341 Send
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:471> (sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4>) State ROUTING
> going to sleep> (sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4>) Running State
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:416
> Change CS_EXECUTE> (sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4>) State EXECUTE
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:478
> 2013-08-29 16:40:48.834592 [DEBUG] mod_sofia.c:230> sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> SOFIA EXECUTE
> 2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:209> sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> Standard EXECUTE
> EXECUTE sofia/external/12345@1.2.3.4 <mailto:12345@1.2.3.4> log(INFO ASR
> 40 we got )> _________________________________________________________________________
> 2013-08-29 16:40:48.854572 [INFO] mod_dptools.c:1567 ASR 40 we got
>
>
> Why is the "${rand_val}" not being parsed?
>
> Thanks,
>
> David
>
>
>
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org