<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15366">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">channel: Set up calls without audio (text+video), again.<br><br>ASTERISK-29259<br><br>Change-Id: Ib6a6550e0e08355745d66da8e60ef49e81f9c6c5<br>---<br>M main/channel.c<br>1 file changed, 10 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/15366/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/channel.c b/main/channel.c</span><br><span>index d75c615..9730ed0 100644</span><br><span>--- a/main/channel.c</span><br><span>+++ b/main/channel.c</span><br><span>@@ -6264,8 +6264,13 @@</span><br><span> </span><br><span> /* find the best audio format to use */</span><br><span> tmp_cap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);</span><br><span style="color: hsl(0, 100%, 40%);">- if (tmp_cap) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_format_cap_append_from_cap(tmp_cap, request_cap, AST_MEDIA_TYPE_AUDIO);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!tmp_cap) {</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_RWLIST_UNLOCK(&backends);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_format_cap_append_from_cap(tmp_cap, request_cap, AST_MEDIA_TYPE_AUDIO);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!ast_format_cap_empty(tmp_cap)) {</span><br><span> /* We have audio - is it possible to connect the various calls to each other?</span><br><span> (Avoid this check for calls without audio, like text+video calls)</span><br><span> */</span><br><span>@@ -6296,7 +6301,9 @@</span><br><span> }</span><br><span> ast_format_cap_append_from_cap(joint_cap, request_cap, AST_MEDIA_TYPE_UNKNOWN);</span><br><span> ast_format_cap_remove_by_type(joint_cap, AST_MEDIA_TYPE_AUDIO);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_format_cap_append(joint_cap, best_audio_fmt, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (best_audio_fmt) { /* text+video call? then, this is NULL */</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_format_cap_append(joint_cap, best_audio_fmt, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> ao2_cleanup(tmp_converted_cap);</span><br><span> </span><br><span> c = chan->tech->requester(type, joint_cap, assignedids, requestor, addr, cause);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15366">change 15366</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/+/15366"/><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: Ib6a6550e0e08355745d66da8e60ef49e81f9c6c5 </div>
<div style="display:none"> Gerrit-Change-Number: 15366 </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>