backporting of new features in admin.php, vicidial.php and ADMIN_keepalive_ALL.pl

git-svn-id: svn://192.168.202.10@818 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-03-30 12:33:32 +00:00
parent 989bb07ea4
commit f786a3c019
4 changed files with 47 additions and 16 deletions
@@ -1,16 +1,17 @@
#!/usr/bin/perl
#
# ADMIN_keepalive_ALL.pl version 0.2
# ADMIN_keepalive_ALL.pl version 2.0.4.1
#
# Designed to keep the astGUIclient processes alive and check every minute
# Replaces all other ADMIN_keepalive scripts
# Uses /etc/astguiclient.conf file to know which processes to keepalive
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
#
# 61011-1348 - first build
# 61120-2011 - added option 7 for AST_VDauto_dial_FILL.pl
# 80330-0811 - added option 8 for ip_relay
#
$DB=0; # Debug flag
@@ -83,6 +84,7 @@ foreach(@conf)
# 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";
# 8 - ip_relay for blind monitoring\n";
if ($VARactive_keepalives =~ /X/)
{
@@ -97,6 +99,7 @@ $AST_VDremote_agents=0;
$AST_VDadapt=0;
$FastAGI_log=0;
$AST_VDauto_dial_FILL=0;
$ip_relay=0;
$runningAST_update=0;
$runningAST_send=0;
$runningAST_listen=0;
@@ -105,6 +108,7 @@ $runningAST_VDremote_agents=0;
$runningAST_VDadapt=0;
$runningFastAGI_log=0;
$runningAST_VDauto_dial_FILL=0;
$runningip_relay=0;
if ($VARactive_keepalives =~ /1/)
{
@@ -141,6 +145,11 @@ if ($VARactive_keepalives =~ /7/)
$AST_VDauto_dial_FILL=1;
if ($DB) {print "AST_VDauto_dial_FILL set to keepalive\n";}
}
if ($VARactive_keepalives =~ /8/)
{
$ip_relay=1;
if ($DB) {print "ip_relay set to keepalive\n";}
}
$REGhome = $PATHhome;
$REGhome =~ s/\//\\\//gi;
@@ -208,6 +217,11 @@ if ($DBX) {print "$i|$psoutput[$i]| \n";}
$runningAST_VDauto_dial_FILL++;
if ($DB) {print "AST_VDauto_dial_FILL RUNNING: |$psline[1]|\n";}
}
if ($psoutput[$i] =~ / ip_relay /)
{
$runningip_relay++;
if ($DB) {print "ip_relay RUNNING: |$psoutput[$i]|\n";}
}
$i++;
}
@@ -276,7 +290,8 @@ if (
( ($AST_VDremote_agents > 0) && ($runningAST_VDremote_agents < 1) ) ||
( ($AST_VDadapt > 0) && ($runningAST_VDadapt < 1) ) ||
( ($FastAGI_log > 0) && ($runningFastAGI_log < 1) ) ||
( ($AST_VDauto_dial_FILL > 0) && ($runningAST_VDauto_dial_FILL < 1) )
( ($AST_VDauto_dial_FILL > 0) && ($runningAST_VDauto_dial_FILL < 1) ) ||
( ($ip_relay > 0) && ($runningip_relay < 1) )
)
{
@@ -338,6 +353,11 @@ foreach (@psoutput2)
$runningAST_VDauto_dial_FILL++;
if ($DB) {print "AST_VDauto_dial_FILL RUNNING: |$psline[1]|\n";}
}
if ($psoutput2[$i] =~ / ip_relay /)
{
$runningip_relay++;
if ($DB) {print "ip_relay RUNNING: |$psoutput2[$i]|\n";}
}
$i++;
}
@@ -390,6 +410,11 @@ if ( ($AST_VDauto_dial_FILL > 0) && ($runningAST_VDauto_dial_FILL < 1) )
# add a '-L' to the command below to activate logging
`/usr/bin/screen -d -m -S ASTVDautoFILL $PATHhome/AST_VDauto_dial_FILL.pl`;
}
if ( ($ip_relay > 0) && ($runningip_relay < 1) )
{
if ($DB) {print "starting ip_relay through relay_control...\n";}
`$PATHhome/ip_relay/relay_control start 2>/dev/null 1>&2`;
}
}
@@ -712,6 +712,8 @@ installation on another machine)
- /usr/local/apache2/bin/apachectl start
- go to http://your-new-asterisk-server-ipaddress/ to see if it worked
- you are done
NOTE: If using PHP5 you may need to add the following line to php.ini:
short_open_tag = On
OPTIONAL- Load eaccelerator PHP-caching application:
- Go to http://eaccelerator.net and download the most recent package
@@ -172,10 +172,11 @@
# 71127-0408 - Added height and width settings for easier modification of screen size
# 71129-2025 - restricted callbacks count and list to campaign only
# 71226-1117 - added option to kick all calls from conference upon logout
# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release
#
$version = '2.0.4-143';
$build = '71226-1117';
$version = '2.0.4-144';
$build = '80330-0823';
require("dbconnect.php");
@@ -2361,7 +2362,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
var chan_name_color = 'log_text';
}
if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) )
if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) )
{
var hide_channel=1;
}
@@ -6758,7 +6759,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<td colspan=2 align=center> Customer Information: <span id="CusTInfOSpaN"></span></td>
</tr><tr>
<td align=right><font class="body_text"> Title: </td>
<td align=left><font class="body_text"><input type=text size=4 name=title maxlength=4 class="cust_form" value="">&nbsp; First: <input type=text size=12 name=first_name maxlength=30 class="cust_form" value="">&nbsp; MI: <input type=text size=1 name=middle_initial maxlength=1 class="cust_form" value="">&nbsp; Last: <input type=text size=15 name=last_name maxlength=30 class="cust_form" value=""></td>
<td align=left><font class="body_text"><input type=text size=4 name=title maxlength=4 class="cust_form" value="">&nbsp; First: <input type=text size=17 name=first_name maxlength=30 class="cust_form" value="">&nbsp; MI: <input type=text size=1 name=middle_initial maxlength=1 class="cust_form" value="">&nbsp; Last: <input type=text size=20 name=last_name maxlength=30 class="cust_form" value=""></td>
</tr><tr>
<td align=right><font class="body_text"> Address1: </td>
<td align=left><font class="body_text"><input type=text size=50 name=address1 maxlength=100 class="cust_form" value=""></td>
@@ -1141,12 +1141,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
# 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
# 71122-1135 - Added default transfer group for campaigns and inbound groups
# 71125-1751 - Added allowable transfer groups to campaign detail screen
# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
#
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.0.4-119';
$build = '71125-1751';
$admin_version = '2.0.4-120';
$build = '80330-0814';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -3861,7 +3862,7 @@ $admin_home_url_LU = $row[0];
<? if (strlen($users_hh) > 1) {
?>
<TR BGCOLOR=<?=$users_color ?>><TD ALIGN=LEFT COLSPAN=10><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Show Users </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Add A New User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1A"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Copy User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Search For A User </a></TD></TR>
<TR BGCOLOR=<?=$users_color ?>><TD ALIGN=LEFT COLSPAN=10><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> &nbsp; <a href="<? echo $PHP_SELF ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Show Users </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Add A New User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=1A"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Copy User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="<? echo $PHP_SELF ?>?ADD=550"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> Search For A User </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="./user_stats.php?user=<?=$user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> User Stats </a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="./user_status.php?user=<?=$user ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?=$subheader_font_size ?>> User Status </a> </TD></TR>
<? }
if (strlen($campaigns_hh) > 1)
{
@@ -8839,6 +8840,7 @@ if ($ADD==31)
$dial_status_d = $row[6];
$dial_status_e = $row[7];
$lead_order = $row[8];
$web_form_address = $row[11];
$allow_closers = $row[12];
$hopper_level = $row[13];
$auto_dial_level = $row[14];
@@ -9039,7 +9041,7 @@ if ($ADD==31)
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign Login Date: </td><td align=left>$campaign_logindate &nbsp; $NWB#vicidial_campaigns-campaign_logindate$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$row[2]</option></select>$NWB#vicidial_campaigns-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Park Extension: </td><td align=left><input type=text name=park_ext size=10 maxlength=10 value=\"$row[9]\"> - Filename: <input type=text name=park_file_name size=10 maxlength=10 value=\"$row[10]\">$NWB#vicidial_campaigns-park_ext$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=50 maxlength=255 value=\"$row[11]\">$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=50 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Allow Closers: </td><td align=left><select size=1 name=allow_closers><option>Y</option><option>N</option><option SELECTED>$allow_closers</option></select>$NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Allow Inbound and Blended: </td><td align=left><select size=1 name=campaign_allow_inbound><option>Y</option><option>N</option><option SELECTED>$campaign_allow_inbound</option></select>$NWB#vicidial_campaigns-campaign_allow_inbound$NWE</td></tr>\n";
@@ -9311,7 +9313,7 @@ if ($ADD==31)
}
##### CAMPAIGN CUSTOM STATUSES #####
if ($SUB==22)
{
@@ -9391,7 +9393,7 @@ if ($ADD==31)
echo "</FORM><br>\n";
}
##### CAMPAIGN HOTKEYS #####
if ($SUB==23)
{
echo "<br><b>CUSTOM HOT KEYS WITHIN THIS CAMPAIGN: &nbsp; $NWB#vicidial_campaign_hotkeys$NWE</b><br>\n";
@@ -9441,7 +9443,7 @@ if ($ADD==31)
echo "</form><BR>\n";
}
##### CAMPAIGN LEAD RECYCLING #####
if ($SUB==25)
{
echo "<br><br><b>LEAD RECYCLING WITHIN THIS CAMPAIGN: &nbsp; $NWB#vicidial_lead_recycle$NWE</b><br>\n";
@@ -9488,7 +9490,7 @@ if ($ADD==31)
echo "</FORM><br>\n";
}
##### CAMPAIGN AUTO-ALT-NUMBER DIALING #####
if ($SUB==26)
{
echo "<br><br><b>AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN: &nbsp; $NWB#vicidial_auto_alt_dial_statuses$NWE</b><br>\n";
@@ -9525,7 +9527,7 @@ if ($ADD==31)
echo "</FORM><br>\n";
}
##### CAMPAIGN PAUSE CODES #####
if ($SUB==27)
{
echo "<br><br><b>AGENT PAUSE CODES FOR THIS CAMPAIGN: &nbsp; $NWB#vicidial_pause_codes$NWE</b><br>\n";
@@ -9954,6 +9956,7 @@ if ( ($ADD==34) or ($ADD==31) )
{
if ($LOGmodify_campaigns==1)
{
##### CAMPAIGN LIST MIX SETTINGS #####
if ($SUB==29)
{
##### get list_id listings for dynamic pulldown