diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-16 17:24:35 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-16 17:24:35 +0000 |
commit | 86c746b5c5821a93e185c8bb6390c830f40f82e2 (patch) | |
tree | adef7750bbeacd24eacdc078378eaf0c6212124f /apps/app_dial.c | |
parent | fae92ab8a71e7b786a946300f4ee5c22cfd6dc1d (diff) |
Backport of new directed pickup (BE-85).
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45246 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index ec8eb6410..8a88e27a6 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -456,6 +456,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; } @@ -575,6 +577,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 RTP early bridge if appropriate */ ast_rtp_early_bridge(in, peer); } @@ -1170,6 +1174,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); |