Page 1 of 1

Queue priority AGENTDIRECT

PostPosted: Thu May 09, 2019 7:14 am
by dominikPL
vicidial install from scratch
svn 3094
ver 2.14b0.5
asterisk 13.21

I have problem with priorities queues.

Inbound group priority configuration
ingroup TESTA priority 80
ingroup TESTB priority 40
ingroup AGENTDIRECT priority 99

so two cases are tested:
--FIRST CASE:
one agent is logged in campaign and taking call from all inbound groups. Agent is on pause.
-first call routed to TESTB
-second call routed to TESTA
both calls waiting in queue, when the agent is ready, call from TESTA goes first, then TESTB - priority working ok

--SECOND CASE:
two agents (A and B) are logged in campaign and taking call from all inbound groups. Both agents are on pause.
-first call routed to TESTB
-second call routed to TESTB
-third call routed to TESTB
Agent A took first call, then transferred by AGENTDIRECT to agent B, then agent A goes on pause.
In agent B queue we have 3 call (transfered AGENTDIRECT and two from TESTB)
Agent B becomes ready and took second call, then third call and at the end transferred call.

Priority did not working properly. I think first call should be from AGENTDIRECT because this ingroup has the highest priority in system. I want to prevent situation when we have a lot call in queue and client must wait long time because are transferred direct to agent.

Re: Queue priority AGENTDIRECT

PostPosted: Mon May 13, 2019 3:46 am
by dominikPL
Any reply? Someone could help? I need information urgently.

Re: Queue priority AGENTDIRECT

PostPosted: Mon May 13, 2019 5:01 am
by mflorell
These issues are usually related to the settings for the in-groups involved, but to debug it you'll have to post the agiout logfile output for the call examples you've given

Re: Queue priority AGENTDIRECT

PostPosted: Mon May 13, 2019 6:46 am
by dominikPL
Below output from agiout, I started capturing when 3 call wait in queue, then unpause one agent make transfer to second agend, then unpause second agent he took call from inbound then direct to agent.
https://pastebin.com/5A8Stb8d

Re: Queue priority AGENTDIRECT

PostPosted: Mon May 13, 2019 8:52 am
by dominikPL
I found the issue, agi-VDAD_ALL_inbound.agi works by executing SELECT SQL statements with queue priority in a loop and call whenever agent unpauses, but because of this which call will get dialed depends on position in this loop, instead of priority.
To make it more clear, all calls execute a loop in search of available agent, for performance reasons each SQL statement is executed about half a second after previous one. When agent unpauses, instead of a call with highest priority he will receive a first call that will execute query after the unpausing.

Re: Queue priority AGENTDIRECT

PostPosted: Tue May 14, 2019 4:24 pm
by dominikPL
I'm right?

Re: Queue priority AGENTDIRECT

PostPosted: Tue May 14, 2019 6:36 pm
by mflorell
That shouldn't be how it works, since the script is always looking for other active calls at the same or higher priority, the status of available agents shouldn't affect that part.

Re: Queue priority AGENTDIRECT

PostPosted: Tue May 14, 2019 6:40 pm
by williamconley
if each call has its own agi-VDAD_ALL_inbound.agi invocation and each agi-VDAD_ALL_inbound.agi is looking for 1 agent, then whichever gets to that agent first ... wins. without regard for Priority. Unless there's a track of other calls in line that each agi-VDAD_ALL_inbound.agi detects (so each agi-VDAD_ALL_inbound.agi sees all the other agi-VDAD_ALL_inbound.agi in waiting).

Re: Queue priority AGENTDIRECT

PostPosted: Wed May 15, 2019 5:57 am
by mflorell
Yes, each Inbound AGI is looking for the other calls waiting for agents in the vicidial_auto_calls table, and they won't jump the queue unless one of the "No Block" settings is enabled.