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:
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user