<p>Benjamin Keith Ford <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11551">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: Handle invalid SDP answer to T.38 re-invite<br><br>The chan_sip module performs a T.38 re-invite using a single media<br>stream of udptl, and expects the SDP answer to be the same.<br><br>If an SDP answer is received instead that contains an additional<br>media stream with no joint codec a crash will occur as the code<br>assumes that at least one joint codec will exist in this<br>scenario.<br><br>This change removes this assumption.<br><br>ASTERISK-28465<br><br>Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87<br>---<br>M channels/chan_sip.c<br>1 file changed, 7 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index 0f64309..f154f59 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -10910,7 +10910,13 @@</span><br><span> ast_rtp_lookup_mime_multiple2(s3, NULL, newnoncodeccapability, 0, 0));</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (portno != -1 || vportno != -1 || tportno != -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* When UDPTL is negotiated it is expected that there are no compatible codecs as audio or</span><br><span style="color: hsl(120, 100%, 40%);">+ * video is not being transported, thus we continue in this function further up if that is</span><br><span style="color: hsl(120, 100%, 40%);">+ * the case. If we receive an SDP answer containing both a UDPTL stream and another media</span><br><span style="color: hsl(120, 100%, 40%);">+ * stream however we need to check again to ensure that there is at least one joint codec</span><br><span style="color: hsl(120, 100%, 40%);">+ * instead of assuming there is one.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((portno != -1 || vportno != -1 || tportno != -1) && ast_format_cap_count(newjointcapability)) {</span><br><span> /* We are now ready to change the sip session and RTP structures with the offered codecs, since</span><br><span> they are acceptable */</span><br><span> unsigned int framing;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11551">change 11551</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/+/11551"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/13.21 </div>
<div style="display:none"> Gerrit-Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87 </div>
<div style="display:none"> Gerrit-Change-Number: 11551 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Francesco Castellano <francesco.castellano@messagenet.it> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>