Page 1 of 1

Is there a way in SQL to determine who will get next call?

PostPosted: Sun Sep 23, 2018 7:46 pm
by mrgunston
If there are 10 agents logged into a campaign and 5 are waiting, is there a way using SQL that I can determine who the next call will be sent to?

I am able to see all the calls that are "Dialling' by doing:

Code: Select all
SELECT * FROM vicidial_auto_calls where campaign_id = 'TEST2222' and stage = 'START'

however, I need to know which agent each of those calls will be sent to.

For example:
Code: Select all
select agent from someTable where campaign_id = "TEST2222" and call_priority = 1


Vicibox 2.12-565a from vicibox_v7x68_65.iso | Vicidial 2.12-565a Build 160827-0917 | Asterisk 11.23.1-vici | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | DELL R710 | Intel Xeon CPU X5690 @ 3.47Ghz 6 Cores

Re: Is there a way in SQL to determine who will get next cal

PostPosted: Mon Sep 24, 2018 6:28 am
by mflorell
You will be looking in the vicidial_live_agents table, but the query would be different depending on the "Next Agent Call" setting in the campaign/in-group that the call belongs to.