<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Maybe you should set rand_val with an
      inline attribute?<br>
      <a class="moz-txt-link-freetext" href="https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions">https://wiki.freeswitch.org/wiki/Dialplan_XML#Inline_Actions</a><br>
      <br>
      On 03/08/17 21:51, David Villasmil wrote:<br>
    </div>
    <blockquote
cite="mid:CAFGRPVp0FndQ3=2AgfvAPdb4bP3mF4KVc_9V3R4PjipKFX9BTA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hello guys,</div>
        <div><br>
        </div>
        <div>Does anyone see anything wrong with this? The first
          extension gets executed, but not the second, even though i
          have continue="true"</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div>&lt;extension name="do_this_for_all_9"
            continue="true"&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;condition field="destination_number"
            expression="^(9.*)$"&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set"
data="rand_val=${expr(randomize(&amp;x);ceil(random(0,10,&amp;x)))}"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="log" data="ERR
            Random Value: &lt;${rand_val}&gt;"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/condition&gt;</div>
          <div>&lt;/extension&gt;</div>
          <div><br>
          </div>
          <div>&lt;extension name="local_call2"&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;condition field="destination_number"
            expression="^(9.*)$"&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;condition field="${cond(${rand_val} &gt;
            4 ? YES : NO)}" expression="^YES$"&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="set"
            data="continue_on_fail=true"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="ring_ready"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="sleep"
            data="3000"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="hangup"
            data="USER_BUSY"/&gt;</div>
          <div><br>
          </div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action application="set"
            data="continue_on_fail=true"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action
            application="ring_ready"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action application="sleep"
            data="3000"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action
            application="sched_hangup" data="+10 allotted_timeout"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action application="answer"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;acti-action application="callcenter"
            data="support@default"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;anti-action application="hangup"/&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/condition&gt;</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/condition&gt;</div>
          <div>&lt;/extension&gt;</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <br clear="all">
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>Regards,</div>
              <div><br>
              </div>
              David Villasmil
              <div>email: <a moz-do-not-send="true"
                  href="mailto:david.villasmil.work@gmail.com"
                  target="_blank">david.villasmil.work@gmail.com</a></div>
              <div>phone: +34669448337</div>
            </div>
          </div>
        </div>
      </div>
      <div hspace="streak-pt-mark" style="max-height:1px"><img
          moz-do-not-send="true"
          style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&amp;type=zerocontent&amp;guid=5e711359-f397-4bc1-bddf-9c05c4e53c5b"><font
          color="#ffffff" size="1">&#5159;</font></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
With kind regards
Peter Steinbach 

Telefaks Services GmbH
<a class="moz-txt-link-freetext" href="mailto:lists">mailto:lists</a> (att) telefaks.de
Internet: <a class="moz-txt-link-abbreviated" href="http://www.telefaks.de">www.telefaks.de</a>

</pre>
  </body>
</html>