updated docs and ADMIN_backup.pl script

git-svn-id: svn://192.168.202.10@797 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-03-17 20:14:30 +00:00
parent 310b818ac9
commit 3714328ee2
7 changed files with 113 additions and 35 deletions
+39 -13
View File
@@ -10,6 +10,7 @@
# CHANGELOG
#
# 80316-2211 - First Build
# 80317-1609 - Added Sangoma conf file backup and changed FTP settings
#
@@ -145,16 +146,16 @@ foreach(@conf)
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_host/) && ($CLIFTP_host < 1) )
{$VARFTP_host = $line; $VARFTP_host =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_user/) && ($CLIFTP_user < 1) )
{$VARFTP_user = $line; $VARFTP_user =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_pass/) && ($CLIFTP_pass < 1) )
{$VARFTP_pass = $line; $VARFTP_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_port/) && ($CLIFTP_port < 1) )
{$VARFTP_port = $line; $VARFTP_port =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_dir/) && ($CLIFTP_dir < 1) )
{$VARFTP_dir = $line; $VARFTP_dir =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) )
{$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;}
$i++;
}
@@ -214,12 +215,15 @@ else
}
$conf='_CONF_';
$sangoma='_SANGOMA_';
$linux='_LINUX_';
$bin='_BIN_';
$web='_WEB_';
$sounds='_SOUNDS_';
$all='_ALL_';
$tar='.tar';
$gz='.gz';
$sgSTRING='';
`cd $ARCHIVEpath`;
`mkdir $ARCHIVEpath/temp`;
@@ -234,6 +238,25 @@ if ( ($without_conf < 1) && ($db_only < 1) )
{
### BACKUP THE ASTERISK CONF FILES ON THE SERVER ###
`$tarbin cf $ARCHIVEpath/temp/$VARserver_ip$conf$wday$tar /etc/astguiclient.conf /etc/zaptel.conf /etc/asterisk`;
### BACKUP THE WANPIPE CONF FILES(if there are any) ###
if ( -e ('/etc/wanpipe/wanpipe1.conf'))
{
$sgSTRING = '/etc/wanpipe/wanpipe1.conf ';
if ( -e ('/etc/wanpipe/wanpipe2.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe2.conf ';}
if ( -e ('/etc/wanpipe/wanpipe3.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe3.conf ';}
if ( -e ('/etc/wanpipe/wanpipe4.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe4.conf ';}
if ( -e ('/etc/wanpipe/wanpipe5.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe5.conf ';}
if ( -e ('/etc/wanpipe/wanpipe6.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe6.conf ';}
if ( -e ('/etc/wanpipe/wanpipe7.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe7.conf ';}
if ( -e ('/etc/wanpipe/wanpipe8.conf')) {$sgSTRING .= '/etc/wanpipe/wanpipe8.conf ';}
if ( -e ('/etc/wanpipe/wanrouter.rc')) {$sgSTRING .= '/etc/wanpipe/wanrouter.rc ';}
`$tarbin cf $ARCHIVEpath/temp/$VARserver_ip$sangoma$wday$tar $sgSTRING`;
}
### BACKUP OTHER CONF FILES ON THE SERVER ###
`$tarbin cf $ARCHIVEpath/temp/$VARserver_ip$linux$wday$tar /etc/my.cnf /etc/hosts /etc/rc.d/rc.local /etc/resolv.conf`;
}
if ( ($conf_only < 1) && ($db_only < 1) && ($without_web < 1) )
@@ -257,6 +280,9 @@ if ( ($conf_only < 1) && ($db_only < 1) && ($without_sounds < 1) )
### PUT EVERYTHING TOGETHER TO BE COMPRESSED ###
`$tarbin cf $ARCHIVEpath/$VARserver_ip$all$wday$tar $ARCHIVEpath/temp`;
### REMOVE OLD GZ FILE
`rm -f $ARCHIVEpath/$VARserver_ip$all$wday$tar$gz`;
### COMPRESS THE ALL FILE ###
`$gzipbin -9 $ARCHIVEpath/$VARserver_ip$all$wday$tar`;
@@ -268,9 +294,9 @@ if ( ($conf_only < 1) && ($db_only < 1) && ($without_sounds < 1) )
if ($ftp_transfer > 0)
{
use Net::FTP;
$ftp = Net::FTP->new("$VARFTP_host", Port => "$VARFTP_port", Debug => "$FTPdebug");
$ftp->login("$VARFTP_user","$VARFTP_pass");
$ftp->cwd("$VARFTP_dir");
$ftp = Net::FTP->new("$VARREPORT_host", Port => "$VARREPORT_port", Debug => "$FTPdebug");
$ftp->login("$VARREPORT_user","$VARREPORT_pass");
$ftp->cwd("$VARREPORT_dir");
$ftp->binary();
$ftp->put("$ARCHIVEpath/$VARserver_ip$all$wday$tar$gz", "$VARserver_ip$all$wday$tar$gz");
$ftp->quit;
+4
View File
@@ -267,6 +267,10 @@ use asterisk;
##### make sure on these queries that you change the server_ip "10.10.10.15"
##### to the server IP that you are using
# NOTE: make sure you do NOT put any spaces or other punctuation in the
# server_id, phone, extension, or user fields in the queries below if you edit them.
insert into servers (server_id,server_description,server_ip,active,asterisk_version)values('TESTast','Test install of Asterisk server', '10.10.10.15','Y','1.2.26.2');
insert into server_updater values('10.10.10.15','');
+36 -17
View File
@@ -122,27 +122,46 @@ NOTE: at the bottom of this document are conf examples for a 3 server load balan
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
; Below are the parameters needed for the script to be run properly
; 1. the method of call handling for the script:
; - CID - CID received, add record with phone number
; - CIDLOOKUP - Lookup CID to find record in whole system
; - CIDLOOKUPRL - Restrict lookup to one list
; - CIDLOOKUPRC - Restrict lookup to one campaign's lists
; - CLOSER - Closer calls from VICIDIAL fronters
; - ANI - ANI received, add record with phone number
; - ANILOOKUP - Lookup ANI to find record in whole system
; - ANILOOKUPRL - Restrict lookup to one list
; - 3DIGITID - Enter 3 digit code to go to agent
; - 4DIGITID - Enter 4 digit code to go to agent
; - 5DIGITID - Enter 5 digit code to go to agent
; - 10DIGITID - Enter 10 digit code to go to agent
; 2. the method of searching for an available agent:
; - LO - Load Balance Overflow only (priority to home server)
; - LB - <default> Load Balance total system
; - SO - Home server only
; 3. the full name of the IN GROUP to be used in vicidial for the inbound call
; 4. the phone number that was called, for the log entry
; 5. the callerID or lead_id of the person that called(usually overridden)
; 6. the park extension audio file name if used
; 7. the status of the call initially(usually not used)
; 8. the list_id to insert the new lead under if it is new (and CID/ANI available)
; 9. the phone dialing code to insert with the new lead if new (and CID/ANI available)
; 10. the campaign_id to search within lists if CIDLOOKUPRC
;inbound VICIDIAL calls:
exten => 1234,1,Answer ; Answer the line
exten => 1234,2,AGI(agi-VDAD_LO_closer_inbound.agi,CL_GALLERIA-----7275555134-----Closer-----park----------999-----1)
exten => 1234,2,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----INB-----7274515134-----Closer-----park----------999-----1-----OUTB)
exten => 1234,3,Hangup
; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel]
exten => _90009.,1,Answer ; Answer the line
exten => _90009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
exten => _90009.,3,Hangup
exten => _990009.,1,Answer ; Answer the line
exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
exten => _990009.,3,Hangup
6. 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.
+1 -1
View File
@@ -157,7 +157,7 @@ ALTER TABLE vicidial_log ADD qc_stage ENUM('NONE','LOCK_1','PASS','LOCK_2','FINI
ALTER TABLE vicidial_closer_log ADD qc_stage ENUM('NONE','LOCK_1','PASS','LOCK_2','FINISH',COMMIT') default 'NONE';
ALTER TABLE vicidial_campaigns ADD qc_webform_address VARCHAR(255);
ALTER TABLE vicidial_campaigns ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_campaigns ADD qc_script VARCHAR(10);
+3
View File
@@ -1687,6 +1687,9 @@ GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@localhost ID
# NOTE: if using MySQL 4.1.12 or higher you may need to run this query too:
UPDATE mysql.user set password=OLD_PASSWORD('1234') where user='cron';
# NOTE: make sure you do NOT put any spaces or other punctuation in the
# server_id, phone, extension, or user fields in the queries below if you edit them.
use asterisk;
\. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
@@ -48,6 +48,10 @@ Campaign Shift Length -<\/B> This is the time in Hours and Minutes that the camp
Campaign Day Start Time -<\/B> This is the time that the a new campaign day begins. Must only be numbers, 1:00 AM would be 0100||
QC SETTINGS NOT MODIFIED||
QC SETTINGS MODIFIED||
QC WebForm Address -<\/B> This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen||
QC Script -<\/B> This is the script that can be used by QC agents in the SCRIPT tab in the QC screen||
QC WebForm: ||
QC Script||
############################################################ CLIENT
+26 -4
View File
@@ -695,7 +695,10 @@ if (isset($_GET["campaign_shift_length"])) {$campaign_shift_length=$_GET["cam
elseif (isset($_POST["campaign_shift_length"])) {$campaign_shift_length=$_POST["campaign_shift_length"];}
if (isset($_GET["campaign_day_start_time"])) {$campaign_day_start_time=$_GET["campaign_day_start_time"];}
elseif (isset($_POST["campaign_day_start_time"])) {$campaign_day_start_time=$_POST["campaign_day_start_time"];}
if (isset($_GET["qc_web_form_address"])) {$qc_web_form_address=$_GET["qc_web_form_address"];}
elseif (isset($_POST["qc_web_form_address"])) {$qc_web_form_address=$_POST["qc_web_form_address"];}
if (isset($_GET["qc_script"])) {$qc_script=$_GET["qc_script"];}
elseif (isset($_POST["qc_script"])) {$qc_script=$_POST["qc_script"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
@@ -889,6 +892,7 @@ $queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id);
$after_hours_action = ereg_replace("[^0-9a-zA-Z]","",$after_hours_action);
$after_hours_exten = ereg_replace("[^0-9a-zA-Z]","",$after_hours_exten);
$after_hours_voicemail = ereg_replace("[^0-9a-zA-Z]","",$after_hours_voicemail);
$qc_script = ereg_replace("[^0-9a-zA-Z]","",$qc_script);
### DIGITS and Dots
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
@@ -1040,6 +1044,7 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
# $web_form_address
# $queuemetrics_url
# $admin_home_url
# $qc_web_form_address
### VARIABLES not filtered at all ###
# $script_text
@@ -2586,6 +2591,16 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>Campaign Day Start Time -</B> This is the time that the a new campaign day begins. Must only be numbers, 1:00 AM would be 0100.
<BR>
<A NAME="vicidial_campaigns-qc_web_form_address">
<BR>
<B>QC WebForm Address -</B> This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen.
<BR>
<A NAME="vicidial_campaigns-qc_script">
<BR>
<B>QC Script -</B> This is the script that can be used by QC agents in the SCRIPT tab in the QC screen.
@@ -6589,7 +6604,7 @@ if ($ADD==48)
echo "<br><B>QC SETTINGS MODIFIED: $campaign_id</B>\n";
$stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',campaign_shift_start_time='$campaign_shift_start_time',campaign_shift_length='$campaign_shift_length',campaign_day_start_time='$campaign_day_start_time' where campaign_id='$campaign_id';";
$stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',campaign_shift_start_time='$campaign_shift_start_time',campaign_shift_length='$campaign_shift_length',campaign_day_start_time='$campaign_day_start_time',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmt, $link);
### LOG CHANGES TO LOG FILE ###
@@ -9118,6 +9133,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];
@@ -9183,6 +9199,8 @@ if ($ADD==31)
$campaign_shift_start_time = $row[74];
$campaign_shift_length = $row[75];
$campaign_day_start_time = $row[76];
$qc_web_form_address = $row[77];
$qc_script = $row[78];
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -9389,7 +9407,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";
@@ -9974,7 +9992,11 @@ if ($ADD==31)
echo "<tr bgcolor=#B9CBFD><td align=right>Campaign Shift Length: </td><td><input type=text size=6 maxlength=5 name=campaign_shift_length value=\"$campaign_shift_length\"> $NWB#vicidial_campaigns-campaign_shift_length$NWE</td></tr>\n";
echo "<tr bgcolor=#9BB9FB><td align=right>Campaign Day Start Time: </td><td><input type=text size=6 maxlength=4 name=campaign_day_start_time value=\"$campaign_day_start_time\"> $NWB#vicidial_campaigns-campaign_day_start_time$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=SUBMIT></td></tr>\n";
echo "<tr bgcolor=#9BB9FB><td align=right>QC WebForm: </td><td align=left><input type=text name=qc_web_form_address size=50 maxlength=255 value=\"$qc_web_form_address\">$NWB#vicidial_campaigns-qc_web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=3111111&script_id=$script_id\">QC Script</a>: </td><td align=left><select size=1 name=qc_script>\n";
echo "$QCscripts_list";
echo "<option selected value=\"$qc_script\">$qc_script - $scriptname_list[$qc_script]</option>\n";
echo "</select>$NWB#vicidial_campaigns-qc_script$NWE</td></tr>\n";
echo "</table>\n";
echo "<BR></center></FORM><br>\n";
}