diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-09-07 13:17:42 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-09-07 13:17:42 -0500 |
commit | 1405365f81b193d447e941756b51d1d76a117396 (patch) | |
tree | 2d92caf8e3125830817259c7fad04f65f68b6654 | |
parent | 2d8662002772fe1d8c8f97a62889a9f1391f0d88 (diff) | |
parent | 89e7bc1883635afaf5ea1c934d473ca36afa8780 (diff) |
Merge "chan_sip: Do not change IP address in SDP origin line (o=) in SIP reINVITE" into 14
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index cd5cc0c77..d8a1d3ef8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13526,12 +13526,13 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int get_our_media_address(p, needvideo, needtext, &addr, &vaddr, &taddr, &dest, &vdest, &tdest); + /* We don't use dest here but p->ourip because address in o= field must not change in reINVITE */ snprintf(owner, sizeof(owner), "o=%s %d %d IN %s %s\r\n", ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner, p->sessionid, p->sessionversion, - (ast_sockaddr_is_ipv6(&dest) && !ast_sockaddr_is_ipv4_mapped(&dest)) ? + (ast_sockaddr_is_ipv6(&p->ourip) && !ast_sockaddr_is_ipv4_mapped(&p->ourip)) ? "IP6" : "IP4", - ast_sockaddr_stringify_addr_remote(&dest)); + ast_sockaddr_stringify_addr_remote(&p->ourip)); snprintf(connection, sizeof(connection), "c=IN %s %s\r\n", (ast_sockaddr_is_ipv6(&dest) && !ast_sockaddr_is_ipv4_mapped(&dest)) ? |