mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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/branches/1.2@36725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -661,18 +661,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);
|
||||
if (ast->cid.cid_num)
|
||||
p->chan->cid.cid_num = strdup(ast->cid.cid_num);
|
||||
else
|
||||
p->chan->cid.cid_num = NULL;
|
||||
if (p->chan->cid.cid_name)
|
||||
free(p->chan->cid.cid_name);
|
||||
if (ast->cid.cid_name)
|
||||
p->chan->cid.cid_name = strdup(ast->cid.cid_name);
|
||||
else
|
||||
p->chan->cid.cid_name = NULL;
|
||||
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);
|
||||
|
Reference in New Issue
Block a user