We aren't talking to ourselves; we're talking to someone else.

(closes issue #11771)
 Reported by: msetim
 Patches: 
       ami_agent_talkingto-1.4.diff uploaded by caio1982 (license 22)
 Tested by: caio1982, msetim


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-02-13 06:25:03 +00:00
parent 3e014ecd0b
commit e049bdfcfa

View File

@@ -1495,7 +1495,11 @@ static int action_agents(struct mansession *s, const struct message *m)
} else if (p->chan) {
loginChan = ast_strdupa(p->chan->name);
if (p->owner && p->owner->_bridge) {
talkingtoChan = p->chan->cid.cid_num;
if (ast_bridged_channel(p->owner)) {
talkingtoChan = ast_strdupa(ast_bridged_channel(p->owner)->cid.cid_num);
} else {
talkingtoChan = "n/a";
}
status = "AGENT_ONCALL";
} else {
talkingtoChan = "n/a";