All but one queue member functions correctly

We have an asterisk system setup with a queue for sales calls. Extensions in the queue are in the 3xx range. All of our queue members receive queue calls, meaning their phones ring when a call comes in, except one 388. I have isolated the part of the debug log that shows clearly there is a problem, however since I was not the person who set the system up I do not know how to fix it.

Debug log excerpt:

== Begin MixMonitor Recording SIP/flowroute-00001fda -- Executing [s@autoattendant:4] Wait("SIP/flowroute-00001fda", "2") in new stack -- Executing [s@autoattendant:5] Read("SIP/flowroute-00001fda", "PRESSED,autoatt/greeting,3,,1,1.5") in new stack -- Accepting a maximum of 3 digits. -- <SIP/flowroute-00001fda> Playing 'autoatt/greeting.ulaw' (language 'en') -- User entered '2' -- Executing [s@autoattendant:6] GotoIf("SIP/flowroute-00001fda", "0?support,s,1") in new stack -- Executing [s@autoattendant:7] GotoIf("SIP/flowroute-00001fda", "1?sales,s,1") in new stack -- Goto (sales,s,1) -- Executing [s@sales:1] Answer("SIP/flowroute-00001fda", "") in new stack -- Executing [s@sales:2] Set("SIP/flowroute-00001fda", "CALLERID(name)=Sales Call") in new stack -- Executing [s@sales:3] GotoIfTime("SIP/flowroute-00001fda", "9:00-18:00,mon-fri,*,*?doit") in new stack -- Goto (sales,s,8) -- Executing [s@sales:8] AGI("SIP/flowroute-00001fda", "queue.pl,1323279010.12342,sales,Entered Queue,0") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- <SIP/flowroute-00001fda>AGI Script queue.pl completed, returning 0 -- Executing [s@sales:9] Playback("SIP/flowroute-00001fda", "pls-hold-while-try") in new stack -- <SIP/flowroute-00001fda> Playing 'pls-hold-while-try.ulaw' (language 'en') -- Executing [s@sales:10] Set("SIP/flowroute-00001fda", "QNAME=sales") in new stack -- Executing [s@sales:11] Set("SIP/flowroute-00001fda", "MONITOR_OPTIONS=aW(2)") in new stack -- Executing [s@sales:12] Queue("SIP/flowroute-00001fda", "sales,t,,,12") in new stack -- Started music on hold, class 'default', on SIP/flowroute-00001fda -- Executing [322@agent:1] NoOp("Local/322@agent-d31f;2", "** calling AGENT - 322 **") in new stack -- Executing [322@agent:2] Set("Local/322@agent-d31f;2", "__AgentID=322") in new stack -- Executing [322@agent:3] Set("Local/322@agent-d31f;2", "GROUP(agents)=322") in new stack -- Executing [322@agent:4] GotoIf("Local/322@agent-d31f;2", "0?busy") in new stack -- Executing [333@agent:1] NoOp("Local/333@agent-4c8b;2", "** calling AGENT - 333 **") in new stack -- Executing [333@agent:2] Set("Local/333@agent-4c8b;2", "__AgentID=333") in new stack -- Executing [333@agent:3] Set("Local/333@agent-4c8b;2", "GROUP(agents)=333") in new stack -- Executing [333@agent:4] GotoIf("Local/333@agent-4c8b;2", "0?busy") in new stack -- Executing [333@agent:5] AGI("Local/333@agent-4c8b;2", "queue.pl,1323279010.12342,,333,10") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- Executing [322@agent:5] AGI("Local/322@agent-d31f;2", "queue.pl,1323279010.12342,,322,10") in new stack -- Executing [316@agent:1] NoOp("Local/316@agent-a9f1;2", "** calling AGENT - 316 **") in new stack -- Executing [316@agent:2] Set("Local/316@agent-a9f1;2", "__AgentID=316") in new stack -- Executing [316@agent:3] Set("Local/316@agent-a9f1;2", "GROUP(agents)=316") in new stack -- Executing [316@agent:4] GotoIf("Local/316@agent-a9f1;2", "0?busy") in new stack -- Executing [316@agent:5] AGI("Local/316@agent-a9f1;2", "queue.pl,1323279010.12342,,316,10") in new stack -- Executing [312@agent:1] NoOp("Local/312@agent-2401;2", "** calling AGENT - 312 **") in new stack -- Executing [312@agent:2] Set("Local/312@agent-2401;2", "__AgentID=312") in new stack -- Executing [312@agent:3] Set("Local/312@agent-2401;2", "GROUP(agents)=312") in new stack -- Executing [312@agent:4] GotoIf("Local/312@agent-2401;2", "0?busy") in new stack -- Executing [312@agent:5] AGI("Local/312@agent-2401;2", "queue.pl,1323279010.12342,,312,10") in new stack -- Executing [311@agent:1] NoOp("Local/311@agent-0d48;2", "** calling AGENT - 311 **") in new stack -- Executing [311@agent:2] Set("Local/311@agent-0d48;2", "__AgentID=311") in new stack -- Executing [311@agent:3] Set("Local/311@agent-0d48;2", "GROUP(agents)=311") in new stack -- Executing [311@agent:4] GotoIf("Local/311@agent-0d48;2", "0?busy") in new stack -- Executing [311@agent:5] AGI("Local/311@agent-0d48;2", "queue.pl,1323279010.12342,,311,10") in new stack -- Executing [388@agent:1] NoOp("Local/388@agent-3dda;2", "** calling AGENT - 388 **") in new stack -- Executing [388@agent:2] Set("Local/388@agent-3dda;2", "__AgentID=388") in new stack -- Executing [388@agent:3] Set("Local/388@agent-3dda;2", "GROUP(agents)=388") in new stack -- Executing [388@agent:4] GotoIf("Local/388@agent-3dda;2", "1?busy") in new stack -- Goto (agent,388,8) [Dec 7 12:30:18] WARNING[30461]: pbx.c:3191 pbx_extension_helper: No application '' for extension (agent, 388, 8) == Spawn extension (agent, 388, 8) exited non-zero on 'Local/388@agent-3dda;2' -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- Nobody picked up in 0 ms -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- <Local/312@agent-2401;2>AGI Script queue.pl completed, returning 0 -- Executing [312@agent:6] Dial("Local/312@agent-2401;2", "SIP/312,,tM(updateagent^1323279010.12342^^312)L(7200000)") in new stack -- Setting call duration limit to 7200.000 seconds. == Using SIP RTP CoS mark 5 -- Launched AGI Script /var/lib/asterisk/agi-bin/queue.pl -- Called 312 -- <Local/333@agent-4c8b;2>AGI Script queue.pl completed, returning 0 -- SIP/312-00001fdb is ringing -- Executing [333@agent:6] Dial("Local/333@agent-4c8b;2", "SIP/333,,tM(updateagent^1323279010.12342^^333)L(7200000)") in new stack -- Setting call duration limit to 7200.000 seconds. == Using SIP RTP CoS mark 5 -- Called 333 -- Local/312@agent-2401;1 is ringing -- <Local/322@agent-d31f;2>AGI Script queue.pl completed, returning 0 -- Executing [322@agent:6] Dial("Local/322@agent-d31f;2", "SIP/322,,tM(updateagent^1323279010.12342^^322)L(7200000)") in new stack -- Setting call duration limit to 7200.000 seconds. == Using SIP RTP CoS mark 5 -- Called 322 -- <Local/316@agent-a9f1;2>AGI Script queue.pl completed, returning 0 -- Executing [316@agent:6] Dial("Local/316@agent-a9f1;2", "SIP/316,,tM(updateagent^1323279010.12342^^316)L(7200000)") in new stack -- Setting call duration limit to 7200.000 seconds. == Using SIP RTP CoS mark 5 -- Called 316 -- SIP/316-00001fde is ringing -- Local/316@agent-a9f1;1 is ringing -- SIP/333-00001fdc is ringing -- Local/333@agent-4c8b;1 is ringing -- SIP/322-00001fdd is ringing -- Local/322@agent-d31f;1 is ringing -- <Local/311@agent-0d48;2>AGI Script queue.pl completed, returning 0 -- Executing [311@agent:6] Dial("Local/311@agent-0d48;2", "SIP/311,,tM(updateagent^1323279010.12342^^311)L(7200000)") in new stack -- Setting call duration limit to 7200.000 seconds.

It seems asterisk believes extension 388 is busy:

I have tried unregistering and registering that extension, turning on and then off DND, tried registering from a different computer, tried with a different softphone client. I have also tried a different extension on the computer where 388 occupies, this works so the softphone is configured properly. All these failed which means the issue is server side and not client side.

Thank you for your time!

-nick

The dialplan believes it is busy, but you haven’t provided the dialplan so that one can see what is actually being tested.

Thanks for your assistance.

Here are the relevant parts of the dialplan (I believe I got all the important parts):

[sip-in]
exten => _X.,1,Set(__CALLTO=${EXTEN:-10})
exten => _X.,n,Goto(s,1)
exten => s,1,Set(CALLERID(num)=${FILTER(0-9,${CALLERID(num)})})
exten => s,n,Set(CALLERID(num)=${IF($["foo${CALLERID(num)}" = "foo"]?0000000000:${CALLERID(num):-10})})
exten => s,n,Set(CALLERID(name)=${IF($["foo${CALLERID(name)}" = "foo"]?Unknown Caller:${CALLERID(name)})})
exten => s,n,Set(INFO=Inbound call from Flowroute. )
exten => s,n,Set(__CALLID=${UNIQUEID})
exten => s,n,AGI(cdr-start.pl,${CALLERID(num)},${CALLERID(name)},${CALLTO},1,${CALLID},${CHANNEL},incoming)
exten => s,n,NoOp(Call ${CALLID} from ${CALLERID(num)} received. ${STRFTIME(${EPOCH},,%c)})
exten => s,n,AGI(blacklist.pl,${CALLERID(num)})
exten => s,n,GotoIf($["${RESULT}" = "block"]?blocked,s,1)
exten => s,n,Goto(incoming,s,1)
exten => h,1,Goto(endcall,h,1)

[incoming]
exten => s,1,NoOp(Processing call ${CALLID} to ${CALLTO} from ${CALLERID(num)}. ${STRFTIME(${EPOCH},,%c)})
exten => s,n,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(num)})
exten => s,n,AGI(cdr-recorded.pl,${CALLID},${CALLFILENAME}.gsm)
exten => s,n,MixMonitor(${CALLFILENAME}.gsm)
exten => s,n,Goto(autoattendant,s,1)
exten => h,1,Goto(endcall,h,1)

[autoattendant]
exten => s,1,NoOp(call sent to auto attendant. ${STRFTIME(${EPOCH},,%c)})
exten => s,n,Set(INFO=${INFO} Auto Attendant.)
exten => s,n,Answer()
exten => s,n,Wait(2)
exten => s,n(main),Read(PRESSED,autoatt/greeting,3,,1,1.5)
exten => s,n,GotoIf($["${PRESSED}" = "1"]?support,s,1)
exten => s,n,GotoIf($["${PRESSED}" = "2"]?sales,s,1)
exten => s,n,GotoIf($["${PRESSED}" = "3"]?directory)
exten => s,n,GotoIf($["${PRESSED}" = "900"]?conference,quick,1)
exten => s,n,GotoIf($["${PRESSED}" = "998"]?getmail,general,1)
exten => s,n,GotoIf($["${PRESSED}" = "999"]?conference,s,1)
exten => s,n,Gotoif($["${LEN(${PRESSED})}" = "3"]?extdial)
exten => s,n,GotoIf($["${PRESSED}" = "0"]?invalid)
exten => s,n,GotoIf($["${PRESSED}" = "*"]?invalid)
exten => s,n,GotoIf($["foo${PRESSED}" = "foo"]?nothing)
exten => s,n,Wait(1)
exten => s,n,Goto(invalid)
exten => s,n(extdial),Wait(1)
exten => s,n,Set(INFO=${INFO} TXFR to ${PRESSED}.)
;exten => s,n,Playback(pls-hold-while-try)
exten => s,n,Goto(extensions,${PRESSED},1)
exten => s,n(directory),Directory(location,extensions,eb)
exten => s,n(invalid),Set(INFO=${INFO} Pressed ${PRESSED}.)
exten => s,n,Goto(main)
exten => s,n(nothing),Set(INFO=${INFO} Nothing Entered.)
exten => s,n,GotoIf($["${ENDNOW}" = "END"]?done)
exten => s,n,Set(ENDNOW=END)
exten => s,n,Goto(main)
exten => s,n(done),Set(INFO=${INFO} Ending Call.)
exten => s,n,Playback(vm-goodbye)
exten => s,n,Hangup()
exten => h,1,Goto(endcall,h,1)

[sales]
include => agent
exten => s,1,Answer()
exten => s,n,Set(CALLERID(name)=Sales Call)
exten => s,n,GotoIfTime(9:00-18:00,mon-fri,*,*?doit)
exten => s,n,AGI(queue.pl,${CALLID},sales,After Hours,0)
exten => s,n,AGI(queue.pl,${CALLID},sales,Voicemail,5)
exten => s,n,Voicemail(902@comtread,u)
exten => s,n,Hangup()
exten => s,n(doit),AGI(queue.pl,${CALLID},sales,Entered Queue,0)
exten => s,n,Playback(pls-hold-while-try)
exten => s,n,Set(QNAME=sales)
exten => s,n,Set(MONITOR_OPTIONS=aW(2))
exten => s,n,Queue(sales,t,,,12)
exten => s,n,AGI(queue.pl,${CALLID},sales,Transfer to Combined,0)
exten => s,n,Set(MONITOR_OPTIONS=aW(2))
exten => s,n,Queue(combined,t,,,12)
exten => s,n,AGI(queue.pl,${CALLID},sales,Option for Voicemail,0)
exten => s,n,Read(QUEUECHOICE,queue-voicemail,1,,1,3)
exten => s,n,GotoIf($["${QUEUECHOICE}" = "1"]?vm)
exten => s,n,AGI(queue.pl,${CALLID},sales,Transfer to Sales2,0)
exten => s,n,Set(MONITOR_OPTIONS=aW(2))
exten => s,n,Queue(sales2,t,,,600)
exten => s,n,AGI(queue.pl,${CALLID},sales,Voicemail,15)
exten => s,n,Voicemail(902@location,u)
exten => s,n,Hangup()
exten => s,n(vm),AGI(queue.pl,${CALLID},sales,Voicemail,12)
exten => s,n,Voicemail(902@location,u)
exten => s,n,Hangup()
exten => a,1,Goto(autoattendant,s,main)
exten => t,1,Hangup()
exten => h,1,AGI(queue.pl,${CALLID},sales,Left Queue Hangupcause:${HANGUPCAUSE},20)
exten => h,n,Goto(endcall,h,1)

[agent]
exten => _XXX,1,NoOp(** calling AGENT - ${EXTEN} **)
exten => _XXX,n,Set(__AgentID=${EXTEN})
exten => _XXX,n,Set(GROUP(agents)=${AgentID})
exten => _XXX,n,GotoIf($["${GROUP_COUNT(${AgentID}@agents)}" > "1" ]?busy)
exten => _XXX,n,AGI(queue.pl,${CALLID},${QNAME},${AgentID},10)
exten => _XXX,n,Dial(SIP/${EXTEN},,tM(updateagent^${CALLID}^${QNAME}^${AgentID})L(7200000))
exten => _XXX,n,Hangup()
exten => _XXX,n(busy),(** AGENT ${AgentID} already on queue call **)
exten => _XXX,n,Set(DIALSTATUS=BUSY)
exten => _XXX,n,Busy()
exten => _XXX,n,Hangup()
exten => 901,1,Set(CALLEXT=${EXTEN})
exten => 901,n,Goto(support,s,1)
exten => 902,1,Set(CALLEXT=${EXTEN})
exten => 902,n,Goto(sales,s,1)

Please also post your agents.conf & queue.conf files as well.

agents.conf only has one directive that is not commented out:

[general]
persistentagents=yes

[agents]

queue.conf:

[code][general]
persistentmembers = yes
keepstats = yes
autofill = yes
monitor-type = MixMonitor
shared_lastcall=no

[sales]
memberdelay = 0
monitor-format = gsm
joinempty = no
leavewhenempty = yes
strategy=ringall
announce = sales
timeout=45
retry=30
wrapuptime=15
maxlen = 0
reportholdtime = no
announce-frequency = 180
announce-holdtime = no
context = sales

[support]
memberdelay = 0
monitor-format = gsm
joinempty = no
leavewhenempty = yes
strategy = ringall
announce = support
timeout=45
retry=30
wrapuptime=15
maxlen = 0
reportholdtime = no
announce-frequency = 180
announce-holdtime = no
context = support

[combined]
memberdelay = 0
monitor-format = gsm
joinempty = no
leavewhenempty = yes
strategy = ringall
announce = administration
timeout=45
retry=30
wrapuptime=15
maxlen = 0
reportholdtime = no
announce-frequency = 180
announce-holdtime = no
context = sales

[sales2]
memberdelay = 0
monitor-format = gsm
joinempty = no
leavewhenempty = yes
strategy=ringall
announce = sales
timeout=45
retry=30
wrapuptime=15
maxlen = 0
reportholdtime = yes
announce-frequency = 180
announce-holdtime = yes
context = sales

[support2]
memberdelay = 0
monitor-format = gsm
joinempty = no
leavewhenempty = yes
strategy = ringall
announce = support
timeout=45
retry=30
wrapuptime=15
maxlen = 0
reportholdtime = yes
announce-frequency = 180
announce-holdtime = yes
context = support
[/code]

It appears that the group ‘agents’ already has this agent listed. I am not real familiar with GROUP(), but from what I think I know of them, I wonder if there is a ‘stuck’ channel for that endpoint, therefore making the GROUP believe the agent is busy.

What is the output of ‘group show channels’?

Is that endpoint listed in ‘core show channels’ when you know that the endpoint is not in use?

In another thread, Ian Plain points out that ringinuse may be an easier solution to the underlying requirement.

@dalenoll:

output of ‘group show channels’

Channel Group Category SIP/777-000019c9 388 agents Local/312@agent-1988;2 333 agents SIP/333-00002104 333 spiedon 3 active channels

If in the first line SIP/777 indicates an extension number then that is our CEO who never uses the phones except to eavesdrop on calls. ‘sip show peers’ indicates he isn’t currently registered so he could have slammed his comp closed and the session may have not ended properly.

@david55:

thank you i’ll look into this.

So after running group show channels and identifying the stuck channel I ran soft hangup SIP/777-000019c9. This solved the problem. Now user 388s softphone rings when queue calls come in and no longer does asterisk mark it as busy.

Thanks!

Glad to hear it worked!

please can you send me the AGI file :queue.pl and agentLogin.pl

Thanks in advances…