Maybe you should set rand_val with an inline attribute?
https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions

On 03/08/17 21:51, David Villasmil wrote:
Hello guys,

Does anyone see anything wrong with this? The first extension gets executed, but not the second, even though i have continue="true"


<extension name="do_this_for_all_9" continue="true">
        <condition field="destination_number" expression="^(9.*)$">
                <action application="set" data="rand_val=${expr(randomize(&x);ceil(random(0,10,&x)))}"/>
                <action application="log" data="ERR Random Value: <${rand_val}>"/>
        </condition>
</extension>

<extension name="local_call2">
        <condition field="destination_number" expression="^(9.*)$">
            <condition field="${cond(${rand_val} > 4 ? YES : NO)}" expression="^YES$">
                <action application="set" data="continue_on_fail=true"/>
                <action application="ring_ready"/>
                <action application="sleep" data="3000"/>
                <action application="hangup" data="USER_BUSY"/>

                <anti-action application="set" data="continue_on_fail=true"/>
                <anti-action application="ring_ready"/>
                <anti-action application="sleep" data="3000"/>
                <anti-action application="sched_hangup" data="+10 allotted_timeout"/>
                <anti-action application="answer"/>
                <acti-action application="callcenter" data="support@default"/>
                <anti-action application="hangup"/>
            </condition>
        </condition>
</extension>




Regards,

David Villasmil
phone: +34669448337
ᐧ


_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.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


-- 
With kind regards
Peter Steinbach 

Telefaks Services GmbH
mailto:lists (att) telefaks.de
Internet: www.telefaks.de