diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-02-09 11:01:22 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-02-10 18:04:41 -0500 |
commit | 0910773077f065a45e975c1a5914be084d9a4bdc (patch) | |
tree | 335307320333b40d3b548a2435e67cd4a506fa69 /apps/app_originate.c | |
parent | 648d181d2fb62284eb7a2284221b48240a0e876e (diff) |
manager: Restore Originate failure behavior from Asterisk 11
In Asterisk 11, if the 'Originate' AMI command failed to connect the provided
Channel while in extension mode, a 'failed' extension would be looked up and
run. This was, I believe, unintentionally removed in 51b6c49. This patch
restores that behavior.
This also adds an enum for the various 'synchronous' modes in an attempt to
make them meaningful.
ASTERISK-26115 #close
Reported by: Nasir Iqbal
Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
Diffstat (limited to 'apps/app_originate.c')
-rw-r--r-- | apps/app_originate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/app_originate.c b/apps/app_originate.c index cf4ef8ef3..8edccc720 100644 --- a/apps/app_originate.c +++ b/apps/app_originate.c @@ -242,15 +242,17 @@ static int originate_exec(struct ast_channel *chan, const char *data) chantech, chandata, args.arg1, exten, priority); ast_pbx_outgoing_exten_predial(chantech, cap_slin, chandata, - timeout * 1000, args.arg1, exten, priority, &outgoing_status, 1, NULL, - NULL, NULL, NULL, NULL, 0, NULL, predial_callee); + timeout * 1000, args.arg1, exten, priority, &outgoing_status, + AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, 0, NULL, + predial_callee); } else if (!strcasecmp(args.type, "app")) { ast_debug(1, "Originating call to '%s/%s' and connecting them to %s(%s)\n", chantech, chandata, args.arg1, S_OR(args.arg2, "")); ast_pbx_outgoing_app_predial(chantech, cap_slin, chandata, - timeout * 1000, args.arg1, args.arg2, &outgoing_status, 1, NULL, - NULL, NULL, NULL, NULL, NULL, predial_callee); + timeout * 1000, args.arg1, args.arg2, &outgoing_status, + AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, NULL, + predial_callee); } else { ast_log(LOG_ERROR, "Incorrect type, it should be 'exten' or 'app': %s\n", args.type); |