Is there a way in SQL to determine who will get next call?
Posted: Sun Sep 23, 2018 7:46 pm
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:
however, I need to know which agent each of those calls will be sent to.
For example:
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
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