Need to implement dynamic queue. Request a good architecture

Discussions about development of VICIDIAL and astGUIclient

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

Need to implement dynamic queue. Request a good architecture

Postby baijupaul » Mon Apr 29, 2013 11:17 am

Hello,
I am fairly new to vicidial, but have a long experience with asterisk. I need to implement a specific functionality and request your help in coming up with the right architecture.

We get incoming leads. The leads are then qualified and all the agents are ranked in a priority order. Based on the past history and the dialed number, some of the agents are more qualified than others to take this lead. The next call will have a different priority for the agents. We have an algorithm that will rank the agents.

I was not able to find a straightforward way to implement this functionality.

This are the thoughts:
1) Create a campaign manually using VICIDial GUI. Assign agents to this campaign.
2) When a new leads arrive, run the algorithm to find agent priority for this lead.
3) Duplicate the row in mysql of #1. Set the priority of this campaign to the highest.
4) Assign agents to this campaign, and set the agent priority from #2.
5) Place the lead into this campaign. (How could this be done programatically?).
6) Repeat 2,3,4,5 for the next lead, but set the campaign priority to be one lower than the highest.

This is rather cumbersome, since there will be one campaign per lead.

I am not sure of how severe are the performance penalties for this approach.

Your feedback is greatly appreciated. If there is an alternate easier way, it would be a great help.
Thank You
baijupaul
 
Posts: 5
Joined: Mon Apr 29, 2013 10:39 am

Re: Need to implement dynamic queue. Request a good architec

Postby williamconley » Mon Apr 29, 2013 6:34 pm

you keep switching back and forth between the agents being prioritized and the leads being prioritized. which one is it?

can you give an example of a single lead being "prioritized"? Do you mean to say that it should be given to any agent but preference of which based on the agents rank for the campaign (or for that specific lead)? Or is it that these leads are limited to specific agents and within that list of agents there is a ranking requirement?

Also, as you are a newbie, here are your newbie suggestions! :)

when you post, please post your entire configuration including (but not limited to) your installation method and vicidial version with build.

this IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600

Happy Hunting! 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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to implement dynamic queue. Request a good architec

Postby baijupaul » Mon Apr 29, 2013 7:41 pm

Thank you for your quick response.
Here is an example: (Lead 1 is the first lead, Lead 2 is the second lead etc..)
Lead 1 -> Agent5:1, Agent2:3,Agent1:10,Agent3:2 (Agent 5 has rank 1, Agent 2 has rank 2, etc..)
Lead 2 -> Agent1:2, Agent7:1
Lead 3 -> Agent2:1, Agent5:5

The leads that are older should be attempted to be serviced first, and hence in this example, Lead 1 has priority over Lead 2, which has priority over Lead 3.
In this example, if all agents are free, Agent5 will answer Lead 1, Agent7 will answer Lead 2, and Agent2 will answer Lead3.
If Agent2 is the only agent available, he will answer Lead 1 first and then Lead 3. Lead 2 will wait for either Agent 1 or Agent 7 to become available.

Regarding your comment about configuration and vicidial version. Even though I am using vicidial version 2.6-394a downloaded as vicibox iso, I am not married to that version. I could use any of the versions that will get be close to the intended functionality.

I have read the free version of the managers manual and have also googled, but was unable to find the information.

Thank You
baijupaul
 
Posts: 5
Joined: Mon Apr 29, 2013 10:39 am

Re: Need to implement dynamic queue. Request a good architec

Postby williamconley » Mon Apr 29, 2013 8:24 pm

It's not a question of whether you are "married" to it. Remember that while this question, as far as you are concerned, is just for You ... Now ... it will still be here three years from now. So when you post your Vicidial version with build and your installation method with version and later you express concern at a missing function or elation at an included method ... some dude in the future may compare his version to yours and become "informed". That's only true, of course, if you list this information.

Plus, it is a requirement of the site owner that you at the very least include your Vicidial Version with Build whenever you request support (which is why it's cool to put it in your signature ...).

Your description raises some issues, of course. Territory being what it is and agents becoming available and/or unavailable randomly (bathroom breaks, inbound calls ...), you have quite a challenge unless All the agents in a specific campaign are at least "allowed" to take individual calls (but you would prefer specific ones ...).

It is not presently a feature of Vicidial to have "per lead agent ranking", but it could be added if you were able to decide on a syntax to show this rank. Then we'd have to find a place to store the rank and modify the "next agent" routine to use this information.

The falling down point will always be that if Agent 5 gets an inbound call after Lead 3 is dialed ... that lead will be stranded if agetn 2 was already on a call. If no one else in the campaign is allowed to take the call at all, this could be a wee bit of a nightmare. :)
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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to implement dynamic queue. Request a good architec

Postby baijupaul » Tue Apr 30, 2013 5:06 am

Fair enough. The full versions information is:
VERSION: 2.6-394a
BUILD: 130130-1207
This is an installation from Vicibox server ISO.

Thank you for the engagement in this topic.

We have a situation, where not all agents are qualified to take all leads. Language difference is one reason. In these cases, we are much better off to place the callee in a queue waiting for the qualified agent to be free. There would be some cases where all agents are qualified for the lead. So it is best to make this configurable.

The agent priority could be a simple JSON format, that is associated with each lead.

What is the best way to handle such a change? If I have to make the modification, what file(s) should I be looking at? We are concerned about making major source code changes, since we do not want to diverge from the latest stable release.
baijupaul
 
Posts: 5
Joined: Mon Apr 29, 2013 10:39 am

Re: Need to implement dynamic queue. Request a good architec

Postby williamconley » Tue Apr 30, 2013 9:20 pm

Please include the version and/or filename of the .iso installer. It makes a difference (after all, installers have bugs, too! LOL). If you don't remember or lost the disk, the splash screen in ssh upon login (or console login) often contains the version number.

You could look at modifying the Vicidial Ingroup system. Ingroups can be 'allowed' for specific agents. Ingroups also have ranking capabilities.

To link to that system for outbound calls, you can set your drop call seconds on the campaign to -1 (if i recall) and then drop the call to an ingroup. If you modify the "drop call action" code, you could likely drop each call to a different ingroup based on the skill set of the group of agents allowed to accept the call.

Of course, you could also modify the "next agent" code in the campaign to "choose" the agent based on your algorithm. All of these scripts are perl.

You could also just modify the VDAD script that is activated by the call being answered (Routing Exten controls which script is used, default 8368). In that script you can put any logic you like to choose the appropriate agent.

My concern is that you must synchronize the outbound dial hopper/call generation with that "who can accept the call" script unless these are inbound calls.
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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to implement dynamic queue. Request a good architec

Postby baijupaul » Tue Apr 30, 2013 10:37 pm

Your response is very useful.
The splashscreen gives the following output.
Code: Select all
ViciBox Redux v.4.0.3 released


You have given me a lot of pointers for me to look at. I will investigate and report back the findings for the interest of the community.

Do you or anyone else at vicidial offer commercial support for the implementation and/or consulting. How do I go about requesting it?
baijupaul
 
Posts: 5
Joined: Mon Apr 29, 2013 10:39 am

Re: Need to implement dynamic queue. Request a good architec

Postby williamconley » Tue Apr 30, 2013 11:29 pm

The owners of this site and the Vicidial Corporate Sponsor/Owner (The Vicidial Group) and my company (PoundTeam Incorporated) both offer these services at EFLO.net and PoundTeam.com (or Catalog.poundteam.com) respectively.

Start with the manual, but we also offer a "quick start" tutorial session that has helped dozens of clients jump from "pretty new dialer" to "hey! i'm dialing! and it's not an accident!". :)
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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Need to implement dynamic queue. Request a good architec

Postby baijupaul » Wed May 01, 2013 12:11 am

Thank you once again for your quick response. Where can I know more about the tutorial session? I was not able to find it in the catalog.
Additionally, is there any documentation on source code organization? I have started to look at the source code, but it would be a big help if I can start to read from the architecture document, if one exist.
baijupaul
 
Posts: 5
Joined: Mon Apr 29, 2013 10:39 am

Re: Need to implement dynamic queue. Request a good architec

Postby williamconley » Wed May 01, 2013 4:43 pm

The tutorial session is a 3 hour training session. You would purchase 3 hours of training ... and then request a training date at least 5 days in the future in the order or via email or a support ticket after the purchase has completed.

There is no "source code structure" documentation, but there are documents available for use of many of the scripts. In addition to executing the scripts with --help to get a quick list of options there is also a folder with specific usage info.

Scripts are in /usr/share/astguiclient

Docs are in /usr/src/astguiclient/VERSION/docs

VERSIONS usually = "trunk" if you installed via recommended specs.
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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: No registered users and 25 guests