Sign in with
Sign up | Sign in
Your question

How to use Automatic call distributor in a call center?

January 16, 2013 9:07:08 AM

Hello all,

Recently I’m working on a project to implement automatic call distributor to my new call center. As I needed a good sample program I downloaded one from the site of Ozeki VoIP SIP SDK. With the help of detailed description it was an easy task to create call routing.
So this is my project basically:
Firstly I needed to set up call routing rules (to choose routing technology and to create data structure). I could choose from several routing methods for example:

1. In case of an agent ID routing I could put the agents in a sorted list and the call was transferred to the first available element of the list.

1. SortedDictionary<int, Ozeki.VoIP.SIPAccount> agents = new SortedDictionary<int,Ozeki.VoIP.SIPAccount>();
2. Dictionary<int, SIPAccount> busyAgents = new Dictionary<int, SIPAccount>();
3.
4. IPhoneCall call;
5.
6. public void routeAccordingToAgentID(IPhoneCall call)
7. {
8. call.BlindTransfer(agents.First().Value.UserName);
9. busyAgents.Add(agents.First().Key, agents.First().Value);
10. agents.Remove(agents.First().Key);
11. }
12.
13. public void callEndedByAgent(int agentID, SIPAccount account)
14. {
15. agents.Add(agentID, account);
16. busyAgents.Remove(agentID);
17. }

2. In case of a round robin routing I could also use a list and store the ID of the agent to whom the latest call was transferred. When a new call came in, it was transferred to the agent who was the next available in the list after the stored one. If I reached the end of the list, I could start the distribution from the beginning of the list again.

1. SortedDictionary<int, Ozeki.VoIP.SIPAccount> agents = new SortedDictionary<int, Ozeki.VoIP.SIPAccount>();
2. Dictionary<int, SIPAccount> busyAgents = new Dictionary<int, SIPAccount>();
3.
4. IPhoneCall call;
5. int lastKey;
6. int[] keys;
7.
8. public int getNextAgent(int key)
9. {
10. int n = Array.IndexOf(keys, key) + 1;
11. return n >= keys.Count() ? 0 : n;
12. }
13.
14. public void routeRoundRobin(IPhoneCall call)
15. {
16. int i = lastKey;
17. while (true)
18. {
19. if (!busyAgents.ContainsKey(keys[i = getNextAgent(i)]))
20. break;
21. }
22. call.BlindTransfer(agents.ElementAt(i).Value.UserName);
23. busyAgents.Add(agents.First().Key, agents.First().Value);
24. }
25.
26. public void callEndedByAgent(int agentID, SIPAccount account)
27. {
28. busyAgents.Remove(agentID);
29. }

I don’t wish to write here all call routing methods but if you are interested in this topic you can visit the website (google this: ****/p_421-voip-call-routing-voip) and you will find other examples with codes too eg: routing by the most idle agent or routing according to the least occupied agent.

Best regards,

Aleksei
!