Route to agent only if x number of Agents are Available

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Route to agent only if x number of Agents are Available

Postby ajax1515 » Mon Feb 08, 2016 2:01 pm

I'm looking for a way to route a call to an In-Group, only if a certain thresh-hold of agents available is met.

Simply put, if In-Group A has at-least 3 agents available, send the call there, otherwise route to Callmenu B.

For reference the use-case here is for handling of outbound Abandon's, we dial at a fairly high rate since a large percentage of our contacts are answering machines or non-answers. We have an Inbound team for taking ringbacks and transfers from certain partners. I want to be able to send an outbound abandoned call to the In-group but only when there are ample inbound agents available as we can't have abandons sucking up time from our inbound agents unless there is a significant lull, otherwise it needs to route to an abandon IVR by law.

I'm envisioning setting Drop Call to "callmenu" and having that call menu fire an agi to check available calls and then make it's routing choice, I believe I could write my own but I was hoping for some guidance on where I'd need to look in the database, or better yet if there is already something built in that I'm overlooking to accomplish this task.

Thanks in advance
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Mon Feb 08, 2016 8:58 pm

The feature you seek is "Dial Level Difference Target".

Modify the campaign in detail view to see this option.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Route to agent only if x number of Agents are Available

Postby ajax1515 » Tue Feb 09, 2016 11:08 am

So it looks like that option is used to force the campaign to leave a certain number of agents ready. What I'm looking for is a way to check first to see how many agents are waiting on an in-group and then do something based on the result of that check; either route to the ingroup or send the call to an IVR to get dropped.

What we are doing is aggressively dialing to the point that we're placing more calls on our outbound campaign then we have agents to answer those calls, by law, if someone picks up the phone they have to receive a response within 2 seconds. So if John Doe picks up the phone and it just so happens that no agents are available I want to quickly route him to an in-group... but I have to know that there is an agent available in that in-group before I do so because Mr. Doe cannot legally be placed on any kind of hold, if there aren't any agents available Mr Doe needs to go to an IVR that plays him a message saying who we are and why we're calling and then gives him the option to opt-out.

Now I understand that i could use the dial difference target to ensure that that in-group always has an agent available but I don't want to do that because this in-group is receiving actual inbound calls that are far more important then talking to Mr Doe so if the in-group is busy I'd rather just play Mr. Doe the IVR and let him go.
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Tue Feb 09, 2016 11:29 am

That's what campaigns are for without ingroups. You're asking for functionality that allows campaigns to magically overflow to ingroups and know in advance who is available ... but knowing in advance who is available is what the original campaign is for (dialing based on availability ... definition of "campaign"). Transferring calls based on availability ... well ...

That being said: Ingroup "No agent no queueing" will allow calls to flow through all your ingroups and "bounce" to the next ingroup if no one is available. Same function, but backwards from your description: it's not "don't send to this ingroup if no one is available", it is instead "if no one is available, go to the next ingroup". Does have the same result, however. There are also other settings that can allow for limitations on calls in queue, etc. (minimizing wait time instead of eliminating it altogether).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Route to agent only if x number of Agents are Available

Postby ajax1515 » Fri Feb 12, 2016 10:24 am

Yes, I see what you are saying and either way you've given me the answer I was originally looking for, that there is no easy way to do what I'm trying to do. I'm going to see if I can go ahead and make that "magical functionality" happen, I'll post back with the results. Thanks as always for your help : )
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Mon Feb 15, 2016 10:30 pm

Probably easier to allow ingroups to "fail over" with their built-in functionality. It's instantaneous. So you could have the calls bounce until they hit an ingroup with an available agent.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Route to agent only if x number of Agents are Available

Postby ajax1515 » Thu Feb 25, 2016 5:39 pm

So I have mostly solved this... but with one lingering issue I'm hoping someone can help me with.

Here's what I've done...
Create in-group ABANDONS
Create callmenu ABANDON_IVR
Set dropaction on Outbound campaign to go to callmenu ABANDON_IVR
ABANDON_IVR plays sip-silence and has a timeout of 0,
Timeout option triggers an AGI script that does a database query on vicidial_live_agents JOINED with vicidial_live_inbound_agents to find the number of agents in "CLOSER" status from the in-group ABANDONS
If the threshold is met the AGI sets next_step to A otherwise its set to B
ABANDON_IVR exten A routes to in-group ABANDONS
ABANDON_IVR exten B routes to standard abandoned call IVR to play the "we're sorry for bothering you, press 2 to opt-out" message.

This works beautifully, however... since these originate as outbound dialed leads and then get passed over to the in-group i need a way to give the in-group the vendor_lead_code, that outbound uses for pulling up customer info... that doesnt seem to be getting passed during the transfer... instead vendor_lead_code seems to be getting replaced with the name of the transferring callmenu, in this case ABANDON_IVR...
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Thu Feb 25, 2016 7:09 pm

Is there a reason you did not set the campaign drop action to the ingroup ABANDONS and set the "No Agents No Queueing" action to standard abandoned call IVR to play the "we're sorry for bothering you, press 2 to opt-out" message?

This function appears to be identical to what you are attempting to do, but without the data loss.

I note you still do not have your Vicidial Version with Build in your signature. Just your installer version.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Route to agent only if x number of Agents are Available

Postby ajax1515 » Mon Feb 29, 2016 1:00 pm

The reason is because I don't want to route to the in-group if there is only 1 or 2 agents available... I want to route to the in-group only when there is at least 3 or more agents available. Your solution however is interesting and may help me with solving my problem... If i were to set the in-group to "No Agents No Queuing" the decision to drop the call to the IVR or not must get made by an agi somewhere I assume? Could you enlighten me as to which agi is making that decision?
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Mon Feb 29, 2016 1:17 pm

Watch the asterisk CLI, and you'll see the call bounce to/from AGIs as the Extensions execute.

After you find it, you can even turn on AGI debugging and get the information being passed. If you watch in the "screen", you can even see errors in the agi script if they occur (this is the ONLY place the errors occur unless there is a "try/catch" in the file, which there usually isn't).

Do note that each CAMPAIGN has a setting to keep a specific number of agents available ... however, I'm not sure how well that's integrated with inbound calls. It should be, but I've never tested it personally. If it's not ... it would be a better use of resources to repair that function (and submit a DIFF to the Issue Tracker) than to hard-code something into the inbound AGI script. Unless you put the same feature into the Inbound "No agents no waiting" and allow "XX agents no waiting" (With numbers ranging from NO to 10 in the dropdown). 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Route to agent only if x number of Agents are Available

Postby ajax1515 » Tue Mar 01, 2016 4:27 pm

So after some trial and error I got everything working the way I need it to. Had to turn the In-group routing from the callmenu to "Closer" to get the data integrity to maintain... I realize ideally your solution would be far more elegant but our systems at this point are so weirdly wrapped up and customized with vicidial that it would be a nightmare to try to unravel right now... eventually I'm going to have to.

Thanks for guiding me in the right direction Mr. Conley.
ViciBox v.7.0.2-160325
VICIDIAL-VERSION: 2.12-550a BUILD: 160414-1013
Asterisk 11.22.0-vici
1 Database Server
MariaDB 10.1.6
2 Web Servers
Multiple Dial Servers
ajax1515
 
Posts: 70
Joined: Wed Sep 23, 2015 11:23 am

Re: Route to agent only if x number of Agents are Available

Postby williamconley » Tue Mar 01, 2016 7:06 pm

Now: The next time you install a dialer, try it without the "device". And tell me if you can identify any differences in capacity or call quality. :)

And stick around and answer one question per day on this site. Besides helping out the project, I guarantee you'll learn valuable information. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 80 guests