[OpenSIPS-Devel] [ opensips-Feature Requests-2173533 ] NAT traversal for media: special support for hairpin NAT

SourceForge.net noreply at sourceforge.net
Fri Oct 17 04:17:17 CEST 2008


Feature Requests item #2173533, was opened at 2008-10-16 22:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=2173533&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: None
Status: Open
Priority: 5
Private: No
Submitted By: Phil Vandry (vandry)
Assigned to: Nobody/Anonymous (nobody)
Summary: NAT traversal for media: special support for hairpin NAT

Initial Comment:
fix_nated_sdp() is useful to implement NAT traversal for SDP media without using a media proxy as long as the NAT gateways make an effort to preserve UDP ports across NAT mapping and and SIP media endpoints use symmetric RTP. But there can be problems with this solution because of lack of support for hairpin NAT in many NAT gateways.

A new function unfix_sdp_on_same_ip() is added to the nathelper module to detect and prevent problems with hairpin NAT in multi-proxy environments. The function is documented as follows:

unfix_sdp_on_same_ip(flags)

Restores an SDP that has been previously altered by fix_nated_sdp() to its original state iff the destination URI is set and contains an IP address identical to the one fix_nated_sdp() wrote into the SDP.

The purpose of this function is to annul the rewrite of the SDP if it is discovered that both media endpoints are behind the same NAT gateway.

There are two main reasons to use this function:

- Many NAT gateways do not implement hairpin NAT. That is, they cannot support two endpoints inside the NAT who are attempting to communicate using the NAT's public IP address. This function detects and avoids that condition.

- Even if the NAT gateway supports hairpin NAT, the media path will be more optimal if the media path can be established directly between each other rather than through their NAT gateway.

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

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



More information about the Devel mailing list