<p>Kevin Harwell <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13990">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, approved; Approved for Submit
George Joseph: Looks good to me, but someone else must approve
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Only do hold/unhold on default audio stream.<br><br>When examining a stream to determine hold/unhold information we<br>only care about the default audio stream. Other streams aren't<br>used for hold/unhold.<br><br>ASTERISK-28784<br><br>Change-Id: I7a1f10f07822c4aee1f98a38b9628849b578afe4<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 12 insertions(+), 10 deletions(-)<br><br></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 359b2d6..d301160 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -1430,18 +1430,20 @@</span><br><span> /* If ICE support is enabled find all the needed attributes */</span><br><span> check_ice_support(session, session_media, stream);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Check if incomming SDP is changing the remotely held state */</span><br><span style="color: hsl(0, 100%, 40%);">- if (ast_sockaddr_isnull(addrs) ||</span><br><span style="color: hsl(0, 100%, 40%);">- ast_sockaddr_is_any(addrs) ||</span><br><span style="color: hsl(0, 100%, 40%);">- pjmedia_sdp_media_find_attr2(stream, "sendonly", NULL) ||</span><br><span style="color: hsl(0, 100%, 40%);">- pjmedia_sdp_media_find_attr2(stream, "inactive", NULL)) {</span><br><span style="color: hsl(0, 100%, 40%);">- if (!session_media->remotely_held) {</span><br><span style="color: hsl(0, 100%, 40%);">- session_media->remotely_held = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_sip_session_is_pending_stream_default(session, asterisk_stream) && media_type == AST_MEDIA_TYPE_AUDIO) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Check if incomming SDP is changing the remotely held state */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_sockaddr_isnull(addrs) ||</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sockaddr_is_any(addrs) ||</span><br><span style="color: hsl(120, 100%, 40%);">+ pjmedia_sdp_media_find_attr2(stream, "sendonly", NULL) ||</span><br><span style="color: hsl(120, 100%, 40%);">+ pjmedia_sdp_media_find_attr2(stream, "inactive", NULL)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!session_media->remotely_held) {</span><br><span style="color: hsl(120, 100%, 40%);">+ session_media->remotely_held = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ session_media->remotely_held_changed = 1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (session_media->remotely_held) {</span><br><span style="color: hsl(120, 100%, 40%);">+ session_media->remotely_held = 0;</span><br><span> session_media->remotely_held_changed = 1;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (session_media->remotely_held) {</span><br><span style="color: hsl(0, 100%, 40%);">- session_media->remotely_held = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- session_media->remotely_held_changed = 1;</span><br><span> }</span><br><span> </span><br><span> if (set_caps(session, session_media, session_media_transport, stream, 1, asterisk_stream)) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13990">change 13990</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/c/asterisk/+/13990"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 17 </div>
<div style="display:none"> Gerrit-Change-Id: I7a1f10f07822c4aee1f98a38b9628849b578afe4 </div>
<div style="display:none"> Gerrit-Change-Number: 13990 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>