[Asterisk-code-review] stasis: Hangup channel for Local channel No such extension error (...asterisk[16])

Abhay Gupta asteriskteam at digium.com
Tue Apr 30 05:52:49 CDT 2019


Abhay Gupta has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11319


Change subject: stasis: Hangup channel for Local channel No such extension error
......................................................................

stasis: Hangup channel for Local channel No such extension error

When we use early bridge with create and dial from stasis using Local channel
and the dialplan does not any entry the it is returned from core_local.c with
No such extension .

In such case asterisk locks up till the channel is not hangup with the error
Exceptionally long voice queue length

* Found that in such case app_control_dial fails on ast_call method and
  return -1
* Since it is called from stasis_app_send_command_async and return -1 does
  not cause resources to be freed and since no PBX exist it is not able to
  read from channel causing exceptionally long queue
* After putting this code found that the channel was releasing immediately
  and resources were freed .

ASTERISK-28399
Reported by: Abhay Gupta
Tested by: Abhay Gupta

Change-Id: Id4f73d9fa93d51d3c079e056e4404327898cd2ba
---
M res/stasis/control.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/11319/1

diff --git a/res/stasis/control.c b/res/stasis/control.c
index b96b616..2bf3c91 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -1645,8 +1645,8 @@
 	}
 
 	if (ast_call(chan, args->dialstring, 0)) {
+		/* Dial fails if no dialplan exist for Local channels and channel needs to hangup */
 		int hangup_flag;
-
                 hangup_flag = ast_bridge_setup_after_goto(chan) ? AST_SOFTHANGUP_DEV : AST_SOFTHANGUP_ASYNCGOTO;
                 ast_channel_lock(chan);
                 ast_softhangup_nolock(chan, hangup_flag);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11319
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id4f73d9fa93d51d3c079e056e4404327898cd2ba
Gerrit-Change-Number: 11319
Gerrit-PatchSet: 1
Gerrit-Owner: Abhay Gupta <abhay at avissol.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190430/261792ca/attachment.html>


More information about the asterisk-code-review mailing list