Page 1 of 1

is the following cluster structure possible?

PostPosted: Thu Sep 27, 2012 9:32 am
by jamessmith
Is it possible to setup the following cluster structure with the current publicly available apps without much hassle

Web Load Balancer (1 or 2 servers)
Multiple Web servers

Sip proxy (possibly openSIPS or openSER)
Multiple Dialers (interconnected via IAX2 trunks)

DB Server (or DB cluster using DRBD or some other solution)

The user's phone will connect with the Sip Proxy, which will establish the connection to the actual dialer, and in the browser user will connect with the web load balancer which will work as a proxy and use any web server.

Right now we have a single machine, running ViciBox 4 iso. I can provide more details about the box and the running apps + versions, but I think those details aren't needed.

We are looking to setup a cluster in coming months, and my main concern is that in normal cluster users are directly connected to the dialer, so if there are multiple dialers and any dialer goes down, we have to manually update all the phones connected with the dialer to use the other dialer. So I am hoping that maybe using this approach we can create a better fail-safe environment. In such case we can put N+1 or even N+2 dialers in the cluster, and only have to keep the SIP-Proxy active and running all the time, and can have better sleep at night.

Previously I had a cluster, and this was the major issue I faced, that if any node goes down I not only have to bring a replacement node but also instruct the agents to switch to a different dialer. And I personally feel alot better to deal with machines than humans, as machines actually follow the instructions properly.

Re: is the following cluster structure possible?

PostPosted: Thu Sep 27, 2012 12:03 pm
by Kumba
To answer the question as stated: Yes, it is possible.

The web load balancing had been done many times and well documented all over the web. You will only want to load balance the agent interface (/agc directory) since the audio store and administration doesn't load balance that well. I find it easiest to use vhosts so you have admin.somedomain.com and then agent.somedomain.com which is load balanced.

The OpenSIPS setup is possible but is extremely less trivial then the web server set-up. It will require someone who is very familiar with OpenSIPS as you will need to create a one to many user mapping using some sort of mechanism. Not exactly OpenSIPS 101 stuff.

Now, the better answer is to use Phone Alias' which is ViciDial's own built-in agent load-balancing. The way it works is to create an identical phone entry on each telephony server and then create an alias that references them all. When the agent logs in, it calls the agent from the server with the least amount of logged in agents. If a server goes down, you simple mark the server as inactive in ViciDial, and those affected agents log out and back in. They will then be called from a different server.

Re: is the following cluster structure possible?

PostPosted: Thu Sep 27, 2012 3:09 pm
by jamessmith
thanks Kumba

I have never used the phone alias option. if possible can you kindly shed some light on it. I also have the paid manual, so will check that as well.

Re: is the following cluster structure possible?

PostPosted: Sat Sep 29, 2012 1:51 pm
by jamessmith
I checked the full manual and also the available help in vicidial admin, so my understanding of this feature is

first we need to add phones for each agent on each server. So if I have 100 agents and 5 server, I need to create 100 phones on each server.
secondly I will create a phone alias for the user with having all the phones on each server

now the agent will use the alias to connect.

but what will be the server address in the soft-phone? any dialer? or the first dialer we added in the cluster?
if the server mentioned by the user goes down, how will the soft-phone be able to figure out the other dialers? do we need to update each dialer manually?

Re: is the following cluster structure possible?

PostPosted: Mon Oct 01, 2012 1:18 pm
by Kumba
You have to register the soft-phone to all 5 dialers in your example. So a typical phone alias set-up for 1 agent is as follows

101a = 101 phone on first dialer
101b = 101 phone on second dialer
...
101e = 101 phone on fifth dialer

101 = phone alias containing 101a,101b,101c,101d,101e

Agent soft-phone must register to all 5 dialers using the credentials you set-up under 101a-101e

When agent logs in, they simply type in '101' as their agent phone and the password, the dialer handles all background processes needed to log them in. All the phones must also have the same 'login' password for the feature to work.

Re: is the following cluster structure possible?

PostPosted: Mon Oct 22, 2012 2:00 pm
by omarrodriguezt
Kumba, what happen in the case that one of the dialers go down?
Also, regarding carriers, should we create the same carriers in all dialers?
Will the call be distributed in all the dialers or only one dialer will be handling all the carrier calls?

Re: is the following cluster structure possible?

PostPosted: Wed Nov 14, 2012 10:39 pm
by williamconley
Kumba, what happen in the case that one of the dialers go down?

Calls on that dialer will drop. Calls "connecting through" that dialer will also drop. But other calls on other dialers will not. Agents logged in to that dialer will drop, but they will not change in the real time screen until they log in somewhere else or the dialer reboots. (as there is no process changing that table value ...). This is not exactly true if the agent web and agent conference dialer are sep servers ... different dynamics apply to segregation of responsibilities if each role is on a different machine.
Also, regarding carriers, should we create the same carriers in all dialers?

Yes, but this is subjective. It is possible for "dial 9" to be different carriers on different servers to balance or spread your dialing among your carriers. But the simple answer is: Yes, you can just create identical carriers across all servers to ensure all campaigns work properly on all servers.
Will the call be distributed in all the dialers or only one dialer will be handling all the carrier calls?

Dailers will try to make calls based on the agents logged in to them and will essentialy "request" that calls be made on their behalf if they run out of channels on their own. Then other dialers will call for them IF they are set to "Balance Dialing" under Admin->Servers. (Dialers set to Balance Dialing will make calls on behalf of other dialers if they have extra channels available, this is the definition of Balance Dialing.)

If a call is answered on a dialer, the route the call takes to an agent is determined by the campaign settings. Check your Campaign (?) help buttons and/or read the Manager's Manual for the options of course. But the gist of it is that Vicidial is designed to give the call to the next available agent regardless of which server that agent is on (and you don't have to "figure this out", it just works).

Re: is the following cluster structure possible?

PostPosted: Wed Apr 24, 2013 8:10 am
by omarrodriguezt
Thank very much William!

Re: is the following cluster structure possible?

PostPosted: Thu Jun 06, 2013 2:49 pm
by omarrodriguezt
Hello William,
I just installed the cluster using last vicidial iso.
I have:
1 DB
1 Web + archival
3 dialers

What are the next steps after you just installed all the servers on your clusters:
I'm reading http://download.vicidial.com/vicidial/t ... ANCING.txt
and http://www.poundteam.com/downloads/Vici ... v1%201.pdf

You can put all of these only on your web/db server:

### VICIDIAL agent time log weekly summary report generation
2 0 * * 0 /usr/share/astguiclient/AST_agent_week.pl

### fix the vicidial_agent_log once every hour and the full day run at night
33 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl
50 0 * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --last-24hours

### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/AST_VDhopper.pl -q

### adjust the GMT offset for the leads in the vicidial_list table
1 1,7 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl --debug --postal-code-gmt

http://www.vicidial.org/VICIDIALforum/v ... hp?t=11925