summaryrefslogtreecommitdiff
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-07-03 04:25:21 +0000
committerRussell Bryant <russell@russellbryant.com>2006-07-03 04:25:21 +0000
commit73e8e2ab1fae6c7a83fd98b7997440631b39c912 (patch)
tree9e29310d1f0916eaa0b2301492a9ed5f1c5e093a /channels/chan_agent.c
parent03a277c5cc64577060d1e614a8e91dc1a30cd089 (diff)
Blocked revisions 36725 via svnmerge
........ r36725 | russell | 2006-07-03 00:19:09 -0400 (Mon, 03 Jul 2006) | 4 lines use ast_set_callerid to be more consistent and to make sure that the "callerid" option in the conf files is always handled the same way and sets ANI (issue #7285, gkloepfer) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index a95c638c6..2e26d7c1c 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -640,12 +640,8 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
/* Call on this agent */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "outgoing agentcall, to agent '%s', on '%s'\n", p->agent, p->chan->name);
- if (p->chan->cid.cid_num)
- free(p->chan->cid.cid_num);
- p->chan->cid.cid_num = ast_strdup(ast->cid.cid_num);
- if (p->chan->cid.cid_name)
- free(p->chan->cid.cid_name);
- p->chan->cid.cid_name = ast_strdup(ast->cid.cid_name);
+ ast_set_callerid(p->chan,
+ ast->cid.cid_num, ast->cid.cid_name, NULL);
ast_channel_inherit_variables(ast, p->chan);
res = ast_call(p->chan, p->loginchan, 0);
CLEANUP(ast,p);