summaryrefslogtreecommitdiff
path: root/apps/app_parkandannounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_parkandannounce.c')
-rw-r--r--apps/app_parkandannounce.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index 4ae525101..5bb8b6594 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -126,10 +126,13 @@ static int parkandannounce_exec(struct ast_channel *chan, const char *data)
ast_parseable_goto(chan, args.return_context);
}
- ast_verb(3, "Return Context: (%s,%s,%d) ID: %s\n", chan->context, chan->exten, chan->priority, chan->cid.cid_num);
- if (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
+ ast_verb(3, "Return Context: (%s,%s,%d) ID: %s\n", chan->context, chan->exten,
+ chan->priority,
+ S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, ""));
+ if (!ast_exists_extension(chan, chan->context, chan->exten, chan->priority,
+ S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
ast_verb(3, "Warning: Return Context Invalid, call will return to default|s\n");
- }
+ }
/* we are using masq_park here to protect * from touching the channel once we park it. If the channel comes out of timeout
before we are done announcing and the channel is messed with, Kablooeee. So we use Masq to prevent this. */
@@ -145,8 +148,11 @@ static int parkandannounce_exec(struct ast_channel *chan, const char *data)
snprintf(buf, sizeof(buf), "%d", lot);
oh.parent_channel = chan;
oh.vars = ast_variable_new("_PARKEDAT", buf, "");
- dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, chan, args.dial, 30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
-
+ dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, chan, args.dial, 30000,
+ &outstate,
+ S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL),
+ S_COR(chan->caller.id.name.valid, chan->caller.id.name.str, NULL),
+ &oh);
if (dchan) {
if (dchan->_state == AST_STATE_UP) {
ast_verb(4, "Channel %s was answered.\n", dchan->name);