Vicidial database replication

All installation and configuration problems and questions

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

Vicidial database replication

Postby rortizde » Mon Jun 09, 2008 1:24 pm

Hello all, we are a call center with a couple of clients and close to 150 seats. We also develop value added software for our customers built on top of Vicidial/Asterisk (custom reports, data mining, agent intelligence, etc).

Our main problem right now is that there seems to be a limit to how many users per server a Vicidial installation can have, I believe the rule of thumb is currently 25 users/server. We are curently implementing replication on our Vicidial and Production servers so that we can offload the reporting generation stress out of the Vicidial server. Our customers would basically see their reports or use their modules accessing the production server and not the dialer.

Our problem is, we now have grown past the 25 agent mark and need to install a second Vicidial server, but I haven't seen a way to replicate 2 separate Vicidial databases into a single consolidated one (we would need to pull together the data from both (or more) Vicidials into the production server database for the reports and modules to work and make sense). The only feasible solution I see is to have a Vicidial/Production server pair per every 25 agents, but this is ridiculous and inefficient (not to mention expensive), and it would still not solve the unified operations view.

Any suggestions? Has anyone done anything similar? Please reply or email me at rortiz at newtechsa dot com .

Thanks all!
rortizde
 
Posts: 11
Joined: Mon Jun 09, 2008 11:29 am
Location: Dominican Republic

Postby pylinuxian » Mon Jun 09, 2008 2:26 pm

You probably have never tried what is mentioned in the LOAD_BALANCING.txt document located in the docs directory of source code ... if I remember well, vicidial allows you to have only one db server & multiple dialers (very clever).

I think the setup is pretty much simple if you can get one vicidial running ofcourse ... well, I guess this solves all of your db replication problems.

if you still want to stick to multiple db servers ... you could edit the original vicidial queries by inserting some UNION & JOIN commands to make them query 2 databases & give one single result ... or simply make new ones of your own, because as we all know, looking at the docs & coding new code is better than reading old code & modifying it, besides it stimulates the brain.
pylinuxian
 
Posts: 147
Joined: Tue Feb 26, 2008 2:21 pm

Postby rortizde » Mon Jun 09, 2008 2:54 pm

Thanks pylinuxian! I'll take a look at that and see what we come up with. I was also thinking of maybe creating some PHP daemons to reformat the Vicidial db keys. That way I could extract the information from each db and then store it in my production db but with a new unique key (this is because each new Vicidial instance will have a default db called "asterisk" and most likely keys will duplicate themselves (since all Vicidial dbs will be the same "asterisk" and the keys are sequential)). Sounds more complicated, but from what I hear Load Balancing is still not very stable.

I'll keep you guys posted.
rortizde
 
Posts: 11
Joined: Mon Jun 09, 2008 11:29 am
Location: Dominican Republic

Postby Op3r » Tue Jun 10, 2008 7:14 am

you heard it wrong mate.

Load balancing is a way to go if you want to have fully stable vicidial system.

You will only need 1 database and you can add more than enough asterisk servers connected to it.
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1424
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila

Postby pylinuxian » Tue Jun 10, 2008 8:28 am

Vicidial instance will have a default db called "asterisk"

not if you make a rename database command ;)
& change its name in manager.conf

exmaple :

# The IP address of this machine
VARserver_ip => 10.0.0.8

# Database connection information
VARDB_server => 10.0.0.9
VARDB_database => d1
VARDB_user => secret1
VARDB_pass => secret1
VARDB_port => 3306

another dialer would have :

# The IP address of this machine
VARserver_ip => 10.0.0.7

# Database connection information
VARDB_server => 10.0.0.9
VARDB_database => d2
VARDB_user => secret2
VARDB_pass => secret2
VARDB_port => 3306

but could also have:

# The IP address of this machine
VARserver_ip => 10.0.0.7

# Database connection information
VARDB_server => 10.0.0.9
VARDB_database => d1
VARDB_user => secret1
VARDB_pass => secret1
VARDB_port => 3306

which means same db 8)
pylinuxian
 
Posts: 147
Joined: Tue Feb 26, 2008 2:21 pm

Postby rortizde » Wed Jun 11, 2008 8:48 am

Op3r:

I read the LOAD_BALANCING.txt in the Vicidial documentation, but it requires some advanced knowledge to set up...which we do not have yet.

pylinuxian:

what's the rename database command? is this done when installing Vicidial or after it's up and running? Can this work with VicidialNOW?

Thanks for all your help guys!
rortizde
 
Posts: 11
Joined: Mon Jun 09, 2008 11:29 am
Location: Dominican Republic

Postby pylinuxian » Wed Jun 11, 2008 9:16 am

what's the rename database command? is this done when installing Vicidial or after it's up and running?


either way it works ... since its in astguiclient.conf file

http://dev.mysql.com/doc/refman/5.1/en/ ... abase.html[/quote]
pylinuxian
 
Posts: 147
Joined: Tue Feb 26, 2008 2:21 pm

Postby rortizde » Wed Jun 11, 2008 9:37 am

pylinuxian:

I looked in my manager.conf file in my test VicidialNOW and this is the content:

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

[updatecron]
secret = 1234
read = command
write = command

[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user
write = command

[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user


Do I have to add the lines you posted?
rortizde
 
Posts: 11
Joined: Mon Jun 09, 2008 11:29 am
Location: Dominican Republic

Postby pylinuxian » Wed Jun 11, 2008 5:29 pm

I made a mistake its in astguiclient.conf file
pylinuxian
 
Posts: 147
Joined: Tue Feb 26, 2008 2:21 pm

Postby rortizde » Thu Jun 12, 2008 3:23 pm

pylinuxian:

I tried the changes you mentioned in astguiclient.conf and it worked like a charm. I'll have to try with two Vicidials now, since I only made the test with one (telling that one that his database is at another IP and not localhost). I created a test campaign and it created it at the remote database and did nothing on the local one...so, so far so good!

Thanks a million for you help...this is way easier than load balancing!
rortizde
 
Posts: 11
Joined: Mon Jun 09, 2008 11:29 am
Location: Dominican Republic


Return to Support

Who is online

Users browsing this forum: No registered users and 238 guests