aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-16 07:58:51 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-16 07:58:51 +0000
commit30c193ce7dfe9e890b20f2d11114027032973b61 (patch)
treed8a5b1427f11faa7184ae615fa3066c021f55529 /apps
parent39a13656f91bd578b34e1296245d6ccc16d466b3 (diff)
Give outbound channels callerid of their extension *after* calling (bug #2489)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4810 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 0cbc302b6..2828262b7 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -336,6 +336,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_hangup(o->chan);
o->chan = NULL;
numnochan++;
+ } else {
+ /* After calling, set callerid to extension */
+ ast_set_callerid(o->chan, ast_strlen_zero(in->macroexten) ? in->exten : in->macroexten, NULL, NULL);
}
}
/* Hangup the original channel now, in case we needed it */
@@ -912,9 +915,11 @@ static int dial_exec(struct ast_channel *chan, void *data)
tmp->chan = NULL;
cur = rest;
continue;
- } else
+ } else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", numsubst);
+ ast_set_callerid(tmp->chan, ast_strlen_zero(chan->macroexten) ? chan->exten : chan->macroexten, NULL, NULL);
+ }
/* Put them in the list of outgoing thingies... We're ready now.
XXX If we're forcibly removed, these outgoing calls won't get
hung up XXX */