aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-05 21:18:28 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-05 21:18:28 +0000
commitb2797a2cb526b828f09c9cb77f8e2c0fb6c24987 (patch)
tree7c8c9db783eb6fc2e0a3d41f4f4df29b0b1c2660 /apps/app_dial.c
parent68f10b8d5bc0ae65d82e64c475563f1c460401eb (diff)
properly report hangupcause when ast_request() fails for the last (or only) target of a dial operation (issue #5394, different fix)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6735 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rwxr-xr-xapps/app_dial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index e25f2d6da..ac579fe94 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1109,6 +1109,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n", tech, cause, ast_cause2str(cause));
HANDLE_CAUSE(cause, chan);
cur = rest;
+ if (!cur)
+ chan->hangupcause = cause;
continue;
}
pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);