<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9832">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip/rtp: No joint capabilities between streams.<br><br>When a conference contained a mixture of audio/video and audio-only<br>users, a NOTICE message would pop up stating there are no joint<br>capabilities between streams. This happens because streams can never be<br>removed, but they can be in a REMOVED state. If we have the scenario<br>where user A joins with audio/video, user B joins with audio-only, and<br>user C joins with audio/video, then user A leaves, the message would<br>be triggered. That removed stream is still in the SDP, but Asterisk<br>would pass it through, causing it to be seen as a ulaw stream. A check<br>has been added for removed streams, setting their status to REMOVED when<br>handling negotiated SDPs.<br><br>Also addressed an issue where user A joins, then user B joins but does<br>not receive video until much later. Full frames were not being sent,<br>cuasing some PLI for the browser. Because the video was flowing in one<br>direction, the browser sets the SSRC to 1, but Asterisk was dropping the<br>PLI because of that. Added a check to see if the SSRC is 1 or not, which<br>sends full frames and allows video to flow between user A and user B.<br><br>ASTERISK-27398<br><br>Change-Id: I26e7c6f101bc119549eeca406b5bcd25ad8ebc5e<br>---<br>M res/res_pjsip_session.c<br>M res/res_rtp_asterisk.c<br>2 files changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/32/9832/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 1300850..fdbdb72 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -930,6 +930,15 @@</span><br><span>              session_media = AST_VECTOR_GET(&session->pending_media_state->sessions, i);</span><br><span>                stream = ast_stream_topology_get_stream(session->pending_media_state->topology, i);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+         /* Make sure that this stream is in the correct state. If we need to change</span><br><span style="color: hsl(120, 100%, 40%);">+            * the state to REMOVED, then our work here is done, so go ahead and move on</span><br><span style="color: hsl(120, 100%, 40%);">+           * to the next stream.</span><br><span style="color: hsl(120, 100%, 40%);">+                 */</span><br><span style="color: hsl(120, 100%, 40%);">+           if (!remote->media[i]->desc.port) {</span><br><span style="color: hsl(120, 100%, 40%);">+                     ast_stream_set_state(stream, AST_STREAM_STATE_REMOVED);</span><br><span style="color: hsl(120, 100%, 40%);">+                       continue;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>          /* The stream state will have already been set to removed when either we</span><br><span>              * negotiate the incoming SDP stream or when we produce our own local SDP.</span><br><span>            * This can occur if an internal thing has requested it to be removed, or if</span><br><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index 074bcea..fe0cef0 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -5802,7 +5802,7 @@</span><br><span>            }</span><br><span> </span><br><span>                if (ssrc_valid && rtp->themssrc_valid) {</span><br><span style="color: hsl(0, 100%, 40%);">-                     if (ssrc != rtp->themssrc && use_packet_source) {</span><br><span style="color: hsl(120, 100%, 40%);">+                  if (ssrc != rtp->themssrc && use_packet_source && ssrc != 1) {</span><br><span>                            /*</span><br><span>                            * Skip over this RTCP record as it does not contain the</span><br><span>                              * correct SSRC.  We should not act upon RTCP records</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9832">change 9832</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/9832"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I26e7c6f101bc119549eeca406b5bcd25ad8ebc5e </div>
<div style="display:none"> Gerrit-Change-Number: 9832 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>