<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>You right,</p>
    <p>but with the new configuration, same result: debugging
      DISPATCHER:</p>
    <p>Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
      DBG:dispatcher:ds_select_dst: set [1], using alg [9], size [2],
      used size [2], active size [2]<br>
      Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
      DBG:dispatcher:ds_select_dst: chosen count: 1<br>
      Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
      DBG:dispatcher:ds_select_dst: selected [9-1/-1]
      <a class="moz-txt-link-rfc2396E" href="sip:XXX.XXX.XXX.XXX:5060"><sip:XXX.XXX.XXX.XXX:5060></a><br>
      Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
      DBG:dispatcher:ds_select_dst: using entry [1/0]</p>
    <p>Actual configuration:</p>
    <p>route[DISP] {<br>
              if(!ds_select_dst("1","9","f M 5")) {<br>
                              send_reply("404", "No destination");<br>
                              exit;<br>
                      }<br>
              update_stat("load_<a class="moz-txt-link-freetext" href="sip:$dd">sip:$dd</a>", "+1");<br>
              t_on_failure("DISPATCHER_FAILURE");<br>
              route(relay);<br>
              exit;<br>
      }</p>
    <p>failure_route[DISPATCHER_FAILURE] {<br>
             if (t_was_cancelled()) {<br>
                      exit;<br>
              }<br>
              if (t_check_status("[56][0-9][0-9]"))  {<br>
                      if(ds_next_dst()) {<br>
                              t_on_failure("DISPATCHER_FAILURE");<br>
                              t_relay();<br>
                              exit;<br>
                      }<br>
                      else {<br>
                              send_reply("404", "No destination");<br>
                              exit;<br>
                      }<br>
              }<br>
      }<br>
      <br>
    </p>
    <pre class="moz-signature" cols="72">CEO - VozToVoice - Talking around the World
Web: <a class="moz-txt-link-abbreviated" href="http://www.voztovoice.net">www.voztovoice.net</a>
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:info@voztovoice.net">info@voztovoice.net</a>
Canal Telegram: @voztovoice
Telefonos:
Linea Gratuita: 018005184359
Colombia Cel. +573163435746
Miami +13057288631</pre>
    <div class="moz-cite-prefix">El 22/02/2020 a las 17:06, Grant
      Bagdasarian escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACK6f-oT6ppUYBRLQHzTjq14XjfxOkPyZvwQjzg096z66qztGw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>
        <div dir="auto">Hello,</div>
      </div>
      <div dir="auto"><br>
      </div>
      <div dir="auto">As far as I can tell, the regex is wrong.</div>
      <div dir="auto">It only matches 5 or 6, 0 or 9, 0 or 9.</div>
      <div dir="auto">Try this regex: [56][0-9][0-9]</div>
      <div dir="auto"><br>
      </div>
      <div dir="auto">
        <div>
          <div><a href="https://regex101.com/r/rJpwGW/1"
              moz-do-not-send="true">https://regex101.com/r/rJpwGW/1</a></div>
          <br>
        </div>
        <div dir="auto">Regards,</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Grant</div>
      </div>
      <div><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Sat, 22 Feb 2020 at 17:08
            Social Boh <<a href="mailto:social@bohboh.info"
              moz-do-not-send="true">social@bohboh.info</a>> wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello
            list,<br>
            <br>
            I'm testing DISPATCHER module and how i can see, the INVITE
            never go to <br>
            failure route if the first Gateway fail.<br>
            <br>
            My configuration:<br>
            <br>
            route[DISP] {<br>
                     if(!ds_select_dst("1","9")) {<br>
                                     send_reply("404", "No
            destination");<br>
                                     exit;<br>
                             }<br>
                     update_stat("load_<a class="moz-txt-link-freetext" href="sip:$dd">sip:$dd</a>", "+1");<br>
                     t_on_failure("DISPATCHER_FAILURE");<br>
                     route(relay);<br>
                     exit;<br>
            }<br>
            <br>
            failure_route[DISPATCHER_FAILURE] {<br>
                    if (t_was_cancelled()) {<br>
                             exit;<br>
                     }<br>
            <br>
                     if (t_check_status("[56][09][09]"))  {<br>
                             if(ds_next_dst()) {<br>
                                     t_on_failure("DISPATCHER_FAILURE");<br>
                                     t_relay();<br>
                                     exit;<br>
                             }<br>
                             else {<br>
                                     send_reply("404", "No
            destination");<br>
                                     exit;<br>
                             }<br>
                     }<br>
            }<br>
            <br>
            I can see the function ds_select_dst select 2 GATEWAY, y con
            see the <br>
            list of GATEWAY, but if I receive a 503 error from the first
            GATEWAY the <br>
            request never pass for FAILURE ROUTE.<br>
            <br>
            changing if(!ds_select_dst("1","9")) {<br>
            <br>
            with<br>
            <br>
            if(!ds_select_dst("1","9","f")) {<br>
            <br>
            or using other alghoritm not solve.<br>
            <br>
            Any light, please?<br>
            <br>
            -- <br>
            ---<br>
            I'm SoCIaL, MayBe<br>
            <br>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org" target="_blank"
              moz-do-not-send="true">Users@lists.opensips.org</a><br>
            <a
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>