AGENT()

AGENT(agentNumber[:field])

Returns information about an agent identified by agentNumber. The following fields may be queried:

status
(default) The status of the agent, either LOGGEDIN or LOGGEDOUT
password
The agent's password
name
The agent's name
mohclass
The music-on-hold class
exten
The callback extension for the agent. This is used by AgentCallbackLogin().
channel
The name of the agent's active channel (used bt AgentLogin())
; set the variable foo to the name of Agent 42:
exten => 123,1,Set(foo=${AGENT(42:name)})
[Note]

Internal help for this application in Asterisk 1.4: 

  -= Info about function 'AGENT' =- 

[Syntax]
AGENT(<agentid>[:item])

[Synopsis]
Gets information about an Agent

[Description]
The valid items to retrieve are:
- status (default)      The status of the agent
                          LOGGEDIN | LOGGEDOUT
- password              The password of the agent
- name                  The name of the agent
- mohclass              MusicOnHold class
- exten                 The callback extension for the Agent (AgentCallb
ackLogin)
- channel               The name of the active channel for the Agent (Ag
entLogin)

diff output to internal help in Asterisk 1.2: 

-- not available in Version 1.2 --