Hi,
I have a queue which works fine in general.
However, under certain conditions some calls cannot enter the queue, and I would like to find out why.
The queue is defined like so:
[q7000]
autofill = yes
strategy = ringall
retry = 0
timeout = 20
weight = 0
wrapuptime = 0
joinempty = paused,invalid,unavailable
leavewhenempty = paused,invalid,unavailable
announce-position = no
announce-holdtime = no
In my dialplan I have the following:
same => n(requeue),NoOp(There are ${QUEUE_MEMBER(q7000,free)} free agents in q7000, ${QUEUE_MEMBER(q7000,logged)} logged, ${QUEUE_MEMBER(q7000,ready)} ready and ${QUEUE_MEMBER(q7000,count)} total accounted for before entering queue 7000)
same => n,Queue(q7000,twx,,)
same => n,NoOp(POST - There are ${QUEUE_MEMBER(q7000,free)} free agents in q7000, ${QUEUE_MEMBER(q7000,logged)} logged, ${QUEUE_MEMBER(q7000,ready)} ready and ${QUEUE_MEMBER(q7000,count)} total accounted for after leaving queue 7000)
Occasionally in my log I can see this:
pbx.c: Executing [t@custom-IVR1-am:7] NoOp("IAX2/meetbox-6880", "There are 0 free agents in q7000, 1 logged, 0 ready and 15 total accounted for before entering queue 7000") in new stack
pbx.c: Executing [t@custom-IVR1-am:8] Queue("IAX2/meetbox-6880", "q7000,twx,,") in new stack
app_queue.c: Unable to join queue 'q7000'
pbx.c: Executing [t@custom-IVR1-am:9] NoOp("IAX2/meetbox-6880", "POST - There are 0 free agents in q7000, 1 logged, 0 ready and 15 total accounted for after leaving queue 7000") in new stack
What I would like to know is why that call could not join the queue.
The NoOp output seems to indicate that there was an agent logged in (it was probably busy – on a call).
I understand that even with my joinempty and leavewhenempty settings, a call should enter the queue even if its agents are “busy” (on call), right?
If not, why?
[EDIT]
To say the truth, I’m a bit confused on how to use the joinempty and leavewhenempty settings. I want calls to enter the queue whenever there’s at least one “available” agent (ie. at least one agent is “busy”/on call, “ringing” or “not in use”). How does that translate to “joinempty”?
I also want calls to leave the queue whenever “all” agents are either paused, invalid or unavailable/off-line.
[EDIT]
I suspect that my joinempty and leavewhenempty settings seem to “work for me”, except when there are a lot of calls in the queue. Is there a max number of calls allowed per queue (I did not set maxlen)?
[EDIT]
Could it be an Asterisk bug? I have v. 18.10.0, but I haven’t seen anything in the release notes (CHANGES).
I’m getting the message
Unable to join queue
only on “high” call load (actually, not that high either… maybe around 20 calls in queue).
I know there is no maxlen limit because “show queue” gives me this header:
q7000 has X calls (max unlimited)
[EDIT]
I’ll file a bug report as soon as I update my Asterisk version because there’s definitely something wrong. I changed joinempty to yes and left leavewhenempty with
paused,invalid,unavailable and calls entered and immediately exited the queue even if there were 2 agents logged in but busy/on call (as seen with QUEUE_MEMBER).
In other words, the dialplan code:
same => n(requeue),NoOp(There are ${QUEUE_MEMBER(q7000,free)} free agents in q7000, ${QUEUE_MEMBER(q7000,logged)} logged, ${QUEUE_MEMBER(q7000,ready)} ready and ${QUEUE_MEMBER(q7000,count)} total accounted for before entering queue 7000)
same => n,Queue(q7000,twx,,)
same => n,NoOp(POST - There are ${QUEUE_MEMBER(q7000,free)} free agents in q7000, ${QUEUE_MEMBER(q7000,logged)} logged, ${QUEUE_MEMBER(q7000,ready)} ready and ${QUEUE_MEMBER(q7000,count)} total accounted for after leaving queue 7000)
led to:
pbx.c: Executing [t@custom-IVR1-am:7] NoOp("IAX2/meetbox-11955", "There are 0 free agents in q7000, 2 logged, 0 ready and 15 total accounted for before entering queue 7000") in new stack
pbx.c: Executing [t@custom-IVR1-am:8] Queue("IAX2/meetbox-11955", "q7000,twx,,") in new stack
res_musiconhold.c: Started music on hold, class 'default', on channel 'IAX2/meetbox-11955'
res_musiconhold.c: Stopped music on hold on IAX2/meetbox-11955
pbx.c: Executing [t@custom-IVR1-am:9] NoOp("IAX2/meetbox-11955", "POST - There are 0 free agents in q7000, 2 logged, 0 ready and 15 total accounted for after leaving queue 7000") in new stack
So if there are 2 logged-in members even if they’re not free, the calls should stay in the queue.