diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-25 10:08:04 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-12-25 10:08:04 +0000 |
commit | ac87fc136db80a11ee458dc8c597a820d74bfdbd (patch) | |
tree | 9e80b6b6bb170a3ab86b567882cb39c9571610f8 | |
parent | 2f79916fa88d48c920155a4117e8ad46785da74c (diff) |
Merged revisions 299626 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r299626 | tilghman | 2010-12-25 04:07:15 -0600 (Sat, 25 Dec 2010) | 19 lines
Merged revisions 299625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r299625 | tilghman | 2010-12-25 04:05:00 -0600 (Sat, 25 Dec 2010) | 12 lines
Merged revisions 299624 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r299624 | tilghman | 2010-12-25 04:04:06 -0600 (Sat, 25 Dec 2010) | 5 lines
Move check for extension existence below variable inheritance, due to the possible use of an eswitch.
(closes issue #16228)
Reported by: jlaguilar
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_local.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 9c90d0f06..f224140c7 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -795,15 +795,6 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) ast_channel_cc_params_init(p->chan, ast_channel_get_cc_config_params(p->owner)); - if (!ast_exists_extension(NULL, p->chan->context, p->chan->exten, 1, - S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL))) { - ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context); - ao2_unlock(p); - ast_channel_unlock(p->chan); - ao2_ref(p, -1); - return -1; - } - /* Make sure we inherit the ANSWERED_ELSEWHERE flag if it's set on the queue/dial call request in the dialplan */ if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) { ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE); @@ -830,6 +821,15 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout) } ast_set_cc_interfaces_chanvar(p->chan, reduced_dest); + if (!ast_exists_extension(p->chan, p->chan->context, p->chan->exten, 1, + S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL))) { + ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context); + ao2_unlock(p); + ast_channel_unlock(p->chan); + ao2_ref(p, -1); + return -1; + } + /* Start switch on sub channel */ if (!(res = ast_pbx_start(p->chan))) ast_set_flag(p, LOCAL_LAUNCHED_PBX); |