Hello,
first of all, allow me to thank you for the great product you've provided.
However, we have a slight problem using new version of FOP2 with our dynamic agents login/logout script. Script is supposed to log in user to device (deviceandusermode enabled in freepbx) and add agent to the queues. Most of the time everything works perfectly - only sometimes, when agent logs out of the queue, the agent's button in FOP2 stays busy forever. Line on the physical phone is not busy, user can login and logout again, he can take calls, reseting the phone doesn't help either. Problem goes away if i restart fop2 service.
Screenshot:
http://www.grom.si/download/annoyance.jpg
We're using:
- Asterisk 1.4.40
- Freepbx 2.8.1.4
- Fop2 2.20
- I've added custom dialplans to extensions_override_freepbx.conf
Dialplan for logging in /out users to device and adding / removing agents from the queues:
[macro-agent-management-sso]
exten => s,1,Wait(1)
exten => s,n,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)})
exten => s,n,Set(CID=${CALLERID(number)})
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n,Set(CALLBACKNUM=${CALLERID(number)})
exten => s,n,Set(AGENT_IP=${SIPCHANINFO(peerip)})
exten => s,n,NoOp(${AGENT_IP})
exten => s,n,GoToIf($[${DB_EXISTS(agent_location/${CID})}]?go)
exten => s,n(get_user),Read(PROMPT,agent-user,8);
exten => s,n,Set(CALLBACKNUM=${PROMPT})
exten => s,n,Set(DB(agent_location/${CID})=${PROMPT})
exten => s,n,Set(CALLBACKNUM=${DB(agent_location/${CID})})
exten => s,n(go),AGI(agent.pl)
exten => s,n,GotoIf($["${AGENT_ACTION}" = "logout"]?logout)
; Login
exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
exten => s,n,AGI(user_login_out.agi,login,${CALLERID(number)},${CALLBACKNUM})
exten => s,n,System(/var/lib/asterisk/agi-bin/notify.pl ${CID} ${AGENT_IP} ${AGENT_ACTION})
exten => s,n,Playback(agent-loginok)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Goto(end)
; Logout
exten => s,n(logout),UserEvent(RefreshQueue)
exten => s,n,NoOp("Before Execif")
;exten => s,n,ExecIf(${DB_EXISTS(agent_location/${CID})}?Set,CALLBACKNUM=${DB_DELETE(agent_location/${CID})})
exten => s,n,Set(CALLBACKNUM=${DB_DELETE(agent_location/${CID})})
exten => s,n,NoOp("After Execif/ Before AGI")
exten => s,n,AGI(user_login_out.agi|logout|${CID})
exten => s,n,NoOp("After AGI")
exten => s,n,System(/var/lib/asterisk/agi-bin/notify.pl ${CID} ${AGENT_IP} ${AGENT_ACTION})
exten => s,n,Playback(agent-loggedoff)
exten => s,n(end),Hangup
exten => s,n,MacroExit()
I set up fop2 using fop2 module in freepbx. Can anyone see something obviously wrong?
Thanks for your help
Andrej