<p>Abhay Gupta has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11319">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasis: Hangup channel for Local channel No such extension error<br><br>When we use early bridge with create and dial from stasis using Local channel<br>and the dialplan does not any entry the it is returned from core_local.c with<br>No such extension .<br><br>In such case asterisk locks up till the channel is not hangup with the error<br>Exceptionally long voice queue length<br><br>* Found that in such case app_control_dial fails on ast_call method and<br>  return -1<br>* Since it is called from stasis_app_send_command_async and return -1 does<br>  not cause resources to be freed and since no PBX exist it is not able to<br>  read from channel causing exceptionally long queue<br>* After putting this code found that the channel was releasing immediately<br>  and resources were freed .<br><br>ASTERISK-28399<br>Reported by: Abhay Gupta<br>Tested by: Abhay Gupta<br><br>Change-Id: Id4f73d9fa93d51d3c079e056e4404327898cd2ba<br>---<br>M res/stasis/control.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/11319/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/stasis/control.c b/res/stasis/control.c</span><br><span>index b96b616..2bf3c91 100644</span><br><span>--- a/res/stasis/control.c</span><br><span>+++ b/res/stasis/control.c</span><br><span>@@ -1645,8 +1645,8 @@</span><br><span>   }</span><br><span> </span><br><span>        if (ast_call(chan, args->dialstring, 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         /* Dial fails if no dialplan exist for Local channels and channel needs to hangup */</span><br><span>                 int hangup_flag;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>                 hangup_flag = ast_bridge_setup_after_goto(chan) ? AST_SOFTHANGUP_DEV : AST_SOFTHANGUP_ASYNCGOTO;</span><br><span>                 ast_channel_lock(chan);</span><br><span>                 ast_softhangup_nolock(chan, hangup_flag);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11319">change 11319</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/+/11319"/><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: Id4f73d9fa93d51d3c079e056e4404327898cd2ba </div>
<div style="display:none"> Gerrit-Change-Number: 11319 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Abhay Gupta <abhay@avissol.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>