aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 19:58:43 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-26 19:58:43 +0000
commitdd4e6206bdccf222b35fb934d831f0d2937736f8 (patch)
tree8c4b6daa6909371b188919382dea41c985ba6b28
parentae6c9b81a2ec1efff2b197239c25dc7512da2f46 (diff)
Merged revisions 159554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r159554 | mmichelson | 2008-11-26 13:57:11 -0600 (Wed, 26 Nov 2008) | 19 lines 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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@159561 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 89b470d2f..7afd16650 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -527,6 +527,7 @@ static void do_forward(struct chanlist *o,
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;
@@ -554,6 +555,7 @@ static void do_forward(struct chanlist *o,
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 {