<div dir="ltr">Thanks for the reply Bogdan-Andrei,<div><br></div><div>I will give that a go and see if it helps :)</div><div><br></div><div><br></div><div>thanks</div><div>Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 January 2015 at 18:28, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div><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(&quot;2&quot;,&quot;FS_public_ip&quot;) to rewrite the IP in the SDP:<br>
           
        <a href="http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864" target="_blank">http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864</a><br>
        <br>
        Regards,<br>
      </tt>
      <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
      On 19.01.2015 17:54, Matt Broad wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <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>&#39;1&#39;,  |      &#39;1&#39;,     |  &#39;sip:<a href="http://192.168.0.2:5080/" target="_blank">192.168.0.2:5080</a>&#39;,
             |   &#39;pstn=10&#39;, |          &#39;2&#39;,       |          &#39;FS1&#39;</div>
          <div>&#39;2&#39;,  |      &#39;1&#39;,     |  &#39;sip:<a href="http://192.168.0.3:5080/" target="_blank">192.168.0.3:5080</a>&#39;,
             |   &#39;vm=1&#39;,     |         &#39;2&#39;,       |          &#39;FS2&#39;</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 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&#39;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></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>