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.
www.zonetel.com
VOIP/SIP
DID
ASTERISK PBX
VOIP/SIP
DID
ASTERISK PBX
Hi,
ReplyDeleteThanks thats really helps.
Can you please show how you setup your dial plan to check for corresponding variable and if that exist clear it.
Thanks
As an example:
ReplyDeleteexten => ivr-opt1,n,System(asterisk -rx "agent logoff AGENT/${logagent}")
exten => ivr-opt1,n,Playback(agent-loggedoff)
exten => ivr-opt1,n,GotoIf($[ "${AGENTBYCALLERID_${EDITEXT}}" == "" ]?opt6exit:)
exten => ivr-opt1,n,System(asterisk -rx "core set global AGENTBYCALLERID_${EDITEXT} \"\" ")
exten => ivr-opt1,n(opt6exit),GotoIf($[ "${EDITEXT}" == "" ]?s,getext:s,mainmenu)