<p>Paulo Vicentini has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13846">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">A non negotiated rtp frame causes call disconnection when there is a SSRC change<br><br>For a non negotiated rtp frame, when there was a SSRC change, the frame<br>would be marked as a control frame and it would be queued to be written<br>and then leading to a disconnection (ast_channel_softhangup_internal_flag_add)<br><br>ASTERISK-28759<br><br>Change-Id: I6d854cc523f343e299a615636fc65bdbd5f809ec<br>---<br>M channels/chan_pjsip.c<br>M res/res_rtp_asterisk.c<br>2 files changed, 10 insertions(+), 8 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/13846/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c</span><br><span>index c4281c3..99dfb2e 100644</span><br><span>--- a/channels/chan_pjsip.c</span><br><span>+++ b/channels/chan_pjsip.c</span><br><span>@@ -797,14 +797,6 @@</span><br><span> }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast), f->subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_debug(1, "Oooh, got a frame with format of %s on channel '%s' when it has not been negotiated\n",</span><br><span style="color: hsl(0, 100%, 40%);">- ast_format_get_name(f->subclass.format), ast_channel_name(ast));</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_frfree(f);</span><br><span style="color: hsl(0, 100%, 40%);">- return &ast_null_frame;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> if (session->dsp) {</span><br><span> int dsp_features;</span><br><span> </span><br><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index e5bb94e..6c37d9a 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -5421,6 +5421,7 @@</span><br><span> RAII_VAR(struct ast_rtp_payload_type *, payload, NULL, ao2_cleanup);</span><br><span> struct ast_sockaddr remote_address = { {0,} };</span><br><span> struct frame_list frames;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_channel *ast;</span><br><span> </span><br><span> /* If this is actually RTCP let's hop on over and handle it */</span><br><span> if (rtcp) {</span><br><span>@@ -5965,6 +5966,15 @@</span><br><span> return &ast_null_frame;;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ ast = ast_channel_get_by_name(ast_rtp_instance_get_channel_id(instance));</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_format_cap_iscompatible_format(ast_channel_nativeformats(ast),</span><br><span style="color: hsl(120, 100%, 40%);">+ rtp->f.subclass.format) == AST_FORMAT_CMP_NOT_EQUAL) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(1, "Got a frame with format of %s on channel '%s' when it has not been negotiated - seqno=%u\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_format_get_name(rtp->f.subclass.format), ast_channel_name(ast), rtp->f.seqno);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return &ast_null_frame;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> AST_LIST_INSERT_TAIL(&frames, &rtp->f, frame_list);</span><br><span> return AST_LIST_FIRST(&frames);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13846">change 13846</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/+/13846"/><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-Change-Id: I6d854cc523f343e299a615636fc65bdbd5f809ec </div>
<div style="display:none"> Gerrit-Change-Number: 13846 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Paulo Vicentini <paulo.vicentini@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>