[asterisk-bugs] [Asterisk 0017044]: [regression][patch] SDP c and o lines contain the wrong IP address when using an externally mapped IP(extern{ip, host})
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Aug 10 11:46:15 CDT 2010
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=17044
======================================================================
Reported By: ebroad
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 17044
Category: Channels/chan_sip/General
Reproducibility: always
Severity: minor
Priority: normal
Status: confirmed
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link: https://reviewboard.asterisk.org/r/566/
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-03-16 15:45 CDT
Last Modified: 2010-08-10 11:46 CDT
======================================================================
Summary: [regression][patch] SDP c and o lines contain the
wrong IP address when using an externally mapped IP(extern{ip,host})
Description:
The problem stems from a call to ast_rtp_instance_get_local_address() in
chan_sip.c in get_our_media_address(). ast_rtp_instance_get_local_address()
will always return the internal IP address of the Asterisk machine, which
could pose a problem when using NAT.
A simple solution would be to override {v,t}sin->sin_addr in
get_our_media_address() with p->ourip.sin_addr.s_addr if it is different,
though I don't know what that might break.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0013823 [patch] Response to REGISTER is sent to...
======================================================================
----------------------------------------------------------------------
(0125759) ebroad (manager) - 2010-08-10 11:46
https://issues.asterisk.org/view.php?id=17044#c125759
----------------------------------------------------------------------
chan_sip
r250617(http://svnview.digium.com/svn/asterisk?view=revision&revision=250917)
changed the behavior of get_our_media_address(). Before the commit, if
media_address was set, we would us it, otherwise, we would use p->ourip
which would contain the external mapped IP address of the machine when
running Asterisk behind NAT, which is correct. Now, we go through the
following order:
1. media_address
2. Local address returned by the RTP engine
3. p->ourip
The problem is that the RTP engine will always return the local address of
the machine(AFAIK, it is not NAT aware), which means the IP address sent in
the SDP payload will be incorrect in a NAT scenario.
Issue History
Date Modified Username Field Change
======================================================================
2010-08-10 11:46 ebroad Note Added: 0125759
2010-08-10 11:46 ebroad Summary [patch] SDP c and o
lines contain the wrong IP address when using an externally mapped
IP(extern{ip,host}) => [regression][patch] SDP c and o lines contain the wrong
IP address when using an externally mapped IP(extern{ip,host})
======================================================================
More information about the asterisk-bugs
mailing list