Separate/Multiple Servers

Any and all non-support discussions

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

Separate/Multiple Servers

Postby eric.c » Wed Jun 14, 2006 5:28 am

Hi List,

I'm trying to setup an environment which consist of 3 servers (see below). Actually I have no idea whether I'm doing it correctly. Can someone enlighten? and sorry for the long posting.

Machine 1: Asterisk Server (192.168.0.102)
- install all CPAN modules as per scratch_install
- install asterisk-perl-module
- install sox, screen, ntpd, zaptel, libpri & asterisk
- adduser cron
- configure asterisk as per scratch_install
- install astguiclient_1.1.11 EXACTLY as scratch_install SUBPHASE 6.0
- AST_SERVER_conf.pl configured

Machine 2: Apache + astguiclient & vicidial (192.168.0.101)
- install all CPAN modules as per scratch_install
- install asterisk-perl-module
- install screen, ntpd, apache, php
- adduser cron
- install astguiclient_1.1.11 EXACTLY as scratch_install SUBPHASE 6.0
- dbconnect.php and AST_SERVER_conf.pl configured

Machine 3: MySQL Server (192.168.0.100)
- install all CPAN modules as per scratch_install
- install asterisk-perl-module
- install ntpd, MySQL
- adduser cron
- install astguiclient_1.1.11 EXACTLY as scratch_install SUBPHASE 6.0
- dbconnect.php and AST_SERVER_conf.pl configured
- perform as per scratch_install (ip changed) and added 2 additional line:
GRANT SELECT,INSERT,UPDATE,DELETE on asterisk.* TO cron@192.168.0.102 IDENTIFIED BY '1234';
GRANT SELECT on asterisk.phones TO idcheck@192.168.0.102 IDENTIFIED BY '1234';
>>> server_updater values is my asterisk server ip?
- SUBPHASE 6.3: added records to vicidial_users and vicidial_conferences.
>>> vicidial_conferences (server_ip) referring to asterisk server ip?

+++++++++++++++++++++++++++++++++++++++++++++

At SUBPHASE 6.4, I only add specific entry to each of the servers. This is my entry:

Asterisk Server - add the CVSROOT, start time server, load digium cards, subsys local login, sleep 20 secs, start asterisk

MySQL Server - start time server, startup MySQL, subsys local login

Apache, astguiclient & vicidial Server - start time server, startup apache, subsys local login

+++++++++++++++++++++++++++++++++++++++++++++

I have all SUBPHASE 6.5 entry into Asterisk Server ONLY.

+++++++++++++++++++++++++++++++++++++++++++++

After doing the above, I able to view agc, astguiclient as well as vicidial page. Making and receiving calls using Zap channel also not a problem.

Question:
1. Is the above mentioned setup correct?

2. I keep getting this message in my Asterisk Server:


New mail for root@AstServer has arrived:
----
From: root@AstServer.astserver.net
Subject: cron: /home/cron/AST_vm_update.pl
unknown remote host: at /home/cron/AST_vm_update.pl line 144

----

New mail for root@AstServer has arrived:
----
From: root@AstServer.astserver.net
Subject: cron: /home/cron/AST_conf_update.pl
unknown remote host: at /home/cron/AST_conf_update.pl line 144

----

Did I did anything wrong or missing something here? Advice is highly appreciated. Thank you very much.

Eric.C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Wed Jun 14, 2006 6:42 am

How many agents and at what dial level are you shooting for?

What kind of trunks will you use? if VOIP, what codec?

There are a lot of things on that list that you don't need to do, but I'll wait until you respond before I recommend a specific setup.

conf_update and vm_update need to have manager login capability, check your servers table for the manager login fields and make sure you have manager.conf on your Asterisk server setup with those. Also, make sure your AST_SERVER_conf.pl files are set to the IP address of your Asterisk server.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Wed Jun 14, 2006 7:44 am

Hi Matt-

Thanks for your prompt reply. Pls find my reply as follow:

1. How many agents and at what dial level are you shooting for?
>> Actually I haven't go to production deployment yet. I'm just familiarizing and polishing my knowledge on setting this up. I tried installing everything in a single machine and it went well. So trying other deployment method (multiple machine). Anyway, I'll be testing with 7 agents. Dial level not decided.

2. What kind of trunks will you use? if VOIP, what codec?
>> IAX2, gsm

3. conf_update and vm_update need to have manager login capability, check your servers table for the manager login fields and make sure you have manager.conf on your Asterisk server setup with those. Also, make sure your AST_SERVER_conf.pl files are set to the IP address of your Asterisk server.
>> Arghh~ I missed this config. Thanks.

Hopefully my reply doesn't seems silly to you. :)

Cheers,
Eric.C
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Wed Jun 14, 2006 9:49 am

OK, 7 agents is easy and kind of small for 3 machines, but you will be able to easily and quickly expand. You have some choices with how you can configure your system.

1. First choice is using two of the servers as Asterisk/VICIDIAL servers, and the third server as a MySQL/Apache server.

The two VICIDIAL servers can be configured pretty much the same and you need to follow the instructions in the LOAD_BALANCE.txt doc file to get them to balance calls between them. Then on the MySQL/Apache server you just need the database and the agc, astguiclient and vicidial web folders.


2. Second choice, one Asterisk server, one VICIDIAL/Apache server and one MySQL server. You only need one set of VICIDIAL scripts for this setup and they are on the VICIDIAL server, they don't need to be on the other two machines(make sure you set the AST_SERVER_conf.pl server_ip to the Asterisk server, not the VICIDIAL server)


Let us know which one you choose and if you need any other help.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Wed Jun 14, 2006 8:26 pm

Alright, I'll opt for the 2nd option. Once success, I'll try the 1st option as well.

Will update on my trial. Thanks Matt-
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby eric.c » Wed Jun 14, 2006 8:41 pm

Hi Matt-

I noticed in install_server_files.pl, there's some scripts like:

- $agibin = '/var/lib/asterisk/agi-bin';
- $sounds = '/var/lib/asterisk/sounds';
- $monitor = '/var/spool/asterisk';

As per suggested, only need to install a set of VICIDIAL scripts in VICIDIAL server. But those folder does not exist in VICIDIAL server. Any modification need to be done on install_server_files.pl ? Many thanks.
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Wed Jun 14, 2006 10:27 pm

eric.c wrote:- $agibin = '/var/lib/asterisk/agi-bin';
- $sounds = '/var/lib/asterisk/sounds';
- $monitor = '/var/spool/asterisk';


You are correct, the sound files and monitor directories do need to be present on the Asterisk server while the agi-bin directory and scripts could work on the VICIDIAL server as FASTAGI although I have not tested this so would not recommend it. When you put the agi-bin scripts on the Asterisk server you will also need to make sure the /home/cron/AST_SERVER_conf.pl script is present on the server and configured properly.

Sorry, I forgot about that, I usually install Asterisk and VICIDIAL together so I'm a bit rusty on this type of config.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Thu Jun 15, 2006 9:51 pm

Errmm, correct my understanding. As per your explanation, install_server_files.pl should be run on both VICIDIAL as well as Asterisk server. I do not need to modify the install_server_files.pl but the AST_SERVER_conf.pl only?

Thank you very much Matt-
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Thu Jun 15, 2006 10:04 pm

Yes, but you do not need to have any crontab entries on the Asterisk server, only on the VICIDIAL server. You will need to configure the AST_SERVER_conf.pl files on both servers(server_ip should be the Asterisk server IP on both conf files)
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Fri Jun 16, 2006 5:20 am

Thanks for assisting, Matt-

Setup was successful. I'll post a detailed steps on setting this up later, hopefully it helps those wanting this setup in future.
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby eric.c » Tue Jun 20, 2006 1:02 am

Hi all, here you go:

*** Please note that this is just telling what need to be done on specific server. Refer scratch_install for installation flow/step.
*** Shall there anything wrong with this, please let me know

Machine 1: Asterisk Server
- install all CPAN modules
- install asterisk-perl-module
- install sox, screen, ntpd, zaptel, libpri & asterisk
- adduser cron
- configure asterisk (SUBPHASE 5 to SUBPHASE 5.3)
- install astguiclient_1.1.11 EXACTLY as scratch_install SUBPHASE 6.0
- configure AST_SERVER_conf.pl [/home/cron](change $server_ip and $DB_server to your Asterisk and MySQL server ip respectively)
- configure asterisk (SUBPHASE 6.2)
- Follow SUBPHASE 6.4 instruction of scratch_install (you only need entries required by this server)

Machine 2: Apache + astguiclient & vicidial
- install all CPAN modules
- install asterisk-perl-module
- install screen, ntpd, apache, php
- adduser cron
- install astguiclient_1.1.11 EXACTLY as scratch_install SUBPHASE 6.0
- configure dbconnect.php [located at /usr/local/apache2/htdocs/(agc, astguiclient, vicidial)] and AST_SERVER_conf.pl [/home/cron] (change $server_ip and $DB_server to your Asterisk and MySQL server ip respectively)
- Follow instructions on SUBPHASE 6.1 number 3.
- Follow SUBPHASE 6.4 instruction of scratch_install (you only need entries required by this server)
- Follow SUBPHASE 6.5 instructions of scratch_install

Machine 3: MySQL Server
- install all CPAN modules
- install ntpd, MySQL
- Follow SUBPHASE 6.1 instructions of scratch_install
~~~ Set your servers.telnet_host to your asterisk server ip
- Follow SUBPHASE 6.3 instructions of scratch_install
- Follow SUBPHASE 6.4 instruction of scratch_install (you only need entries required by this server)
- You'll need to follow SUBPHASE 6.6 instructions if you would like to add test leads.
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Tue Jun 20, 2006 6:16 am

Thank you very much for posting this. If you don't mind I'll include your notes in documentation to be included with future releases.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Tue Jun 20, 2006 8:07 am

No prob Matt- thanks for including.
Cheers,
Eric C
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby enjay » Tue Jun 20, 2006 6:55 pm

If you have 2 Asterisk servers do you defined that twice in the AST_SERVER_conf.pl?

-enjay
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby eric.c » Tue Jun 20, 2006 9:02 pm

Hi enjay-

thought of this and would like to give a try but not till I get extra server. 1st guess will be - YEAH, AST_SERVER_conf.pl need to be modified. Can someone correct me?

Eric Chung
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Tue Jun 20, 2006 9:43 pm

AST_SERVER_conf.pl should only have one Asterisk server listed in it. If you are using multiple Asterisk and/or want to do load balancing you will still only put one VICIDIAL server entry per AST_SERVER_conf.pl.

Load balancing takes place over IAX channels between servers and the database will route calls from one server to another.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby eric.c » Wed Jun 21, 2006 12:41 am

Hi Matt-

Not sure whether I understand you. Correct me.

If I have multiple * server, I need to:
1. install_server_files.pl on new * server
2. modify AST_SERVER_conf.pl to point to my MySQL server
3. add new * server record in MySQL server
insert into servers (server_id........) .... ;

Thank you.

Eric Chung
eric.c
 
Posts: 10
Joined: Wed Jun 07, 2006 9:10 pm

Postby mflorell » Wed Jun 21, 2006 1:14 am

That looks pretty much correct. You basically need to do almost everything you did to setup your first Asterisk/VICIDIAL-only server except for leaving out a few crontab entries(mentioned in the LOAD_BALANCING.txt file):
These scripts do not need to be in the crontab on the second server:
- AST_VDhopper.pl
- AST_cleanup_agent_log.pl
- ADMIN_adjust_GMTnow_on_leads.pl
- AST_DB_optimize.pl

I would recommend reading the LOAD_BALANCING.txt doc as well for more information.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby jansaell » Fri Jun 23, 2006 4:52 am

Small q!

When you have 1 Apace box controlling multiple vicidial servers as you say that you hade one Apache server and 7 vicidial servers and one databaseserver, how do you controll what vicidial server the user should use when they login?

Best regards
jan
jansaell
 
Posts: 6
Joined: Fri Jun 23, 2006 4:49 am

Postby mflorell » Fri Jun 23, 2006 5:04 am

The phones table has a listing of phone extensions, phone login and phone password and their associated server_ip(this is the VICIDIAL server_ip) when the agent logs in they have to use a phone_login and phone_password. That then looks up the extension, protocol and server_ip of the phone in the "phones" table and places a call to that phone on that server.

And in reality we have two load-balanced Apache servers in that setup (load-balancing achieved with the linux app "balance" on one of those servers)
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 56 guests