<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>Hello Matt,<br>
        <br>
        In OpenSIPS you need to use the onreply route to get access to
        those 200 OK replies (from FreeSwitch). In there use
        fix_nated_sdp("2","FS_public_ip") to rewrite the IP in the SDP:<br>
           
        <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864">http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864</a><br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 19.01.2015 17:54, Matt Broad wrote:<br>
    </div>
    <blockquote
cite="mid:CAEeV61ip0uYfbwpVOC--DOQiCPA+fy8E9QJjQcUzL5PVJF570Q@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span style="font-size:13px">Hi,</span>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">I was looking for some guidance on
          using the load balancer in a NAT environment.</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">I have the following setup (the IP
          addresses are made up but should give an indication):</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">1 x opensips server with load
          balancer module - IP 192.168.0.1<br>
        </div>
        <div style="font-size:13px">2 x freeswitch servers - IP
          192.168.0.2 &amp; 192.168.0.3</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">All 3 servers have seperate external
          IP address routing to their internal IP via our firewall:</div>
        <div style="font-size:13px">217.0.0.1 routed to 192.168.0.1
          (Opensips)</div>
        <div style="font-size:13px">217.0.0.2 routed to 192.168.0.2
          (FS1)<br>
        </div>
        <div style="font-size:13px">217.0.0.3 routed to 192.168.0.3
          (FS2)<br>
        </div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">I have the load_balancer table with
          the following details:</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">
          <div>id,  | group_id, |                  dst_uri,            |
            resources,  | probe_mode, | description</div>
          <div>'1',  |      '1',     |  'sip:<a moz-do-not-send="true"
              href="http://192.168.0.2:5080/" target="_blank">192.168.0.2:5080</a>',
             |   'pstn=10', |          '2',       |          'FS1'</div>
          <div>'2',  |      '1',     |  'sip:<a moz-do-not-send="true"
              href="http://192.168.0.3:5080/" target="_blank">192.168.0.3:5080</a>',
             |   'vm=1',     |         '2',       |          'FS2'</div>
        </div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">The call flow is:</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">SIP Provider --&gt; 217.0.0.1
          Opensips --&gt; <a moz-do-not-send="true"
            href="http://192.168.0.2/3" target="_blank">192.168.0.2/3</a></div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">The issue is, that when the 200 ok
          response is sent to the SIP provider, the Freeswitch server's
          internal IP is being sent in the SDP connection information
          (c).  This causes the ACK response from the SIP Provider to
          fail to be sent correctly.</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">With the calls routed directly to
          the FS servers (removing opensips from the flow), the calls
          work fine.</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">Any help would be much appreciated
          :)</div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px"><br>
        </div>
        <div style="font-size:13px">thanks</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
  </body>
</html>