aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-14 20:42:25 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-14 20:42:25 +0000
commit3fc4ad33c74c93faccdaee240e82531325aa191f (patch)
treea8964025951e79ae8fcd11bee7bb84c9f9f4a279
parentc08fc582ac76ded4db1b512537251b79323a6d47 (diff)
Send callerid on callback agents (bug #103)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1329 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_agent.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 3a67573e5..5db7ded73 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -375,6 +375,12 @@ 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->callerid)
+ free(p->chan->callerid);
+ if (ast->callerid)
+ p->chan->callerid = strdup(ast->callerid);
+ else
+ p->chan->callerid = NULL;
res = ast_call(p->chan, p->loginchan, 0);
CLEANUP(ast,p);
ast_mutex_unlock(&p->lock);