[Asterisk-code-review] res pjsip session: Rewrite o= with external media address. (asterisk[master])

George Joseph asteriskteam at digium.com
Wed Apr 11 14:19:38 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/8761 )

Change subject: res_pjsip_session: Rewrite o= with external_media_address.
......................................................................

res_pjsip_session: Rewrite o= with external_media_address.

It now appends the external IP address on the
o= line of the SDP packet.  The decision was made to write
the numeric IP address as opposed to the RFC that states
the FQDN should be used if and when available.  We believe
the usage of literal IP address will help avoid
potential problems.

ASTERISK-27614 #close

Change-Id: I84f3360f3606b8c4e8d161edb228799ec0b8a302
---
M res/res_pjsip_session.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Sean Bright: Looks good to me, approved
  George Joseph: Approved for Submit



diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index d13b372..49ab875 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -4153,7 +4153,7 @@
 		if (ast_sip_transport_is_local(transport_state, &our_sdp_addr) || !transport_state->localnet) {
 			ast_debug(5, "Setting external media address to %s\n", ast_sockaddr_stringify_host(&transport_state->external_media_address));
 			pj_strdup2(tdata->pool, &sdp->conn->addr, ast_sockaddr_stringify_host(&transport_state->external_media_address));
-			pj_strdup2(tdata->pool, &sdp->origin.addr, transport->external_media_address);
+			pj_strassign(&sdp->origin.addr, &sdp->conn->addr);
 		}
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/8761
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I84f3360f3606b8c4e8d161edb228799ec0b8a302
Gerrit-Change-Number: 8761
Gerrit-PatchSet: 3
Gerrit-Owner: Christian Savinovich <csavinovich at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180411/6269aba6/attachment.html>


More information about the asterisk-code-review mailing list