From Violet Bat, 7 Years ago, written in XML.
This paste is a reply to continue not working from davidcsi
- go back
Embed
Viewing differences between continue not working and Re: continue not working
<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>\n</extension>