From 07eff607b43cbf3cf3ed924c0fb836ca16a95948 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 17 Mar 2008 20:14:30 +0000 Subject: [PATCH] updated docs and ADMIN_backup.pl script git-svn-id: svn://192.168.202.10@797 3d104415-ff17-0410-8863-d5cf3c621b8a --- bin/ADMIN_backup.pl | 52 +++++++++++++----- docs/BASE_INSTALL.txt | 4 ++ docs/LOAD_BALANCING.txt | 53 +++++++++++++------ docs/QC_PROCESS.txt | 2 +- docs/SCRATCH_INSTALL.txt | 3 ++ .../TO_BE_TRANSLATED_2.0.5.txt | 4 ++ www/vicidial/admin.php | 30 +++++++++-- 7 files changed, 113 insertions(+), 35 deletions(-) diff --git a/bin/ADMIN_backup.pl b/bin/ADMIN_backup.pl index aa671ca6..af206898 100644 --- a/bin/ADMIN_backup.pl +++ b/bin/ADMIN_backup.pl @@ -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; diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index 34dc4fbf..8bb24f20 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -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',''); diff --git a/docs/LOAD_BALANCING.txt b/docs/LOAD_BALANCING.txt index af7fc897..6ff26051 100644 --- a/docs/LOAD_BALANCING.txt +++ b/docs/LOAD_BALANCING.txt @@ -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 - 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. diff --git a/docs/QC_PROCESS.txt b/docs/QC_PROCESS.txt index 1ae28360..d9cac75f 100644 --- a/docs/QC_PROCESS.txt +++ b/docs/QC_PROCESS.txt @@ -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); diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index 38d8fb04..c6a4fbd6 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -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 diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt index 625e0f63..47375e95 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt @@ -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 diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index d06c88d2..d079c8b3 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -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 "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9974,7 +9992,11 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - + echo "\n"; + echo "\n"; echo "
Campaign Day Start Time - This is the time that the a new campaign day begins. Must only be numbers, 1:00 AM would be 0100. +
+ +
+QC WebForm Address - This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen. + +
+
+
+QC Script - 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 "
QC SETTINGS MODIFIED: $campaign_id\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 "
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$NWE
Active: $NWB#vicidial_campaigns-active$NWE
Park Extension: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Allow Inbound and Blended: $NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Campaign Shift Length: $NWB#vicidial_campaigns-campaign_shift_length$NWE
Campaign Day Start Time: $NWB#vicidial_campaigns-campaign_day_start_time$NWE
QC WebForm: $NWB#vicidial_campaigns-qc_web_form_address$NWE
QC Script: $NWB#vicidial_campaigns-qc_script$NWE
\n"; echo "

\n"; }