Summary:ASTERISK-09792: Requesting action=Agents throught http manager interface doesn't return correct talkingto values when agent is talking to SIP.
Reporter:Ygor Lemos (ygor)Labels:
Date Opened:2007-07-02 14:12:58Date Closed:2007-10-10 18:36:37
Versions:Frequency of
Environment:Attachments:( 0) agent-talkingtochan.diff
Description:Login a agent in the system.
Call the agent from a SIP extension.
Do a http://SERVER_IP:8088/asterisk/mxml?action=agents
The server returns something like:

<response type="object" id="unknown">
<generic event="Agents" agent="5001" name="YGOR" status="AGENT_ONCALL" loggedinchan="SIP/1201-0825b4a8" loggedintime="1183403043" talkingto=""/>

Notice that talkingto is empty, but I'm currently talking to the extension SIP/1251 and it is supposed to appear on the talkingto field.

Also, I can get the information throught the cli:

*CLI> agent show online
5001         (YGOR) logged in on SIP/1201-0825fc18 talking to SIP/1251-082900e0 (musiconhold is 'default')
1 agents online


Tested on Asterisk 1.4.5 and 1.4.6, in both I get this error.
Comments:By: Jason Parker (jparker) 2007-07-02 14:26:07

It looks like it's using the callerID in this part of the code, but using the name of the bridged channel in the CLI commands.

By: Jason Parker (jparker) 2007-07-02 18:07:59

Please try the attached patch.

We decided that although the manager command is different than the CLI commands, we have to keep them as they are in existing versions.  In svn trunk, we can add this, which adds a TalkingToChan line, which is the same as what you see on the CLI.  If you want this fix in 1.4 locally, you'll have to use this patch would should apply just fine.

By: Jason Parker (jparker) 2007-07-30 14:50:40

Did you get a chance to test this?

By: Digium Subversion (svnbot) 2007-08-06 17:43:01

Repository: asterisk
Revision: 78312

r78312 | qwell | 2007-08-06 17:43:01 -0500 (Mon, 06 Aug 2007) | 5 lines

Add a TalkingToChan to the response of the "agents" manager action.
This is similar to the existing "talking to" that you see what using the "agent show" CLI command.

Closes issue ASTERISK-9792


By: Ygor Lemos (ygor) 2007-10-10 15:40:30

Didn't see the modification yet on or in the Changelogs... any updates?

By: Jason Parker (jparker) 2007-10-10 18:36:36

As I stated before, this would only be added to svn trunk, and not 1.4.