Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#545 b2b uses socket instead of advertised address in Contact

trunk
closed-fixed
Anca Vamanu
modules (454)
5
2012-08-07
2012-07-29
Anonymous
No

I have been using the built in B2B scenario "top hiding" while running on Amazon EC2 with an associated Elastic IP. EC2 uses a 1 to 1 nat, So I have set the opensips advertised_address to my public elastic IP address.

When b2b init request is used, the proxy sends out a new invite and uses the advertised address in the Via header, but it uses the locally bound socket IP in the Contact header. This obviously causes problems because the local socket IP is a private ip address within EC2.

I have captured a SIP trace of this behaviour which you can find here.

http://pastie.org/private/ury9whe8twzp7dguznsea

I have tested this against 1.8 tarball, and opensips_head from svn as of 7/29/2012

Discussion


  • Anonymous
    2012-08-01

    NOTE: Because this is a 1 to 1 NAT situation, not a multi NIC setup, I can not call force_send_socket with the public IP address, because it does not exist on the box.

     
  • Anca Vamanu
    Anca Vamanu
    2012-08-05

    Hi Eric!

    I have investigated this and I have committed a fix that should provide a solution for your use case.
    Please update your code to rev 9165 or port this patch http://opensips.svn.sourceforge.net/opensips/?rev=9165&view=rev.
    Then you need to edit your configuration file and add an advertised address for the listen directive corresponding to the interface where the B2BUA receives the requests. It will look something like this:

    listen= 10.28.86.118:5060 as 23.23.166.185:5060

    Here is the documentation for this parameter: http://www.opensips.org/Resources/DocsCoreFcn#toc54.

    Let us know the results.

    Regards,
    Anca Vamanu

     
    • assigned_to: nobody --> anca_vamanu
    • status: open --> closed-fixed