[asterisk-commits] mmichelson: trunk r159554 - /trunk/apps/app_dial.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 26 13:57:12 CST 2008
Author: mmichelson
Date: Wed Nov 26 13:57:11 2008
New Revision: 159554
URL: http://svn.digium.com/view/asterisk?view=rev&rev=159554
Log:
Add some necessary hangup commands in the case that forwarding
a call fails
1) Hang up the original destination if the local channel cannot
be requested.
2) Hang up the local channel (in addition to the original destination)
if ast_call fails when calling the newly created local channel.
This prevents channels from sticking around forever in the
case of a botched call forward (e.g. to an extension which does not
exist).
(closes issue #13764)
Reported by: davidw
Patches:
13764_v2.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, davidw
Modified:
trunk/apps/app_dial.c
Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=159554&r1=159553&r2=159554
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Wed Nov 26 13:57:11 2008
@@ -735,6 +735,7 @@
if (!c) {
ast_clear_flag64(o, DIAL_STILLGOING);
handle_cause(cause, num);
+ ast_hangup(original);
} else {
char *new_cid_num, *new_cid_name;
struct ast_channel *src;
@@ -762,6 +763,7 @@
ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan);
ast_clear_flag64(o, DIAL_STILLGOING);
ast_hangup(original);
+ ast_hangup(c);
c = o->chan = NULL;
num->nochan++;
} else {
More information about the asterisk-commits
mailing list