[Freeswitch-users] Random not working?
David Villasmil
david.villasmil.work at gmail.com
Thu Aug 29 19:10:32 MSD 2013
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:
Dialplan: sofia/external/12345 at 1.2.3.4 Regex (PASS) [respond]
destination_number(1234) =~ /^.*/ break=on-false
Dialplan: sofia/external/12345 at 1.2.3.4 Action set(rand_val=${expr
randomize(&x);ceil(random(0,100,&x))})
Dialplan: sofia/external/12345 at 1.2.3.4 Action log(INFO Random dialplan
${expr randomize(&x);ceil(random(0,100,&x))})
Dialplan: sofia/external/12345 at 1.2.3.4 Action log(INFO Random value is
${rand_val})
2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:167
(sofia/external/12345 at 1.2.3.4) State Change CS_ROUTING -> CS_EXECUTE
2013-08-29 16:40:48.834592 [DEBUG] switch_core_session.c:1341 Send signal
sofia/external/12345 at 1.2.3.4 [BREAK]
2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:471
(sofia/external/12345 at 1.2.3.4) State ROUTING going to sleep
2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:416
(sofia/external/12345 at 1.2.3.4) Running State Change CS_EXECUTE
2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:478
(sofia/external/12345 at 1.2.3.4) State EXECUTE
2013-08-29 16:40:48.834592 [DEBUG] mod_sofia.c:230 sofia/external/
12345 at 1.2.3.4 SOFIA EXECUTE
2013-08-29 16:40:48.834592 [DEBUG] switch_core_state_machine.c:209
sofia/external/12345 at 1.2.3.4 Standard EXECUTE
EXECUTE sofia/external/12345 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130829/9b3a8b44/attachment-0001.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list