Load Balancing

All installation and configuration problems and questions

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

Load Balancing

Postby ajitekno » Sun Dec 02, 2007 12:50 pm

hi,

i have already a vicidial server up and running fine. i want to setup load balancing. I am wrtiting the process plz let me know if anything else i need to do.


Let us say you already have an Vicidial setup


prepare a server install all things and assume it

as your web and database server.

Copy all file .conf file of asterisk from 1

server and paste it to new server.

Take backup of databse from 1st server and delete

database.

restore database to this new database server.

In your 1st server change AST_SERVER-conf.pl

change database server ip.


remove these files from first server.

- AST_VDhopper.pl
- AST_cleanup_agent_log.pl
- ADMIN_adjust_GMTnow_on_leads.pl
- AST_DB_optimize.pl


2. The two servers need to be registered to each

other as IAX2 friends:
SERVER ONE(ASTtest1-10.10.10.15)
iax.conf:
register => ASTtest1:test@10.10.10.16

[ASTtest2]
type=friend
accountcode=IAXtrunk2
context=default
auth=plaintext
host=dynamic
permit=0.0.0.0/0.0.0.0
secret=test
qualify=yes

SERVER TWO(ASTtest2-10.10.10.16)
iax.conf:
register => ASTtest2:test@10.10.10.15

[ASTtest1]
type=friend
accountcode=IAXtrunk1
context=default
auth=plaintext
host=dynamic
permit=0.0.0.0/0.0.0.0
secret=test
qualify=yes


3. The two servers need to have wildcard

extensions assigned to the other server in the

dialplan:
SERVER ONE(ASTtest1-10.10.10.15)
extensions.conf:
[globals]
TRUNKIAX2=IAX2/ASTtest1:test@10.10.10.16

[default]
exten =>

_010*010*010*016*8600XXX,1,Dial(${TRUNKIAX2}/${EX

TEN:16},55,o)
exten =>

_010*010*010*016*8600XXX,2,Hangup

SERVER TWO(ASTtest2-10.10.10.16)
extensions.conf:
[globals]
TRUNKIAX1=IAX2/ASTtest2:test@10.10.10.15

[default]
exten =>

_010*010*010*015*8600XXX,1,Dial(${TRUNKIAX1}/${EX

TEN:16},55,o)
exten =>

_010*010*010*015*8600XXX,2,Hangup


4. For BOTH servers the VDAD extens need to be

setup there as well for the Load-Balance and

Load-Balance-Overflow AGI scripts, as well as

setting up the closer and inbound extens if

needed:

; VICIDIAL_auto_dialer transfer script

Load Balance Overflow:
exten =>

8367,1,AGI(call_log.agi,${EXTEN})
exten =>

8367,2,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
exten =>

8367,3,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
exten =>

8367,4,AGI(agi-VDAD_LO_transfer.agi,${EXTEN})
exten => 8367,5,Hangup

; VICIDIAL_auto_dialer transfer script

Load Balanced:
exten =>

8368,1,AGI(call_log.agi,${EXTEN})
exten =>

8368,2,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten =>

8368,3,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten =>

8368,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
exten => 8368,5,Hangup

; parameters for agi-VDAD_LB_closer.agi

(2 fields separated by five dashes "-----"):
; 1. the full extension formatted by

VICIDIAL for internal transfers * separated
; 2. the word START to denote the

beginning of the acceptance of the transfer
; inbound VICIDIAL transfer calls

[INTERNAL TRANSFER]
exten => _90009.,1,Answer

; Answer the line
exten =>

_90009.,2,AGI(agi-VDAD_LB_closer.agi,${EXTEN}----

-START)
exten => _90009.,3,Hangup

; parameters for agi-VDAD_LO_closer.agi

(2 fields separated by five dashes "-----"):
; 1. the full extension formatted by

VICIDIAL for internal transfers * separated
; 2. the word START to denote the

beginning of the acceptance of the transfer
; inbound VICIDIAL transfer calls [LOCAL

TRANSFER]
exten => _990009.,1,Answer

; Answer the line
exten =>

_990009.,2,AGI(agi-VDAD_LO_closer.agi,${EXTEN}---

--START)
exten => _990009.,3,Hangup

; inbound VICIDIAL call with prompt for

4-digit fronter code
exten => 1234,1,Answer ;

Answer the line
exten =>

1234,2,AGI(agi-VDAD_LO_closer_inbound.agi,CL_GALL

ERIA-----7275555134-----Closer-----park----------

999-----1)
exten => 1234,3,Hangup


5. Reload both Asterisk servers and for outbound

change the VDAD exten to 8367 or 8368 and kill

the AST_VDauto_dial.pl scripts on both servers so

they can restart and you can now look at the

AST_timeonVDADall.php page(per campaign

time-on-VDAD available from the STATS and REPORTS

link on the vicidial admin screen) that will allo

you to see the server_ip of the agent and the

server_ip of the call per campaign across all

campaigns.
ajitekno
 
Posts: 18
Joined: Thu Apr 19, 2007 9:20 am

Postby ramindia » Mon Dec 03, 2007 1:20 am

Hi

You do not require anything else other than the

3 Servers, 1 for database and apache
2nd server for vicidial
3rd server for vicidial


Follow the Loadbalance.txt

your load balance setup is up and running


check 2 and 3rd servers are registered each other with IAX trunk

Note: make sure you replace the ip address according to your setup.

ram
Kindly post your feedback, if this solution works.
so its very usefull for others who join later as a NEWBIE.
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

load balance

Postby ajitekno » Mon Dec 03, 2007 3:35 am

i want to setup on 2 servers only 1 for database and another for asterisk vicidial.


In this case should i install vicidial and asterisk on both servers. if yes , then what should i put in sip.conf extensions.conf . same config as first server?


ramindia wrote:Hi

You do not require anything else other than the

3 Servers, 1 for database and apache
2nd server for vicidial
3rd server for vicidial


Follow the Loadbalance.txt

your load balance setup is up and running


check 2 and 3rd servers are registered each other with IAX trunk

Note: make sure you replace the ip address according to your setup.

ram
ajitekno
 
Posts: 18
Joined: Thu Apr 19, 2007 9:20 am

Postby ramindia » Mon Dec 03, 2007 7:21 am

Hi

you want to do only 2 servers

you need to install mysql+apache in one server

second server only Vicidial thats all.

just configure vicidial server as mentioned in the scratch_install and astconf point the database settings to mysql server ip address


ram
Kindly post your feedback, if this solution works.
so its very usefull for others who join later as a NEWBIE.
ramindia
 
Posts: 688
Joined: Wed Oct 11, 2006 4:06 am
Location: India

split load on two servers

Postby angelos » Mon Dec 03, 2007 7:57 am

there is yet another way of doing it . Set everything up on one server.

Then install asterisk and the agi-scripts on the second server
and point the asterisk ip on the first server's astguiclient.conf file.

Warning , this will work for only a single asterisk setup, Not any more
but will allow you to have a cheap asterisk box
angelos
 
Posts: 7
Joined: Wed Nov 28, 2007 11:15 am
Location: Greece

Postby Op3r » Mon Dec 03, 2007 1:13 pm

and remove some of the crontab entries.
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1432
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila

Postby enjay » Mon Dec 03, 2007 1:32 pm

If you have 2 servers and 1 is Asterisk/VICIDIAL and the other is Apache/MySQL then you are not load balancing anything. You are purely offloading the DB/WEB Processes to another server.

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

Postby Op3r » Mon Dec 03, 2007 1:34 pm

i think thats called multi server set up
Get paid for US outbound Toll Free calls. PM me.
Op3r
 
Posts: 1432
Joined: Wed Jun 07, 2006 7:53 pm
Location: Manila


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 136 guests