aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-13 21:20:18 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-13 21:20:18 +0000
commit26fb5b70b18e1e69a878c7ddd90417520b74535e (patch)
tree3978031a6fc9049413d614d7e9beedef0c00c280 /apps/app_dial.c
parent7a0dc4a8d98477fbabc9802ae936afa227b9672d (diff)
Inherit the context and extension until the channel is answered
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45109 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 27eb2b0aa..95bbc4dc0 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -455,6 +455,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
OPT_CALLEE_PARK | OPT_CALLER_PARK |
DIAL_NOFORWARDHTML);
+ ast_copy_string(c->context, "", sizeof(c->context));
+ ast_copy_string(c->exten, "", sizeof(c->exten));
}
continue;
}
@@ -574,6 +576,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
OPT_CALLEE_PARK | OPT_CALLER_PARK |
DIAL_NOFORWARDHTML);
+ ast_copy_string(c->context, "", sizeof(c->context));
+ ast_copy_string(c->exten, "", sizeof(c->exten));
/* Setup early bridge if appropriate */
ast_channel_early_bridge(in, peer);
}
@@ -1169,6 +1173,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (outbound_group)
ast_app_group_set_channel(tmp->chan, outbound_group);
+ /* Inherit context and extension */
+ ast_copy_string(tmp->chan->context, chan->context, sizeof(tmp->chan->context));
+ ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
+
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, numsubst, 0);