[asterisk-users] Know who's logged in

Miguel Molina mmolina at millenium.com.co
Thu Mar 26 18:27:37 CDT 2009


Hi all,

For those of you people that use Agents (with Agentlogin, not 
AgentCallbackLogin) on a call center, I have this need: when the agent 
logs in, a channel keeps running all the time that the agent is logged 
in to receive the incoming calls. How do I know which agent logged in 
(code)? Right now, if I query the login channel, there is no information 
about which agent is logged on:

# asterisk -rx "show channel SIP/303-b2f1c368"
 -- General --
           Name: SIP/303-b2f1c368
           Type: SIP
       UniqueID: 1238094839.425549
      Caller ID: 303
 Caller ID Name: Ext. 303
    DNID Digits: 7700
          State: Up (6)
          Rings: 0
  NativeFormats: 0x2 (gsm)
    WriteFormat: 0x2 (gsm)
     ReadFormat: 0x2 (gsm)
 WriteTranscode: No
  ReadTranscode: No
1st File Descriptor: 111
      Frames in: 6199
     Frames out: 4847
 Time to Hangup: 0
   Elapsed Time: 3h29m16s
  Direct Bridge: <none>
Indirect Bridge: <none>
 --   PBX   --
        Context: XXXXXXXXXXX
      Extension: XXXXX
       Priority: XXXXXX
     Call Group: 0
   Pickup Group: 0
    Application: AgentLogin
           Data: (Empty)
    Blocking in: ast_waitfor_nandfds
      Variables:
AVAILSTATUS=0
AVAILORIGCHAN=SIP/303
AVAILCHAN=SIP/303-0949f890
SIPCALLID=Y2MzOTc0NmExYjVkNDNjMzhhY2I1MDMwNTk0NTJkYzQ.
SIPUSERAGENT=X-Lite release 1100l stamp 47546
SIPDOMAIN=XXXXXXXXX
SIPURI=sip:303 at XXXXXXXXXXXXXXXXX

  CDR Variables:
level 1: clid="Ext. 303" <303>
level 1: src=303
level 1: dst=XXXXXXXXXX
level 1: dcontext=XXXXXXXXXXX
level 1: channel=SIP/303-b2f1c368
level 1: lastapp=AgentLogin
level 1: start=2009-03-26 14:13:59
level 1: answer=2009-03-26 14:13:59
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1238094839.425549

Is there an option for Agentlogin() to set a channel variable on the 
login channel that contains the code of the agent that successfully 
logged in? If not, would this be hard to accomplish by tweaking the 
chan_agent.c code to do that? It would be a really nice feature. I'm 
using asterisk 1.4.22.

Thanks for any clue on this,

-- 
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
PBX: (+57 1)6500800 ext. 1201
Fax: (+57 1)6500816
Móvil: (+57)3138873587 




More information about the asterisk-users mailing list