Hi,
I am currently using FreePBX 2.4.1.0 to run a Callcenter with multiple queues and agents and queue module version 2.4.0.9.
I have migrated from Asterisk 1.2.x to 1.4.x. (moving from Trixbox to Elastix 1.2 distro) First I started with 1.4.19 from the Elastix 1.2 distro. Then I upgraded via yum to latest Elastix which updated asterisk to 1.4.21.
The problem I have (with both versions) is that agents log into the queues and they receive calls normally but after some time (5 days, 2 weeks, ans now hours), the system starts to behave erratically in which it reports agents on call that are not on call, agents that show logged in when they are logged off, agents logged in not receiving calls. Some of this can be fixed with “agent logoff” commands and sometime performing a “soft hangup”.
Since I upgraded from Asterisk 2.4.19 to 2.4.21, the system started to fail after several hours of being resetted (restart of asterisk). I have found that when Asterisk starts to fail, you can not complete commands on with the tab key on the CLI (command line interface). Some times, if you enter for example “sip show peers” after pressing enter, nothing is being showed and it return to the CLI command line prompt. At this time, external AMI applications can’t connect to Asterisk (sometimes) and even FreePBX won’t load it’s web interface due to the fact it can’t connect to the manager interface. The only solution, reboot which will drop calls in progress and customers currently on queue.
The only thing possible is to kill and restart. Some time, doing a ps axu you will find a defunct asterisk process.
Following, I will show you the code I have written in dial plan and other useful info that my users use to log in/log out of the queues to see if this has something that can cause problems.
Other questions:
Should we try to upgrade to version 2.5 of FreePBX ? Will this fix and/or possibly improve things with the updated queue module ?
I understand that the AgentCallBackLogin is deprecated in Asterisk 1.4 and will be removed in 1.6 in favor of dialplan logic in (AEL) that can handle the functionality of queues.
My question is if AgentCallBackLogin broken on Asterisk 1.4 ? Can this version cause this kind of trouble ? Should we fix our dialplan and implement the AEL stuff eliminating the AgentCallBackLogin so that crash and/or hanged calls, failure to login, etc, could be prevented ?
One other important thing to mention is that I have a webpage that uses the AMI events to show which agents are taking calls, which agents are online/off line, the amount of customers waiting on each queue, etc. This is being refreshed every 5 seconds through a PHP script and I normally have between 2 to 5 users hitting this application directly to Asterisk AMI without a AMI proxy. Could this simultaneous connection to AMI be able t break Asterisk due to the amount of requests being served over standard AMI ?
My queues are numbered from 600 to 605 and I have overriden the 60X* and 60X** login/logout script provided by FreePBX so our users could login as agents and onto a queue at the same time. All our agents are defined without passwords so dialing 601* will log them onto queue 601 and at the same time log them as agent/xxxx. After dialing 601*, the system will prompt for agent num and after login in the agent, will logged him in the dial queue.
An example from agents.conf
[agents]
persistentagents=yes
recordagentcalls=yes
wrapuptime=5000
recordformat=gsm
ackcall=no
group=1
agent => 001,Jeanine Araujo
agent => 002,Jesus Velasquez
En of Example from agents.conf
queues.conf
[general]
persistentmembers = yes
autofill=yes
[default]
#include queues_custom.conf
#include queues_additional.conf
#include queues_post_custom.conf
end of queues.conf
queues_additional.conf example of queue 601
[603]
announce-frequency=0
announce-holdtime=no
eventmemberstatus=no
eventwhencalled=yes
joinempty=yes
leavewhenempty=no
maxlen=0
monitor-type=mixmonitor
monitor-format=gsm
music=default
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
retry=5
strategy=leastrecent
timeout=15
wrapuptime=0
extensions_override_freepbx.conf
[agent-login]
exten => 600*,1,Macro(login-agent-queue,600)
exten => 600**,1,Macro(logout-agent-queue,600)
exten => 601*,1,Macro(login-agent-queue,601)
exten => 601**,1,Macro(logout-agent-queue,601)
extensions_custom.conf
; ARG1 queue number to log into, agent number will be asked by IVR, see below.
[macro-login-agent-queue]
exten => s,1,Answer
exten => s,n,set(play=1) ;Inicialmente hacemos play del mensaje final
exten => s,n,Read(agentNum|agent-user|5||3|5) ; get callback number from user
exten => s,n,NoOp(Logeando a agentNum=[${agentNum}] callerid=[${CALLERID(NUM)}] status agente=[${AGENT(${agentNum})}])
;Asterisk 1.2 exten => s,n,AgentCallbackLogin(${agentNum}||${CALLERID(NUM)}@local)
exten => s,n,GotoIf($["${AGENT(${agentNum})}" = “LOGGEDOUT”]?agentLogin:addQueue)
exten => s,n(agentLogin),set(play=0)
exten => s,n,AgentCallbackLogin(${agentNum}||${CALLERID(NUM)})
exten => s,n(addQueue),AddQueueMember(${ARG1},Agent/${agentNum})
exten => s,n,UserEvent(Agentlogin,Agent: Agent/${agentNum}))
exten => s,n,GotoIf($[${play} = 1]?play)
exten => s,n,Hangup()
exten => s,n(play),playback(agent-loginok)
exten => s,n,hangup
[macro-logout-agent-queue]
exten => s,1,Answer
exten => s,n,Read(agentNum|agent-user|5||3|5) ; get callback number from user
exten => s,n,RemoveQueueMember(${ARG1},Agent/${agentNum})
exten => s,n,AgentCallbackLogin(${agentNum}||)
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Hangup()
Any comment or help is greatly appreciated.
Best regards.
Andres Maduro