<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15365">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: SDP: Reject audio streams correctly.<br><br>This completes the fix for ASTERISK_24543. Only when the call is an<br>outgoing call, consult and append the configured format capabilities<br>(p->caps). When all audio formats got rejected the negotiated format<br>capabilities (p->jointcaps) contain no audio formats for incoming<br>calls. This is required when there are other accepted media streams.<br><br>ASTERISK-29258<br><br>Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9<br>---<br>M channels/chan_sip.c<br>1 file changed, 5 insertions(+), 4 deletions(-)<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 ca0f7bf..1c9c729 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -13607,10 +13607,11 @@</span><br><span> ast_format_cap_append_from_cap(tmpcap, p->jointcaps, AST_MEDIA_TYPE_UNKNOWN);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Check if we need audio */</span><br><span style="color: hsl(0, 100%, 40%);">- if (ast_format_cap_has_type(tmpcap, AST_MEDIA_TYPE_AUDIO)</span><br><span style="color: hsl(0, 100%, 40%);">- || ast_format_cap_has_type(p->caps, AST_MEDIA_TYPE_AUDIO)) {</span><br><span style="color: hsl(0, 100%, 40%);">- needaudio = TRUE;</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Check if we need audio in this call */</span><br><span style="color: hsl(120, 100%, 40%);">+ needaudio = ast_format_cap_has_type(tmpcap, AST_MEDIA_TYPE_AUDIO);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!needaudio && p->outgoing_call) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* p->caps are added conditionally, see below "Finally our remain..." */</span><br><span style="color: hsl(120, 100%, 40%);">+ needaudio = ast_format_cap_has_type(p->caps, AST_MEDIA_TYPE_AUDIO);</span><br><span> }</span><br><span> </span><br><span> /* Check if we need video in this call */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15365">change 15365</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/+/15365"/><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-Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9 </div>
<div style="display:none"> Gerrit-Change-Number: 15365 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.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: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>