aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-25 10:05:00 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-25 10:05:00 +0000
commit74946827a6000d73d41f1710d31e84d29005af96 (patch)
treec44ab4befb0288ef4c7a8750aabe49593a75b969
parentf5dbea9655529cde2dc75b4ec520db80293fff42 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.6.2@299625 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_local.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 778654a1a..9181af08d 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -688,12 +688,6 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout)
ast_cdr_update(p->chan);
p->chan->cdrflags = p->owner->cdrflags;
- if (!ast_exists_extension(NULL, p->chan->context, p->chan->exten, 1, p->owner->cid.cid_num)) {
- ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context);
- ao2_unlock(p);
- 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);
@@ -712,6 +706,12 @@ static int local_call(struct ast_channel *ast, char *dest, int timeout)
}
ast_channel_datastore_inherit(p->owner, p->chan);
+ if (!ast_exists_extension(p->chan, p->chan->context, p->chan->exten, 1, p->owner->cid.cid_num)) {
+ ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context);
+ ao2_unlock(p);
+ return -1;
+ }
+
/* Start switch on sub channel */
if (!(res = ast_pbx_start(p->chan)))
ast_set_flag(p, LOCAL_LAUNCHED_PBX);