[Asterisk-code-review] In app_control_dial hangup channel on failure (...asterisk[16])

Abhay Gupta asteriskteam at digium.com
Tue Apr 30 02:47:21 CDT 2019


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


Change subject: In app_control_dial hangup channel on failure
......................................................................

In app_control_dial hangup channel on failure

Change-Id: I15eee0b2701b69403b249d466024db4c962b6f10
---
M res/stasis/control.c
1 file changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/11314/1

diff --git a/res/stasis/control.c b/res/stasis/control.c
index 866b58e..b96b616 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -1645,6 +1645,12 @@
 	}
 
 	if (ast_call(chan, args->dialstring, 0)) {
+		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);
+                ast_channel_unlock(chan);
 		return -1;
 	}
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I15eee0b2701b69403b249d466024db4c962b6f10
Gerrit-Change-Number: 11314
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/2411d98b/attachment.html>


More information about the asterisk-code-review mailing list