<div>It turns out I was trying to do something silly (b2b and proxy in a single opensips instance).</div><div>I have now have the proxy instance on the edge forwarding all calls to my b2b instance that's doing load balancing and everything is great!</div><div><br></div><div>Thanks for the advice about onreply_route though!</div><div><br></div><div>H</div>
                 
                <p style="color: #A0A0A8;">On Wednesday, 4 July 2012 at 16:06, Nick Altmann wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>Try to place fix_nated_contact() in global onreply_route (without number).</div><div><br></div><div>I do it like this:</div><div>onreply_route { # GLOBAL</div><div>    # NAT processing</div><div>    if (&lt;condition of your hated call&gt;) {</div><div>        # Fix NATed contact and SDP in client replies</div><div>        if (nat_uac_test("65")) fix_nated_contact();</div><div>        if ( (has_body("application/sdp")) &amp;&amp; (nat_uac_test("8")) )</div><div>fix_nated_sdp("10");</div><div>    }</div><div>}</div><div><br></div><div>Also, you may watch at my patch:</div><div><a href="http://sourceforge.net/tracker/?func=detail&amp;aid=3519778&amp;group_id=232389&amp;atid=1086412">http://sourceforge.net/tracker/?func=detail&amp;aid=3519778&amp;group_id=232389&amp;atid=1086412</a></div><div>It's for you can apply changes of packets (fix_nated_contact, etc.) in</div><div>b2b_request/b2b_reply routes.</div><div><br></div><div>--</div><div>Nick</div><div><br></div><div><br></div><div>2012/7/4 Huw Selley &lt;<a href="mailto:huw.selley@netdev.co.uk">huw.selley@netdev.co.uk</a>&gt;:</div><blockquote type="cite"><div><div>Hi,</div><div><br></div><div>I have an opensips 1.8.0 instance on EC2 that is in front of a pair of</div><div>freeswitch instances. The opensips instance has an elastic IP address.</div><div>Amazon do a 1:1 NAT on the elastic IP to the instances internal ip.</div><div><br></div><div>When calls hit opensips I do b2b_init_request("refer"); on the initial</div><div>invite and then load balance between the freeswitch instances (the</div><div>freeswitches can REFER between each other so I need to b2b the call).</div><div><br></div><div>What I have noticed is that the Contact header being sent back to my client</div><div>is still incorrect after calling fix_nated_contact() from inside</div><div>onreply_route (and local_route - I wasn't sure which one was correct) - it's</div><div>still set to the internal IP of the opensips instance so I don't get ACKs</div><div>correctly routed and the call terminates after 30s or so.</div><div>I have set 'advertised_address' as the elastic IP address and have added an</div><div>'alias' for the internal address.</div><div><br></div><div>Is there some other piece of configuration that I am missing? If it helps I</div><div>can post my config?</div><div><br></div><div>Thanks in advance.</div><div>Huw</div><div><br></div><div>_______________________________________________</div><div>Users mailing list</div><div><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></div><div><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></div></div></blockquote><div><br></div><div>_______________________________________________</div><div>Users mailing list</div><div><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></div><div><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>