summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorChris-Savinovich <csavinovich@digium.com>2018-04-09 21:00:37 -0400
committerChristian Savinovich <csavinovich@digium.com>2018-04-11 11:17:33 -0600
commit0747ac893b277dbcab384607e533732b8e6cc0ef (patch)
treecf32ac06fcc4f77b81b102772d582b75c65f015f /res
parentfabfe701bbd4f05d0a959ed735b7a3658dce455e (diff)
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
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index d13b372be..49ab87568 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -4153,7 +4153,7 @@ static void session_outgoing_nat_hook(pjsip_tx_data *tdata, struct ast_sip_trans
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);
}
}