<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Sreeram,<br>
      <br>
      Unfortunately the ladder diagram is not enough as I cannot set the
      details of all the messages :(. The it looks, the 200 OK coming
      from 110.46.1.106:5060 may contain bogus routing information (the
      dialog route set), like a wrong Contact hdr point to that
      EXTERNAL_IP....<br>
      <br>
      Regards,<br>
    </font>
    <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>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 11/21/23 12:13 PM, Sreeram Narayanan
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHSZ+1iEm-5G3Wh7gSRYPSjxWaNiPegogw7GJMHTcW18DZZ0gg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div>Thanks for your response. <br>
        </div>
        <div><br>
        </div>
        <div>I've added the network trace <a
            href="https://pastebin.com/raw/Lxi0SRZ4"
            moz-do-not-send="true">here</a>. I've masked some of the IPs
          for security.</div>
        <div><a href="https://pastebin.com/raw/rCLdemG4"
            moz-do-not-send="true">This</a> is what the ACK looks like
          from the OpenSIPs server. Please let me know if I need to
          share more information.</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Nov 15, 2023 at
          5:05 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:1px solid rgb(204,204,204);padding-left:1ex">
          <div> <font face="monospace">Hi,<br>
              <br>
              Ideally you should provide a network capture (pcap) from
              the OpenSIPS server, covering both incoming and outgoing
              traffic - this is the only way to understand what is wrong
              with the call.<br>
              <br>
              As attachments are limited to 40K here, consider using
              some pastebin or other file sharing service.<br>
              <br>
              Regards,<br>
            </font>
            <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>
  <a href="https://www.siphub.com" target="_blank" moz-do-not-send="true">https://www.siphub.com</a></pre>
            <div>On 11/13/23 1:26 PM, Sreeram Narayanan via Users wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hello,
                <div><br>
                </div>
                <div>I am trying to use OpenSIPs with the load_balancer
                  module to balance inbound calls between 2 Asterisk
                  servers. The setup sits behind a NAT. The OpenSIPs
                  server has a public IP and a private IP. When an
                  INVITE arrives, it can forward it to one of the
                  Asterisk servers and Asterisk responds with a 200 OK.
                  The problem starts when I receive the ACK (from
                  Twilio). The ACK starts bouncing between the public IP
                  and Private IP of the OpenSIPs server. It doesn't
                  reach the Asterisk server and eventually times out. I
                  hope someone can help me with this. Thanks in advance.</div>
                <div><br>
                </div>
                <div>Here is my configuration:</div>
                <div><br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">####### Routing
                  Logic ########<br>
                  route {<br>
                  <br>
                      if (is_method("INVITE")) {<br>
                          rtpproxy_engage();<br>
                      }<br>
                  <br>
                      if ($rm=="INVITE") {<br>
                  <br>
                          lb_start_or_next(1,"pstn");<br>
                      }<br>
                  <br>
                      t_check_trans();<br>
                      record_route();<br>
                  <br>
                      t_on_failure("GW_FAILOVER");<br>
                  <br>
                      # route the request<br>
                      if (!t_relay()) {<br>
                          sl_reply_error();<br>
                      }<br>
                  <br>
                      exit;<br>
                  }<br>
                  <br>
                  route[RELAY] {<br>
                      if (!t_relay()) {<br>
                          sl_reply_error();<br>
                      }<br>
                      exit;<br>
                  }<br>
                  <br>
                  failure_route[GW_FAILOVER] {<br>
                      if (t_was_cancelled()) {<br>
                          exit;<br>
                      }<br>
                      # failure detection with redirect to next
                  available trunk<br>
                      if (t_check_status("(408)|([56][0-9][0-9])")) {<br>
                          xlog("Failed trunk $rd/$du detected \n");<br>
                      }<br>
                  }<br>
                </blockquote>
                <div>
                  <div><br>
                  </div>
                  <span class="gmail_signature_prefix">-- </span><br>
                  <div dir="ltr" class="gmail_signature">
                    <div dir="ltr">- Sreeram</div>
                  </div>
                </div>
              </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>
      <br clear="all">
      <div><br>
      </div>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">- Sreeram</div>
      </div>
    </blockquote>
    <br>
  </body>
</html>