<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6422">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: Do not change IP address in SDP origin line (o=) in SIP reINVITE<br><br>If directmedia=yes is configured, when call is answered, Asterisk sends reINVITE<br>to both parties to set up media path directly between the endpoints.<br>In this reINVITE msg SDP origin line (o=) contains IP address of endpoint<br>instead of IP of asterisk. This behavior violates RFC3264, sec 8:<br>"When issuing an offer that modifies the session,<br>the "o=" line of the new SDP MUST be identical to that in the<br>previous SDP, except that the version in the origin field MUST<br>increment by one from the previous SDP."<br>This patch assures IP address of Asterisk is always sent in<br>SDP origin line.<br><br>ASTERISK-17540<br>Reported by: saghul<br><br>Change-Id: I533a047490c43dcff32eeca8378b2ba02345b64e<br>---<br>M channels/chan_sip.c<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index dcfadf4..8a73738 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -13570,12 +13570,13 @@<br> <br> get_our_media_address(p, needvideo, needtext, &addr, &vaddr, &taddr, &dest, &vdest, &tdest);<br> <br>+ /* We don't use dest here but p->ourip because address in o= field must not change in reINVITE */<br> snprintf(owner, sizeof(owner), "o=%s %d %d IN %s %s\r\n",<br> ast_strlen_zero(global_sdpowner) ? "-" : global_sdpowner,<br> p->sessionid, p->sessionversion,<br>- (ast_sockaddr_is_ipv6(&dest) && !ast_sockaddr_is_ipv4_mapped(&dest)) ?<br>+ (ast_sockaddr_is_ipv6(&p->ourip) && !ast_sockaddr_is_ipv4_mapped(&p->ourip)) ?<br> "IP6" : "IP4",<br>- ast_sockaddr_stringify_addr_remote(&dest));<br>+ ast_sockaddr_stringify_addr_remote(&p->ourip));<br> <br> snprintf(connection, sizeof(connection), "c=IN %s %s\r\n",<br> (ast_sockaddr_is_ipv6(&dest) && !ast_sockaddr_is_ipv4_mapped(&dest)) ?<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6422">change 6422</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6422"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I533a047490c43dcff32eeca8378b2ba02345b64e </div>
<div style="display:none"> Gerrit-Change-Number: 6422 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Vitezslav Novy <a1@vnovy.net> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>