added AST_VDauto_dial_FILL.pl script to ADMIN_keepalive_ALL.pl script as option 7. Also, added to install and docs

git-svn-id: svn://192.168.202.10@399 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-11-21 01:44:14 +00:00
parent bdac926a67
commit 4e54a9f513
7 changed files with 64 additions and 11 deletions
+6 -1
View File
@@ -63,7 +63,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
this one script. This can even be run in the crontab if you are on
a DHCP service and need to modify your IP address often
11. Added new script to allow for dial-out-only(no agents on the server)
VICIDIAL servers as well as balance dialing where a server with
available trunk lines can dial lines for another server that does not
have enough lines to dial for it's dial_level. AST_VDauto_dial_FILL.pl
script is only for multi-server systems and is started from new
ADMIN_keepalive_ALL.pl script with option 7 in astguiclient.conf
+28 -3
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# ADMIN_keepalive_ALL.pl version 0.1
# ADMIN_keepalive_ALL.pl version 0.2
#
# Designed to keep the astGUIclient processes alive and check every minute
# Replaces all other ADMIN_keepalive scripts
@@ -10,6 +10,7 @@
#
#
# 61011-1348 - first build
# 61120-2011 - added option 7 for AST_VDauto_dial_FILL.pl
#
$DB=0; # Debug flag
@@ -81,6 +82,7 @@ foreach(@conf)
# 4 - AST_VDremote_agents\n";
# 5 - AST_VDadapt (If multi-server system, this must only be on one server)\n";
# 6 - FastAGI_log\n";
# 7 - AST_VDauto_dial_FILL\n";
if ($VARactive_keepalives =~ /X/)
{
@@ -94,6 +96,7 @@ $AST_VDauto_dial=0;
$AST_VDremote_agents=0;
$AST_VDadapt=0;
$FastAGI_log=0;
$AST_VDauto_dial_FILL=0;
$runningAST_update=0;
$runningAST_send=0;
$runningAST_listen=0;
@@ -101,6 +104,7 @@ $runningAST_VDauto_dial=0;
$runningAST_VDremote_agents=0;
$runningAST_VDadapt=0;
$runningFastAGI_log=0;
$runningAST_VDauto_dial_FILL=0;
if ($VARactive_keepalives =~ /1/)
{
@@ -132,6 +136,11 @@ if ($VARactive_keepalives =~ /6/)
$FastAGI_log=1;
if ($DB) {print "FastAGI_log set to keepalive\n";}
}
if ($VARactive_keepalives =~ /7/)
{
$AST_VDauto_dial_FILL=1;
if ($DB) {print "AST_VDauto_dial_FILL set to keepalive\n";}
}
$REGhome = $PATHhome;
$REGhome =~ s/\//\\\//gi;
@@ -194,6 +203,11 @@ if ($DBX) {print "$i|$psoutput[$i]| \n";}
$runningFastAGI_log++;
if ($DB) {print "FastAGI_log RUNNING: |$psline[1]|\n";}
}
if ($psline[1] =~ /$REGhome\/AST_VDauto_dial_FILL\.pl/)
{
$runningAST_VDauto_dial_FILL++;
if ($DB) {print "AST_VDauto_dial_FILL RUNNING: |$psline[1]|\n";}
}
$i++;
}
@@ -261,7 +275,8 @@ if (
( ($AST_VDauto_dial > 0) && ($runningAST_VDauto_dial < 1) ) ||
( ($AST_VDremote_agents > 0) && ($runningAST_VDremote_agents < 1) ) ||
( ($AST_VDadapt > 0) && ($runningAST_VDadapt < 1) ) ||
( ($FastAGI_log > 0) && ($runningFastAGI_log < 1) )
( ($FastAGI_log > 0) && ($runningFastAGI_log < 1) ) ||
( ($AST_VDauto_dial_FILL > 0) && ($runningAST_VDauto_dial_FILL < 1) )
)
{
@@ -317,7 +332,11 @@ foreach (@psoutput2)
$runningFastAGI_log++;
if ($DB) {print "FastAGI_log RUNNING: |$psline[1]|\n";}
}
if ($psline[1] =~ /$REGhome\/AST_VDauto_dial_FILL\.pl/)
{
$runningAST_VDauto_dial_FILL++;
if ($DB) {print "AST_VDauto_dial_FILL RUNNING: |$psline[1]|\n";}
}
$i++;
}
@@ -364,6 +383,12 @@ if ( ($FastAGI_log > 0) && ($runningFastAGI_log < 1) )
# add a '-L' to the command below to activate logging
`/usr/bin/screen -d -m -S ASTfastlog $PATHhome/FastAGI_log.pl --debug`;
}
if ( ($AST_VDauto_dial_FILL > 0) && ($runningAST_VDauto_dial_FILL < 1) )
{
if ($DB) {print "starting AST_VDauto_dial_FILL...\n";}
# add a '-L' to the command below to activate logging
`/usr/bin/screen -d -m -S ASTVDautoFILL $PATHhome/AST_VDauto_dial_FILL.pl`;
}
}
@@ -308,6 +308,7 @@ print conf "# 3 - AST_VDauto_dial\n";
print conf "# 4 - AST_VDremote_agents\n";
print conf "# 5 - AST_VDadapt (If multi-server system, this must only be on one server)\n";
print conf "# 6 - FastAGI_log\n";
print conf "# 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
print conf "VARactive_keepalives => $VARactive_keepalives\n";
print conf "\n";
print conf "# Settings for FastAGI logging server\n";
+8 -1
View File
@@ -6,10 +6,17 @@
# Places auto_dial calls on the VICIDIAL dialer system across all servers only
# for campaigns that have a shortfall in number of lines dialed.
#
# Script needs to be started by ADMIN_keepalive_ALL.pl script (option 7)
#
# Not for use in systems with only one Asterisk/VICIDIAL server
#
# Should only be run on one server in a multi-server Asterisk/VICIDIAL cluster
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# changes:
# 61115-1246 - First build, framework setup, non-functional
# 61120-2008 - second alpha version, functional and tested in production
#
@@ -646,7 +653,7 @@ while($one_day_interval > 0)
$affected_rows = $dbhA->do($stmtA);
### sleep for a tenth of a second to not flood the server with new calls
usleep(1*100*1000);
usleep(1*25*1000);
}
}
+13 -4
View File
@@ -2,13 +2,21 @@ VICIDIAL Dialing-out Balance FILL proces flow 2006-11-20
** FULL VICIDIAL BALANCE DIALING FUNCTIONALITY WAS ADDED IN THE 2.0.2 RELEASE **
This will outline the process I have thought through in my head for a process to allow for dialing-out only servers and for lines on one VICIDIAL server to be utilized when another dialing server does not have enough lines to meet it's dial level for the number of agents that are on the server.
This will outline the process I have thought through in my head for a way to allow for dialing-out only servers and for dialing-out-trunk-lines on one VICIDIAL server to be utilized when another dialing server does not have enough lines to meet it's dial level for the number of agents that are on the server.
This process is made much more complicated by the addition of the new campaign-reserved-trunks feature for servers, meaning that you need to check on the trunk reservations and their settngs before being able to place any calls.
This script(AST_VDauto_dial_FILL.pl) will be a constantly running script that needs to only be run on one server in a VICIDIAL cluster of servers.
This script will be started up and monitored by the ADMIN_keepalive_ALL.pl script.
This script is not needed on a single-server or single-VICIDIAL/Asterisk server setup.
MySQL changes:
MySQL database changes needed for this new feature:(already in upgrade_2.0.2.sql file)
ALTER TABLE vicidial_auto_calls MODIFY call_type ENUM('IN','OUT','OUTBALANCE') default 'OUT';
Added OUTBALANCE to keep track of the calls that were originated by the Balance FILL process.
- Added OUTBALANCE to keep track of the calls that were originated by the Balance FILL process.
@@ -28,6 +36,7 @@ Process Flow of the AST_VDauto_dial_FILL.pl script:
- Loop through these servers
- Calculate the available trunks for this campaign per server
- Calculate the number of trunks to dial for this server for this campaign
- Select leads from the hopper and dial
(this step is identical to normal AST_VDauto_dial.pl script)
+5 -2
View File
@@ -8,6 +8,9 @@ The primary reason to do load balancing, or clustering of multiple VICIDIAL serv
Another reason for load balancing is the ability to use cheaper hardware on the server side. It is much cheaper and more fault-tolerant to buy four P4 2.0GHz 1U servers for $800 a piece than it is to buy a single 4U quad Xeon 3.2GHz server. The four 1U servers will have more total capacity, can be easily scaled and if one fails you've only lost 25% of capacity instead of everything. This philosophy has serverd our call center very well over the last two years.
As of release 2.0.2, a new script(AST_VDauto_dial_FILL.pl) allows for dial-out-only(no agents on the server) VICIDIAL servers as well as balance dialing where a server with available trunk lines can dial lines for another server that does not have enough lines to dial for it's dial_level. AST_VDauto_dial_FILL.pl script is only for multi-server systems and is started from new ADMIN_keepalive_ALL.pl script with option 7 in astguiclient.conf.
How do I set up load balancing on my two server VICIDIAL setup?
@@ -21,8 +24,8 @@ NOTE: In a multi-server setup you may want to have your database and web server
- AST_cleanup_agent_log.pl
- ADMIN_adjust_GMTnow_on_leads.pl
- AST_DB_optimize.pl
- ADMIN_keepalive_AST_VDadapt.pl
- AST_VDadapt.pl
- AST_VDauto_dial_FILL.pl
2. The two servers need to be registered to each other as IAX2 friends:
@@ -131,6 +134,6 @@ If you have any questions or problems please post to the astguiclient-users list
- AST_cleanup_agent_log.pl
- ADMIN_adjust_GMTnow_on_leads.pl
- AST_DB_optimize.pl
- ADMIN_keepalive_AST_VDadapt.pl
- AST_VDadapt.pl
- AST_VDauto_dial_FILL.pl
+3
View File
@@ -123,6 +123,7 @@ if (length($ARGV[0])>1)
print " 4 - AST_VDremote_agents\n";
print " 5 - AST_VDadapt (If multi-server system, this must only be on one server)\n";
print " 6 - FastAGI_log\n";
print " 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
print " [--fastagi_log_min_servers=3] = define FastAGI log min servers\n";
print " [--fastagi_log_max_servers=16] = define FastAGI log max servers\n";
print " [--fastagi_log_min_spare_servers=2] = define FastAGI log min spare servers\n";
@@ -978,6 +979,7 @@ else
print " 4 - AST_VDremote_agents\n";
print " 5 - AST_VDadapt (If multi-server system, this must only be on one server)\n";
print " 6 - FastAGI_log\n";
print " 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
print "Enter active keepalives or press enter for default: [$VARactive_keepalives] ";
$PROMPTactive_keepalives = <STDIN>;
chomp($PROMPTactive_keepalives);
@@ -1202,6 +1204,7 @@ print conf "# 3 - AST_VDauto_dial\n";
print conf "# 4 - AST_VDremote_agents\n";
print conf "# 5 - AST_VDadapt (If multi-server system, this must only be on one server)\n";
print conf "# 6 - FastAGI_log\n";
print conf "# 7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)\n";
print conf "VARactive_keepalives => $VARactive_keepalives\n";
print conf "\n";
print conf "# Settings for FastAGI logging server\n";