<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Mitesh,<br>
      <br>
      There are various ways for storing and pushing the new
      destinations in failure route, depending on the routing mechanism
      that fits you. The most generic way is to use $avp() at script
      level (for custom logic) or you can use built-in logics like
      dispatcher, load-balancer, drouting, etc.<br>
      <br>
      The DNS based failover is built-in as logic - it is triggered by
      SIP timeouts (408) and 503 replies only. And the next destinations
      are taken from the DNS records, according to the priorities.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2020Amsterdam/">https://www.opensips.org/events/Summit-2020Amsterdam/</a>
OpenSIPS Bootcamp, Miami, March 2020
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_Bootcamp_2020/">https://opensips.org/training/OpenSIPS_Bootcamp_2020/</a>

</pre>
    <div class="moz-cite-prefix">On 1/6/20 8:19 AM, Miteshkumar Thakkar
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAztV7RnUA6X_VqUJ27CBcAp2DyHFj9Sq2NfFtSempAKRwB9FQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Thank you Bogdan,</div>
        <div><br>
        </div>
        <div>I was experimenting with the same.</div>
        <div>The new destination can be pre-configured destination in
          dispatcher module, if I am not wrong.</div>
        <div>Is there any way to select another destination which is
          received from DNS response. Basically, I want to
          avoid pre-configuration of destinations. </div>
        <div><br>
        </div>
        Mitesh<br>
        <br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sat, Jan 4, 2020 at 8:28 PM
          Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
            moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF"> <tt>Hi Miteshkumar,<br>
              <br>
              To achieve failover for 408, you need to arm a failure
              route for your INVITE, see <a
                href="https://www.opensips.org/Documentation/Script-Routes-3-0#toc3"
                target="_blank" moz-do-not-send="true">https://www.opensips.org/Documentation/Script-Routes-3-0#toc3</a><br>
              <br>
              This failure route will be trigger whenever your INVITE
              transaction will complete with a negative reply. In the
              failure route you can check what was the final negative
              reply (with t_check_status() from  TM module) and if 408,
              you can set a new destination and t_relay() again.<br>
              <br>
              Best regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a href="https://www.opensips.org/events/Summit-2020Amsterdam/" target="_blank" moz-do-not-send="true">https://www.opensips.org/events/Summit-2020Amsterdam/</a>
OpenSIPS Bootcamp, Miami, March 2020
  <a href="https://opensips.org/training/OpenSIPS_Bootcamp_2020/" target="_blank" moz-do-not-send="true">https://opensips.org/training/OpenSIPS_Bootcamp_2020/</a>

</pre>
            <div>On 12/26/19 12:12 PM, Miteshkumar Thakkar via Users
              wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Thanks for your response. I will try it.
                But, that cannot be done using DNS failover of TM module
                by any means, right?<br>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Thu, Dec 26, 2019
                  at 3:17 PM David Villasmil <<a
                    href="mailto:david.villasmil.work@gmail.com"
                    target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                  <div>
                    <div dir="auto">Have you tried using the dispatcher
                      module? Does exactly what you want.</div>
                  </div>
                  <div><br>
                    <div class="gmail_quote">
                      <div dir="ltr" class="gmail_attr">On Thu, 26 Dec
                        2019 at 08:41, Miteshkumar Thakkar via Users
                        <<a href="mailto:users@lists.opensips.org"
                          target="_blank" moz-do-not-send="true">users@lists.opensips.org</a>>
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                        <div dir="ltr">
                          <div>Hi,</div>
                          <div><br>
                          </div>
                          <div>I want to achieve failover in case of 408
                            - Request timeout.</div>
                          <div><br>
                          </div>
                          <div>One option I can see is DNS failover of
                            TM Module. But, it does failover in case of
                            503 as well. I do not want that.</div>
                          <div><br>
                          </div>
                          <div>I do not want failover in case of 503. I
                            just want it, in case of 408 - Request
                            timeout.</div>
                          <div>How can I achieve this?</div>
                          <div><br>
                          </div>
                          <div>Any help is appreciated.</div>
                          <div dir="ltr"><br>
                          </div>
                          <div>Thank You,</div>
                          <div>Mitesh</div>
                        </div>
                        _______________________________________________<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>
                  <div dir="ltr">
                    <div dir="ltr">
                      <div>Regards,</div>
                      <div><br>
                      </div>
                      David Villasmil
                      <div>email: <a
                          href="mailto:david.villasmil.work@gmail.com"
                          target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                      <div>phone: +34669448337</div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>