summaryrefslogtreecommitdiff
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2014-12-09 20:02:29 +0000
committerKevin Harwell <kharwell@digium.com>2014-12-09 20:02:29 +0000
commit525c823b4b7e63dc74669ebb5284397713804c75 (patch)
tree6d4736bbfe744229826b80f6f567bd8e0a0547d3 /res/res_rtp_asterisk.c
parent664067e3189b29bd00276725d2293363c9b9ebe1 (diff)
Direct Media calls within private network sometimes get one way audio
When endpoints with direct_media enabled, behind a firewall (Asterisk on a separate network) and were bridged sometimes Asterisk would send the ip address of the firewall in the sdp to one of the phones in the reinvite resulting in one way audio. When sending the reinvite Asterisk will retrieve the media address from the associated rtp instance, but if frames were being read this can be overwritten with another address (in this case the firewall's). This patch ensures that Asterisk uses the original device address when using direct media. ASTERISK-24563 Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4216/ ........ Merged revisions 429195 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@429196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 818f1c05b..1d7ccd9dc 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -4332,7 +4332,8 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
/* If symmetric RTP is enabled see if the remote side is not what we expected and change where we are sending audio */
if (ast_rtp_instance_get_prop(instance, AST_RTP_PROPERTY_NAT)) {
if (ast_sockaddr_cmp(&remote_address, &addr)) {
- ast_rtp_instance_set_remote_address(instance, &addr);
+ /* do not update the originally given address, but only the remote */
+ ast_rtp_instance_set_incoming_source_address(instance, &addr);
ast_sockaddr_copy(&remote_address, &addr);
if (rtp->rtcp) {
ast_sockaddr_copy(&rtp->rtcp->them, &addr);