[OpenSIPS-Users] b2bua, fix_nated_contact() and EC2

Nick Altmann nick.altmann at gmail.com
Wed Jul 4 17:06:40 CEST 2012


Try to place fix_nated_contact() in global onreply_route (without number).

I do it like this:
onreply_route { # GLOBAL
    # NAT processing
    if (<condition of your hated call>) {
        # Fix NATed contact and SDP in client replies
        if (nat_uac_test("65")) fix_nated_contact();
        if ( (has_body("application/sdp")) && (nat_uac_test("8")) )
fix_nated_sdp("10");
    }
}

Also, you may watch at my patch:
http://sourceforge.net/tracker/?func=detail&aid=3519778&group_id=232389&atid=1086412
It's for you can apply changes of packets (fix_nated_contact, etc.) in
b2b_request/b2b_reply routes.

--
Nick


2012/7/4 Huw Selley <huw.selley at netdev.co.uk>:
> Hi,
>
> I have an opensips 1.8.0 instance on EC2 that is in front of a pair of
> freeswitch instances. The opensips instance has an elastic IP address.
> Amazon do a 1:1 NAT on the elastic IP to the instances internal ip.
>
> When calls hit opensips I do b2b_init_request("refer"); on the initial
> invite and then load balance between the freeswitch instances (the
> freeswitches can REFER between each other so I need to b2b the call).
>
> What I have noticed is that the Contact header being sent back to my client
> is still incorrect after calling fix_nated_contact() from inside
> onreply_route (and local_route - I wasn't sure which one was correct) - it's
> still set to the internal IP of the opensips instance so I don't get ACKs
> correctly routed and the call terminates after 30s or so.
> I have set 'advertised_address' as the elastic IP address and have added an
> 'alias' for the internal address.
>
> Is there some other piece of configuration that I am missing? If it helps I
> can post my config?
>
> Thanks in advance.
> Huw
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list