by 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.