diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-13 07:11:16 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-13 07:11:16 -0600 |
commit | f9f74f4b7568d9b40d35740683041891d1d33b00 (patch) | |
tree | 2a248d6cd4ceaa9494d3d281daa1768c9bd8b23a /main | |
parent | 7e2bbe30fb637d336df7c846a8c9b4dbb9cae6a3 (diff) | |
parent | 0910773077f065a45e975c1a5914be084d9a4bdc (diff) |
Merge "manager: Restore Originate failure behavior from Asterisk 11"
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 15 | ||||
-rw-r--r-- | main/pbx.c | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c index dfe056438..a25497fd3 100644 --- a/main/manager.c +++ b/main/manager.c @@ -5130,13 +5130,15 @@ static void *fast_originate(void *data) if (!ast_strlen_zero(in->app)) { res = ast_pbx_outgoing_app(in->tech, in->cap, in->data, - in->timeout, in->app, in->appdata, &reason, 1, + in->timeout, in->app, in->appdata, &reason, + AST_OUTGOING_WAIT, S_OR(in->cid_num, NULL), S_OR(in->cid_name, NULL), in->vars, in->account, &chan, &assignedids); } else { res = ast_pbx_outgoing_exten(in->tech, in->cap, in->data, - in->timeout, in->context, in->exten, in->priority, &reason, 1, + in->timeout, in->context, in->exten, in->priority, &reason, + AST_OUTGOING_WAIT, S_OR(in->cid_num, NULL), S_OR(in->cid_name, NULL), in->vars, in->account, &chan, in->early_media, &assignedids); @@ -5607,11 +5609,16 @@ static int action_originate(struct mansession *s, const struct message *m) } } } else if (!ast_strlen_zero(app)) { - res = ast_pbx_outgoing_app(tech, cap, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL, assignedids.uniqueid ? &assignedids : NULL); + res = ast_pbx_outgoing_app(tech, cap, data, to, app, appdata, &reason, + AST_OUTGOING_WAIT, l, n, vars, account, NULL, + assignedids.uniqueid ? &assignedids : NULL); ast_variables_destroy(vars); } else { if (exten && context && pi) { - res = ast_pbx_outgoing_exten(tech, cap, data, to, context, exten, pi, &reason, 1, l, n, vars, account, NULL, bridge_early, assignedids.uniqueid ? &assignedids : NULL); + res = ast_pbx_outgoing_exten(tech, cap, data, to, + context, exten, pi, &reason, AST_OUTGOING_WAIT, + l, n, vars, account, NULL, bridge_early, + assignedids.uniqueid ? &assignedids : NULL); ast_variables_destroy(vars); } else { astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'"); diff --git a/main/pbx.c b/main/pbx.c index 3e35a3a14..47e0b0eda 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -7876,7 +7876,7 @@ int ast_pbx_outgoing_exten_predial(const char *type, struct ast_format_cap *cap, early_media, assignedids, predial_callee); if (res < 0 /* Call failed to get connected for some reason. */ - && 1 < synchronous + && 0 < synchronous && ast_exists_extension(NULL, context, "failed", 1, NULL)) { struct ast_channel *failed; |