summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-02-09 11:01:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-02-10 18:01:54 -0500
commit8936568515d26eba6087a0064fe4d5d6e7f02ddd (patch)
tree9a56c64b9f8040c9384a45ffdb2a429fe21e2800 /apps
parentc7fcc4468ffd54066129a982ff5b0a3cdfa7c5e0 (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')
-rw-r--r--apps/app_originate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_originate.c b/apps/app_originate.c
index 15898b240..eb4d63432 100644
--- a/apps/app_originate.c
+++ b/apps/app_originate.c
@@ -178,15 +178,15 @@ static int originate_exec(struct ast_channel *chan, const char *data)
chantech, chandata, args.arg1, exten, priority);
ast_pbx_outgoing_exten(chantech, cap_slin, chandata,
- timeout * 1000, args.arg1, exten, priority, &outgoing_status, 1, NULL,
- NULL, NULL, NULL, NULL, 0, NULL);
+ timeout * 1000, args.arg1, exten, priority, &outgoing_status,
+ AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, 0, NULL);
} 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(chantech, cap_slin, chandata,
- timeout * 1000, args.arg1, args.arg2, &outgoing_status, 1, NULL,
- NULL, NULL, NULL, NULL, NULL);
+ timeout * 1000, args.arg1, args.arg2, &outgoing_status,
+ AST_OUTGOING_WAIT, NULL, NULL, NULL, NULL, NULL, NULL);
} else {
ast_log(LOG_ERROR, "Incorrect type, it should be 'exten' or 'app': %s\n",
args.type);