<p>Abhay Gupta has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11352">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: I0a55c923fc6995559f808d63b9488762b4489318<br>---<br>M res/stasis/control.c<br>1 file changed, 4 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/52/11352/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 2bf3c91..addf33d 100644</span><br><span>--- a/res/stasis/control.c</span><br><span>+++ b/res/stasis/control.c</span><br><span>@@ -1647,10 +1647,10 @@</span><br><span>       if (ast_call(chan, args->dialstring, 0)) {</span><br><span>                /* 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%);">-                hangup_flag = ast_bridge_setup_after_goto(chan) ? AST_SOFTHANGUP_DEV : AST_SOFTHANGUP_ASYNCGOTO;</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_channel_lock(chan);</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_softhangup_nolock(chan, hangup_flag);</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_channel_unlock(chan);</span><br><span style="color: hsl(120, 100%, 40%);">+             hangup_flag = ast_bridge_setup_after_goto(chan) ? AST_SOFTHANGUP_DEV : AST_SOFTHANGUP_ASYNCGOTO;</span><br><span style="color: hsl(120, 100%, 40%);">+              ast_channel_lock(chan);</span><br><span style="color: hsl(120, 100%, 40%);">+               ast_softhangup_nolock(chan, hangup_flag);</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_channel_unlock(chan);</span><br><span>            return -1;</span><br><span>   }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11352">change 11352</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/+/11352"/><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: I0a55c923fc6995559f808d63b9488762b4489318 </div>
<div style="display:none"> Gerrit-Change-Number: 11352 </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>