Wednesday, January 26, 2011

AgentLogin vs AgentCallbackLogin

Asterisk call queue provides the mechansim to deliver incoming calls to a group of agents.  Before agent can receive calls, he/she must login the queue.  There are two types of agent login commands: AgentLogin() and AgentCallbackLogin()
Here below shows the differences between these two commands.
Allows agent to tell Asterisk where he is located (ie the extension).  He will be called back by the Queue() application later and there is no need to keep the phone off-hook.
Agent phone is permanently off-hook.  Agent just waits to be called and does not need key press to answer calls.
How agent login
Call AgentCallbackLogin().  Asterisk will ask for agent id, password and extension if these are not provided.  Agent phone is then hangup, waiting to be called back.
Call AgentLogin() and note that agent phone is then off-hook until agent logoff.
How agent receive calls
Agent phone will ring upon incoming call.  
Agent phone is permanently off-hook (online).  When call comes in, agent will hear 'beep' sound and is then connected to the customer.  Agent can press * to dump the call.  One advantage of using AgentLogin() is that agent does not need to operate the handset to answer/hangup calls.
How agent logout
Needs to call again the AgentCallbackLogin().  Asterisk will prompt to logout.
When agent hangups, he is logged out automatically
Customer callerid is not shown when using AgentLogin().  It is available only with AgentCallbackLogin().

Wednesday, January 19, 2011

Agent log off sometimes does not work

Some of our clients are using asterisk 1.4.x and occasionally find that agent logoff could not successfully log off an agent.
asterisk –rvvv
cli> agent logoff agent/xxxx
even the logoff command is executed, calls are still delivered to the agent.
in this situation, we could take a step further to unset the asterisk variable of agent/extension binding.
asterisk –rvvv
CLI>core show globals
then we look for global variables : AGENTBYCALLERID_<ext> = agentid
and clear the corresponding variable as below:
CLI>core set global AGENTBYCALLERID_<ext> ""
We've implemented the above logic in an ivr option for a few call center administrators to force logout agent.