<p>Torrey Searle has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9846">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_pjsip_sdp_rtp:  put rtcp-mux in answer only if offered<br><br>If in the initial sdp the caller doesn't include the line<br>a=rtcp-mux<br><br>Then asterisk shoud not include rtcp-mux in the response regardless<br>of rtcp-mux being enabled on the endpoint<br><br>ASTERISK-28007 #close<br><br>Change-Id: I58e9b9f40a139afc0da5de41906cc608fb62adc7<br>---<br>M res/res_pjsip_sdp_rtp.c<br>M res/res_pjsip_session.c<br>2 files changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/46/9846/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index 43b89a9..7c7040e 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -1376,8 +1376,8 @@</span><br><span>     attr->name = STR_SENDRECV;</span><br><span>        media->attr[media->attr_count++] = attr;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      /* If we've got rtcp-mux enabled, just unconditionally offer it in all SDPs */</span><br><span style="color: hsl(0, 100%, 40%);">-      if (session->endpoint->rtcp_mux) {</span><br><span style="color: hsl(120, 100%, 40%);">+      /* If we've got rtcp-mux enabled, add it unless we received an offer without it */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (session->endpoint->rtcp_mux && session_media->remote_rtcp_mux) {</span><br><span>                attr = pjmedia_sdp_attr_create(pool, "rtcp-mux", NULL);</span><br><span>            pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr);</span><br><span>       }</span><br><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 8eaeb31..ed637cd 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -1342,6 +1342,7 @@</span><br><span>   }</span><br><span>    session_media->encryption = session->endpoint->media.rtp.encryption;</span><br><span>        session_media->remote_ice = session->endpoint->media.rtp.ice_support;</span><br><span style="color: hsl(120, 100%, 40%);">+        session_media->remote_rtcp_mux = session->endpoint->rtcp_mux;</span><br><span>       session_media->keepalive_sched_id = -1;</span><br><span>   session_media->timeout_sched_id = -1;</span><br><span>     /* Safe use of strcpy */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9846">change 9846</a>. To unsubscribe, or for help writing mail filters, 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/9846"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I58e9b9f40a139afc0da5de41906cc608fb62adc7 </div>
<div style="display:none"> Gerrit-Change-Number: 9846 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>