[OpenSIPS-Devel] [ opensips-Bugs-3551339 ] b2b uses socket instead of advertised address in Contact

SourceForge.net noreply at sourceforge.net
Sun Aug 5 12:51:32 CEST 2012


Bugs item #3551339, was opened at 2012-07-29 07:10
Message generated for change (Comment added) made by anca_vamanu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3551339&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Eric Tamme ()
Assigned to: Nobody/Anonymous (nobody)
Summary: b2b uses socket instead of advertised address in Contact

Initial Comment:
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

----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2012-08-05 03:51

Message:
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

----------------------------------------------------------------------

Comment By: Eric Tamme ()
Date: 2012-08-01 09:23

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3551339&group_id=232389



More information about the Devel mailing list