<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15364">View Change</a></p><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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/64/15364/1</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 32959b0..23b22e8 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/+/15364">change 15364</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/+/15364"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9 </div>
<div style="display:none"> Gerrit-Change-Number: 15364 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>