[asterisk-users] Know who's logged in

Mr. James W. Laferriere babydr at baby-dragons.com
Sat Mar 28 01:08:27 CDT 2009


  	Hello Mark ,

On Fri, 27 Mar 2009, Mark Michelson wrote:
> Mr. James W. Laferriere wrote:
>> On Thu, 26 Mar 2009, Mark Michelson wrote:
>>> Miguel Molina wrote:
>>>> 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,
>>>>
>>> There is a CLI command "agent show" which will list all agents. This output will
>>> show the agent's number, name, whether he/she is logged in, and moh class.
>>> Similarly, there is a command "agent show online" which will only list logged-in
>>> agents.
>>> Mark Michelson
>>
>>  	There does not seem to be a 'agent' command in 1.4.2x .
>>
>> asterisk-2*CLI> core show version
>> Asterisk 1.4.21.2 built by root @ asterisk-2 on a i686 running Linux on
>> 2009-01-07 05:57:09 UTC
>>
>> asterisk-2*CLI> agent
>> No such command 'agent' (type 'help agent' for other possible commands)
>>
>>  	And he mentions 1.4.22 .  Now unless I've misconfigured my compile of
>> 1.4 then ...
>>  	Hopefully there is a differant command ?
>>
>>  		Tia ,  JimL
>
> Just typing the word "agent" will result in the message you see. If you press
> the <tab> key after typing the word "agent" you should see that one of your
> options for completing the command is "agent show." This command is definitely
> in all releases of 1.4. I specifically double-checked and the command works fine
>  for me in 1.4.22.
>
> Mark Michelson

asterisk-2*CLI> help agent
No such command 'agent'.

asterisk-2*CLI> agent
No such command 'agent ' (type 'help agent' for other possible commands)

 	Maybe I've mis-configure my compile options or something but ...

 		Tia ,  JimL
-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network&System Engineer | 2133    McCullam Ave |  Give me Linux  |
| babydr at baby-dragons.com | Fairbanks, AK. 99701 |   only  on  AXP |
+------------------------------------------------------------------+



More information about the asterisk-users mailing list