changed recording extension in vicidial.php

IMPORTANT! add 58600XXX to your dialplan, see extensions.conf.sample for info
added new QC-related fields to admin.php
added new QC_gather_records.pl script
made several changes to the QC_process doc
fixed ALL_inbound AGI voicemail bug

git-svn-id: svn://192.168.202.10@926 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-07-22 22:54:17 +00:00
parent 871a20b7ea
commit 3aa29d8cce
15 changed files with 4411 additions and 3465 deletions
+6
View File
@@ -138,6 +138,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
31. A field has been added to vicidial_list(last_local_call_time) to sort by
the last time a lead was called as well as for lead recycling changes.
32. IMPORTANT FOR RECORDINGS!!!
The recording extensions have been changed within VICIDIAL so you need to
add the following lines to your extensions.conf
; quiet monitor-only entry and leaving conferences for VICIDIAL (recording)
exten => _58600XXX,1,Meetme,${EXTEN:1}|Fmq
+4 -3
View File
@@ -71,6 +71,7 @@
#
$script = 'agi-VDAD_ALL_inbound.agi';
$dtmf_silent_prefix = '7';
$DROP_TIME = 360; ### default number of seconds to wait until you drop a waiting call
$start_moh=1;
@@ -1040,7 +1041,7 @@ if ($agent_search_method =~ /^SO|^LO/)
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
### insert a NEW record to the vicidial_manager table to play the alert message to the agent
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/7$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')";
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$dtmf_silent_prefix$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|7$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;}
@@ -1317,7 +1318,7 @@ if ($agent_search_method =~ /^LO|^LB/)
$VDADremDIALstr = "$a$S$b$S$c$S$d$S";
}
$alertVDADremDIALstr = "$VDADremDIALstr";
$alertVDADremDIALstr .= "7$VDADconf_exten";
$alertVDADremDIALstr .= "$dtmf_silent_prefix$VDADconf_exten";
$VDADremDIALstr .= "$VDADconf_exten";
### if agent alert exten is not disabled, then trigger the alert and wait
@@ -1513,7 +1514,7 @@ $now_date = "$year-$mon-$mday $hour:$min:$sec";
$CIDdate = "$mon$mday$hour$min$sec";
$tsSQLdate = "$year$mon$mday$hour$min$sec";
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
$VDADvoicemail_ext = '';
# $VDADvoicemail_ext = '';
if ($enable_queuemetrics_logging > 0)
{
+575
View File
@@ -0,0 +1,575 @@
#!/usr/bin/perl
#
# QC_gather_records.pl version: 2.0.5
#
# This script is designed to gather records to be posted to the
# qc_vicidial_list_original table so that it can be processed by the QC system
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 80717-1146 - First version development
# 80721-1627 - functional beta version
#
use Time::Local;
$txt = '.txt';
$US = '_';
$DS = '-';
$MT[0] = '';
$date_override_set=0;
# default CLI values
$campaign = '---ALL---';
$pull_statuses = 'SALE-UPSELL';
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
$i++;
}
if ($args =~ /--help/i)
{
print "allowed run time options:\n";
print " [--campaign=XXX] = Single campaign/in-group that records will be pulled from.\n";
print " Default will pull all qc_active campaigns and in-groups\n";
print " [--pull-statuses=XXX-XXY] = Statuses that are to be pulled. Default SALE and UPSELL\n";
print " NOTE: To include all statuses in the export, use \"--sale-statuses=---ALL---\"\n";
print " [--date-override=YYYYMMDDHHMMSS] = Date to force a re-pull from.\n";
print " Pulls 24 hours of records from the override time/date\n";
print " [-q] = quiet\n";
print " [-t] = test\n";
print " [--debug] = debugging messages\n";
print " [--debugX] = Super debugging messages\n";
print "\n";
exit;
}
else
{
if ($args =~ /--debug/i)
{
$DB=1;
print "\n----- DEBUG MODE -----\n\n";
}
if ($args =~ /--debugX/i)
{
$DBX=1;
print "\n----- SUPER DEBUG MODE -----\n\n";
}
if ($args =~ /-q/i)
{
$q=1; $Q=1;
}
if ($args =~ /--date-override=/i)
{
@data_in = split(/--date-override=/,$args);
$date_override = $data_in[1];
$date_override =~ s/ .*$//gi;
$date_override =~ s/\D//gi;
if ( (length($date_override)<14) || (length($date_override)>14) )
{
print "ERROR! Invalid date_override format |$date_override|\n";
$data_override='';
}
else
{
$YYYY = substr($date_override, 0, 4);
$MM = substr($date_override, 4, 2);
$MM = ($MM - 1);
$DD = substr($date_override, 6, 2);
$hh = substr($date_override, 8, 2);
$mm = substr($date_override, 10, 2);
$ss = substr($date_override, 12, 2);
$STARTdateSQL = "$YYYY$DS$MM$DS$DD $hh:$mm:$ss";
$STARTdateEPOCH = timelocal($ss,$mm,$hh,$DD,$MM,$YYYY);
$ENDdateEPOCH = ($STARTdateEPOCH + 86400);
($EDsec,$EDmin,$EDhour,$EDmday,$EDmon,$EDyear,$EDwday,$EDyday,$EDisdst) = localtime($ENDdateEPOCH);
$EDyear = ($EDyear + 1900);
$EDmon++;
if ($EDmon < 10) {$EDmon = "0$EDmon";}
if ($EDmday < 10) {$EDmday = "0$EDmday";}
if ($EDhour < 10) {$EDhour = "0$EDhour";}
if ($EDmin < 10) {$EDmin = "0$EDmin";}
if ($EDsec < 10) {$EDsec = "0$EDsec";}
$ENDdateSQL = "$EDyear-$EDmon-$EDmday $EDhour:$EDmin:$EDsec";
$dateSQL = "and (call_date >= \"$STARTdateSQL\" and call_date < \"$ENDdateSQL\")";
$date_override_set++;
}
}
if ($args =~ /--campaign=/i)
{
@data_in = split(/--campaign=/,$args);
$campaign = $data_in[1];
$campaign =~ s/ .*$//gi;
}
else
{$campaign='---ALL---';}
if ($args =~ /--pull-statuses=/i)
{
@data_in = split(/--pull-statuses=/,$args);
$pull_statuses = $data_in[1];
$pull_statuses =~ s/ .*$//gi;
if ($pull_statuses =~ /---ALL---/)
{if (!$Q) {print "\n----- PULL ALL STATUSES -----\n\n";} }
}
else
{$pull_statuses='---ALL---';}
if ($args =~ /--test/i)
{
$T=1; $TEST=1;
print "\n----- TESTING -----\n\n";
}
}
}
else
{
print "no command line options set, using defaults.\n";
}
### end parsing run-time options ###
if (!$Q)
{
print "\n\n\n\n\n\n\n\n\n\n\n\n-- QC_gather_records.pl --\n\n";
print "This program is designed to gather records from VICIDIAL campaigns and in-groups and place them into the qc_vicidial_list_original table for processing by the QC system. \n";
print "\n";
}
$secX = time();
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$timestamp = "$year-$mon-$mday $hour:$min:$sec";
$filedate = "$year$mon$mday";
$ABIfiledate = "$mon-$mday-$year$us$hour$min$sec";
$shipdate = "$year-$mon-$mday";
$datestamp = "$year/$mon/$mday $hour:$min";
$four_hours_behind = ($secX -14400);
($MBsec,$MBmin,$MBhour,$MBmday,$MBmon,$MByear,$MBwday,$MByday,$MBisdst) = localtime($four_hours_behind);
$MByear = ($MByear + 1900);
$MBmon++;
if ($MBmon < 10) {$MBmon = "0$MBmon";}
if ($MBmday < 10) {$MBmday = "0$MBmday";}
if ($MBhour < 10) {$MBhour = "0$MBhour";}
if ($MBmin < 10) {$MBmin = "0$MBmin";}
if ($MBsec < 10) {$MBsec = "0$MBsec";}
$qc_this_pull_time = "$MByear-$MBmon-$MBmday $MBhour:$MBmin:$MBsec";
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
$i++;
}
# Customized Variables
$server_ip = $VARserver_ip; # Asterisk server IP
if (!$VARDB_port) {$VARDB_port='3306';}
use DBI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
$dbhB = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmtA = "SELECT use_non_latin,qc_last_pull_time FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$non_latin = $aryA[0];
$qc_last_pull_time = $aryA[1];
}
$sthA->finish();
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");}
if ($date_override_set<1) {$dateSQL = "and (call_date >= \"$qc_last_pull_time\")";}
##### BEGIN find campaigns or in-groups to query #####
$CLIcampSQLc='';
$CLIcampSQLi='';
$campaignSQL='';
$ingroupSQL='';
$pull_campaigns=0;
$pull_ingroups=0;
if ($campaign !~ /---ALL---/)
{
$CLIcampSQLc = "and campaign_id='$campaign'";
$CLIcampSQLi = "and group_id='$campaign'";
}
$stmtA = "select campaign_id from vicidial_campaigns where qc_enabled='Y' $CLIcampSQLc;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
while ($sthArows > $pull_campaigns)
{
@aryA = $sthA->fetchrow_array;
$campaignSQL .= "'$aryA[0]',";
$campaigns[$pull_campaigns] = $aryA[0];
$pull_campaigns++;
}
$sthA->finish();
if (length($campaignSQL)>2)
{chop($campaignSQL);}
else {$campaignSQL="''";}
$stmtA = "select group_id from vicidial_inbound_groups where qc_enabled='Y' $CLIcampSQLi;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
while ($sthArows > $pull_ingroups)
{
@aryA = $sthA->fetchrow_array;
$ingroupSQL .= "'$aryA[0]',";
$ingroups[$pull_ingroups] = $aryA[0];
$pull_ingroups++;
}
$sthA->finish();
if (length($ingroupSQL)>2)
{chop($ingroupSQL);}
else {$ingroupSQL="''";}
##### END find campaigns or in-groups to query #####
##### START get lists of statuses to pull for each in-group and campaign #####
$VCLquerySQL='';
$VLquerySQL='';
if ($pull_statuses =~ /---ALL---/)
{
### if all statuses, loop through each campaign and in-group to grab statuses
$i=0; $j=0;
foreach(@ingroups)
{
$stmtA = "select qc_statuses,qc_shift_id,shift_start_time from vicidial_inbound_groups,vicidial_shifts where group_id='$ingroups[$i]' and qc_shift_id=shift_id;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$aryA[0] =~ s/ -$//gi;
@QCstatuses = split(/ /, $aryA[0]);
$QCs_to_print = $#QCstatuses;
$QCsql = '';
$o=0;
while ($QCs_to_print > $o)
{
$o++;
$QCsql .= "'$QCstatuses[$o]',";
}
$QCsql =~ s/,$//gi;
if (length($QCsql)<2) {$QCsql="''";}
if ($j>0) {$VCLquerySQL .= " or ";}
$VCLquerySQL .= "(vicidial_closer_log.campaign_id='$ingroups[$i]' and vicidial_closer_log.status IN($QCsql))";
$ingroup_statuses[$i] = $aryA[0];
$j++;
}
$sthA->finish();
$i++;
}
### if all statuses, loop through each campaign and in-group to grab statuses
$i=0; $j=0;
foreach(@campaigns)
{
$stmtA = "select qc_statuses,qc_shift_id,shift_start_time from vicidial_campaigns,vicidial_shifts where campaign_id='$campaigns[$i]' and qc_shift_id=shift_id;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$aryA[0] =~ s/ -$//gi;
@QCstatuses = split(/ /, $aryA[0]);
$QCs_to_print = $#QCstatuses;
$QCsql = '';
$o=0;
while ($QCs_to_print > $o)
{
$o++;
$QCsql .= "'$QCstatuses[$o]',";
}
$QCsql =~ s/,$//gi;
if (length($QCsql)<2) {$QCsql="''";}
if ($j>0) {$VLquerySQL .= " or ";}
$VLquerySQL .= "(vicidial_log.campaign_id='$campaigns[$i]' and vicidial_log.status IN($QCsql))";
$campaign_statuses[$i] = $aryA[0];
$j++;
}
$sthA->finish();
$i++;
}
$VCLquerySQL = "and ($VCLquerySQL)";
$VLquerySQL = "and ($VLquerySQL)";
if ($DB>0) {print "\n$VCLquerySQL\n";}
if ($DB>0) {print "\n$VLquerySQL\n";}
##### END get lists of statuses to pull for each in-group and campaign #####
$pull_statusesSQL='';
$close_statusesSQL='';
}
else
{
$pull_statusesSQL = $pull_statuses;
$pull_statusesSQL =~ s/-/','/gi;
$pull_statusesSQL = "'$pull_statusesSQL'";
$close_statusesSQL = $pull_statusesSQL;
$pull_statusesSQL = " and (vicidial_log.status IN($pull_statusesSQL))";
$close_statusesSQL = " and (vicidial_closer_log.status IN($close_statusesSQL))";
}
##### Construct the queries to pull records for QC #####
$VCLsql= "SELECT closecallid,lead_id,campaign_id,call_date,length_in_sec,status,user,comments,user_group,term_reason,xfercallid from vicidial_closer_log where campaign_id IN($ingroupSQL) $dateSQL $VCLquerySQL $close_statusesSQL;";
$VLsql= "SELECT uniqueid,lead_id,campaign_id,call_date,length_in_sec,status,user,comments,user_group,term_reason from vicidial_log where campaign_id IN($campaignSQL) $dateSQL $VLquerySQL $pull_statusesSQL;";
$j=0;
##### Pull records from vicidial_closer_log table
$stmtA = "$VCLsql";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$i=0;
while ($sthArows > $i)
{
@aryA = $sthA->fetchrow_array;
$vicidial_id[$j] = $aryA[0];
$lead_id[$j] = $aryA[1];
$campaign_id[$j] = $aryA[2];
$call_date[$j] = $aryA[3];
$length_in_sec[$j] = $aryA[4];
$status[$j] = $aryA[5];
$user[$j] = $aryA[6];
$call_type[$j] = $aryA[7];
$user_group[$j] = $aryA[8];
$term_reason[$j] = $aryA[9];
$xfercallid[$j] = $aryA[10];
$i++; $j++;
}
$sthA->finish();
##### Pull records from vicidial_log table
$stmtA = "$VLsql";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$k=0;
while ($sthArows > $k)
{
@aryA = $sthA->fetchrow_array;
$vicidial_id[$j] = $aryA[0];
$lead_id[$j] = $aryA[1];
$campaign_id[$j] = $aryA[2];
$call_date[$j] = $aryA[3];
$length_in_sec[$j] = $aryA[4];
$status[$j] = $aryA[5];
$user[$j] = $aryA[6];
$call_type[$j] = $aryA[7];
$user_group[$j] = $aryA[8];
$term_reason[$j] = $aryA[9];
$xfercallid[$j] = '';
$k++; $j++;
}
$sthA->finish();
if ($DB) {print "vicidial_closer_log records found: $i\n";}
if ($DB) {print "vicidial_log records found: $k\n";}
if ($DB) {print " TOTAL: $j\n";}
$i=0; $j=0;
foreach(@vicidial_id)
{
### check to see if there is already an entry in the vicidial_qc_list table for this record
$VDIDduplicate=0;
$stmtA = "select count(*) from vicidial_qc_list where vicidial_id='$vicidial_id[$i]';";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VDIDduplicate = $aryA[0];
}
$sthA->finish();
if ($VDIDduplicate > 0)
{
$j++;
if ($DB) {print "DUPLICATE: |$vicidial_id[$i]|$i|$j|\n";}
}
else
{
### grab vicidial_list details
$stmtA = "select vendor_lead_code,source_id,list_id,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments from vicidial_list where lead_id='$lead_id[$i]';";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code[$i] = $aryA[0];
$source_id[$i] = $aryA[1];
$list_id[$i] = $aryA[2];
$phone_code[$i] = $aryA[3];
$phone_number[$i] = $aryA[4];
$title[$i] = $aryA[5];
$first_name[$i] = $aryA[6];
$middle_initial[$i] = $aryA[7];
$last_name[$i] = $aryA[8];
$address1[$i] = $aryA[9];
$address2[$i] = $aryA[10];
$address3[$i] = $aryA[11];
$city[$i] = $aryA[12];
$state[$i] = $aryA[13];
$province[$i] = $aryA[14];
$postal_code[$i] = $aryA[15];
$country_code[$i] = $aryA[16];
$gender[$i] = $aryA[17];
$date_of_birth[$i] = $aryA[18];
$alt_phone[$i] = $aryA[19];
$email[$i] = $aryA[20];
$security_phrase[$i] = $aryA[21];
$comments[$i] = $aryA[22];
}
$sthA->finish();
### if there is a fronter, look for one in the xfer log by the xfercallid
if (length($xfercallid > 0))
{
$stmtA = "select user from vicidial_xfer_log where xfercallid='$xfercallid[$i]' limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtB ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$fronter[$i] = $aryA[0];
}
$sthA->finish();
}
else
{$fronter[$i]='';}
### Insert a record into the vicidial_qc_list table
$stmtA = "INSERT INTO vicidial_qc_list SET ";
$stmtA .= "qc_import_date='$timestamp',";
$stmtA .= "qc_stage='NEW',";
$stmtA .= "call_date='$call_date[$i]',";
$stmtA .= "vicidial_id='$vicidial_id[$i]',";
$stmtA .= "campaign_group_id='$campaign_id[$i]',";
$stmtA .= "lead_id='$lead_id[$i]',";
$stmtA .= "list_id='$list_id[$i]',";
$stmtA .= "length_in_sec='$length_in_sec[$i]',";
$stmtA .= "status='$status[$i]',";
$stmtA .= "call_type='$call_type[$i]',";
$stmtA .= "term_reason='$term_reason[$i]',";
$stmtA .= "qc_user='VDQC',";
$stmtA .= "user='$user[$i]',";
$stmtA .= "user_group='$user_group[$i]',";
$stmtA .= "fronter='$fronter[$i]',";
$stmtA .= "vendor_lead_code='$vendor_lead_code[$i]',";
$stmtA .= "source_id='$source_id[$i]',";
$stmtA .= "phone_code='$phone_code[$i]',";
$stmtA .= "phone_number='$phone_number[$i]',";
$stmtA .= "title='$title[$i]',";
$stmtA .= "first_name='$first_name[$i]',";
$stmtA .= "middle_initial='$middle_initial[$i]',";
$stmtA .= "last_name='$last_name[$i]',";
$stmtA .= "address1='$address1[$i]',";
$stmtA .= "address2='$address2[$i]',";
$stmtA .= "address3='$address3[$i]',";
$stmtA .= "city='$city[$i]',";
$stmtA .= "state='$state[$i]',";
$stmtA .= "province='$province[$i]',";
$stmtA .= "postal_code='$postal_code[$i]',";
$stmtA .= "country_code='$country_code[$i]',";
$stmtA .= "gender='$gender[$i]',";
$stmtA .= "date_of_birth='$date_of_birth[$i]',";
$stmtA .= "alt_phone='$alt_phone[$i]',";
$stmtA .= "email='$email[$i]',";
$stmtA .= "security_phrase='$security_phrase[$i]',";
$stmtA .= "comments='$comments[$i]'";
$stmtA .= ";";
$affected_rows = $dbhA->do($stmtA);
$inserted = ($inserted + $affected_rows);
}
$i++;
}
if ($DB) {print "Records Inserted: $inserted out of $i\n";}
$stmtA = "UPDATE system_settings SET qc_last_pull_time = '$qc_this_pull_time';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {print "system_settings update: $qc_this_pull_time\n";}
if ($DB) {print "DONE\n";}
exit;
+251 -212
View File
@@ -1,212 +1,251 @@
QC(Quality Control) process flow 2008-01-03
** THIS QC FUNCTIONALITY PROSESS IS PLANNED FOR THE 2.0.5 RELEASE **
This will outline the process I have thought through for adding a Quality Assurance(QA) or Quality Control(QC) process to the VICIDIAL system. As the needs have changed for sponsor client and VICIDIAL has evolved since this functionality was first put into the planning stages, there have been several changes to how the QC process is going to be built. The objective is to add the following QC features to make VICIDIAL a more well-rounded product:
- ability to define which statuses are to be able to be QCd per campaign and inbound group(queue)
- ability to give agents permission to QC records for their allowable campaigns/inbound groups
- ability to log all access and changes to QCd records
- creation of some basic reports on QC activity
The back-end process will work like this:
- ADMIN_keepalive_ALL.pl script will look for the 'Q' in the keepalive definition in /etc/astguiclient.conf file. If it is set, it will trigger a script to gather the QC records every five minutes(with a 15 second delay) since the last QC gathering as defined in the system_settings table qc_last_pull_time field(which is populated with the START time of the last QC-pull run). The time interval for this might be made configurable.
- There will also be an optional method of pulling QC records available to the QC managers that enables them to specify a date range to pull and insert records
- Selected records from the vicidial_list table (keyed on the the vicidial_log and vicidial_closer_log tables) will be taken and inserted into the qc_vicidial_list_original table.
- QC agents are then able to run their process starting with the earliest records for their selected campaign/inbound groups
- After QC agents have PASSed, FINISHed and COMMITted the QC records, then they can be exported
The QC agent will login to the new qc.php screen within the agc web directory. They will then have a screen very similar to the vicidial.php login screen(but in a different color) that will have a user/pass to fill in. Then when they login they will see a green screen similar to the vicidial.php inbound(CLOSER-type) screen that will show them their allowable qc inbound-groups and campaigns. The agent will then choose which in-groups and campaigns that they want to QC the records for and then they will submit and they will be logged-in to the QC system.
Upon login, they will be able to see the count of QC-able records and they can click on a link to bring up the next record to be QCd.
Upon clicking on a link, the qc.php application will insert a record into the qc_vicidial_list to keep track of changes and other information on the qc record session.
The SCRIPTS tab and web form will both function exactly as they do in the vicidial.php application, with the exception that there will be added qc_web_form_address and qc_script options for both campaigns and inbound groups. There will also be an option to have any of these launched upon a new record appearing on the QC agent's screen.
The qc.php user interface will be using AJAX as a method to bring up records and keep track of QC-agent activity and performance.
Each qc_user_level will have different permissions for the qc system:
1- modify nothing
2- modify nothing but status
3- modify everything
4- can check records of other QC agents
5- can view stats on qc system
6- can view finished and non-committed records and alter them
7- Manager level (can do anything including delete QC records)
The qc_stage is a status within QC that tells what is going on with the record:
NONE - record has never been QCd
LOCK_1 - a QC agent is reviewing the record
PASS - QC agent has passed the record
LOCK_2 - a QC agent is reviewing the record for possible finishing
FINISH - record is ready to be processed
COMMIT - QC record is committed to the system and cannot be modified by anyone
DEAD - QC record is old and present for logs only, newer record has taken it's place
The Database Changes:
# This table contains the original lead information before changes
CREATE TABLE qc_vicidial_list_original (
qc_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
qc_import_date DATETIME,
call_date DATETIME,
log_id VARCHAR(20) UNIQUE NOT NULL,
campaign_group_id VARCHAR(20),
modify_date TIMESTAMP,
status VARCHAR(6),
user VARCHAR(20),
closer VARCHAR(20),
vendor_lead_code VARCHAR(20),
source_id VARCHAR(50),
list_id BIGINT(14) UNSIGNED,
phone_code VARCHAR(10),
phone_number VARCHAR(12),
title VARCHAR(4),
first_name VARCHAR(30),
middle_initial VARCHAR(1),
last_name VARCHAR(30),
address1 VARCHAR(100),
address2 VARCHAR(100),
address3 VARCHAR(100),
city VARCHAR(50),
state VARCHAR(2),
province VARCHAR(50),
postal_code VARCHAR(10),
country_code VARCHAR(3),
gender ENUM('M','F','U') default 'U',
date_of_birth DATE,
alt_phone VARCHAR(12),
email VARCHAR(70),
security_phrase VARCHAR(100),
comments VARCHAR(255),
);
# This table contains the updated QC records
CREATE TABLE qc_vicidial_list (
qc_list_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
qc_id INT(9) UNSIGNED NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
log_id VARCHAR(20) NOT NULL,
modify_date TIMESTAMP,
status VARCHAR(6),
qc_status VARCHAR(6),
qc_date DATETIME,
qc_length_in_sec SMALLINT(5) UNSIGNED default '0',
qc_verify_date DATETIME,
qc_verify_length_in_sec SMALLINT(5) UNSIGNED default '0',
qc_comments TEXT,
qc_stage VARCHAR(6),
qc_user VARCHAR(20),
qc_verify_user VARCHAR(20),
qc_code VARCHAR(8),
qc_changed ENUM('0','1') default '0',
user VARCHAR(20),
closer VARCHAR(20),
vendor_lead_code VARCHAR(20),
source_id VARCHAR(50),
list_id BIGINT(14) UNSIGNED,
phone_code VARCHAR(10),
phone_number VARCHAR(12),
title VARCHAR(4),
first_name VARCHAR(30),
middle_initial VARCHAR(1),
last_name VARCHAR(30),
address1 VARCHAR(100),
address2 VARCHAR(100),
address3 VARCHAR(100),
city VARCHAR(50),
state VARCHAR(2),
province VARCHAR(50),
postal_code VARCHAR(10),
country_code VARCHAR(3),
gender ENUM('M','F','U') default 'U',
date_of_birth DATE,
alt_phone VARCHAR(12),
email VARCHAR(70),
security_phrase VARCHAR(100),
comments VARCHAR(255),
index (qc_id),
index (lead_id),
index (original_id),
index (phone_number),
index (status),
index (qc_stage)
);
# This table contains the session information for qc_agents
CREATE TABLE qc_agent_sessions (
qc_session_id INT(9) UNSIGNED PRIMARY KEY NOT NULL,
user VARCHAR(20),
qc_user_level INT(2) default '0',
status ENUM('READY','INQC','PAUSED') default 'PAUSED',
qc_id INT(9) UNSIGNED NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
selected_inbound_groups TEXT,
selected_campaigns TEXT,
qc_records_today SMALLINT(5) UNSIGNED default '0',
login_time DATETIME,
last_action_time DATETIME,
index(user),
index (last_action_time)
);
# For ability to restrict statuses by user_level per campaign
CREATE TABLE qc_allowed_statuses (
status VARCHAR(6) PRIMARY KEY NOT NULL,
qc_user_level INT(2) default '0',
campaign_group_id VARCHAR(20)
);
# For the inbound groups table, some fields will need to be added to the vicidial_campaigns table:
ALTER TABLE vicidial_inbound_groups ADD qc_enabled ENUM('Y','N') default 'N';
ALTER TABLE vicidial_inbound_groups ADD qc_statuses TEXT;
ALTER TABLE vicidial_inbound_groups ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_inbound_groups ADD qc_script VARCHAR(10);
ALTER TABLE vicidial_inbound_groups ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE vicidial_campaigns ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE system_settings ADD qc_last_pull_time DATETIME;
# qc codes to be used for statistics
CREATE TABLE vicidial_qc_codes (
code VARCHAR(8) PRIMARY KEY NOT NULL,
code_name VARCHAR(30)
);
ALTER TABLE vicidial_campaigns ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_campaigns ADD qc_script VARCHAR(10);
# For the campaigns table, some fields will need to be added to the vicidial_campaigns table:
ALTER TABLE vicidial_campaigns ADD qc_enabled ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD qc_statuses TEXT;
ALTER TABLE vicidial_campaigns ADD qc_lists TEXT;
ALTER TABLE vicidial_campaigns ADD campaign_shift_start_time VARCHAR(4) default '0900';
ALTER TABLE vicidial_campaigns ADD campaign_shift_length VARCHAR(5) default '16:00';
ALTER TABLE vicidial_campaigns ADD campaign_day_start_time VARCHAR(4) default '0100';
# For the in-groups/campaigns QC permissions, some fields will need to be added to the vicidial_user_groups table:
ALTER TABLE vicidial_user_groups ADD qc_allowed_campaigns TEXT;
ALTER TABLE vicidial_user_groups ADD qc_allowed_inbound_groups TEXT;
# For the user QC permissions, some fields will need to be added to the vicidial_users table:
ALTER TABLE vicidial_users ADD qc_enabled ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_user_level INT(2) default '1';
ALTER TABLE vicidial_users ADD qc_pass ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_finish ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_commit ENUM('1','0') default '0';
QC(Quality Control) process flow 2008-01-03
** THIS QC FUNCTIONALITY PROSESS IS PLANNED FOR THE 2.0.5 RELEASE AND IS CURRENTLY IN DEVELOPMENT **
This will outline the process I have thought through for adding a Quality Assurance(QA) or Quality Control(QC) process to the VICIDIAL system. As the needs have changed for sponsor client and VICIDIAL has evolved since this functionality was first put into the planning stages, there have been several changes to how the QC process is going to be built. The objective is to add the following QC features to make VICIDIAL a more well-rounded product:
- ability to define which statuses are to be able to be QCd per campaign and inbound group(queue)
- ability to give agents permission to QC records for their allowable campaigns/inbound groups
- ability to log all access and changes to QCd records
- creation of some basic reports on QC activity
The back-end process will work like this:
- ADMIN_keepalive_ALL.pl script will look for the 'Q' in the keepalive definition in /etc/astguiclient.conf file. If it is set, it will trigger a script (QC_gather_records.pl) to gather the QC records every five minutes(with a 15 second delay) since the last QC gathering as defined in the system_settings table qc_last_pull_time field(which is populated with four-hours-before the START time of the last QC-pull run to make sure to catch all potential long calls that may have ended). The time interval for this might be made configurable.
- There will also be an optional method of pulling QC records available to the QC managers that enables them to specify a date range to pull and insert records
- Selected records from the vicidial_list table (keyed on the the vicidial_log and vicidial_closer_log tables) will be taken and inserted into the vicidial_qc_list table.
- QC agents are then able to run their process starting with the earliest records for their selected campaign/inbound groups
- After QC agents have PASSed, FINISHed and COMMITted the QC records, then they can be exported
The QC agent will login to the new qc.php screen within the agc web directory. They will then have a screen very similar to the vicidial.php login screen(but in a different color) that will have a user/pass to fill in. Then when they login the QC agents with level of 1-3 will see a green screen similar to the vicidial.php inbound(CLOSER-type) screen that will show them their allowable qc inbound-groups and campaigns. The agent will then choose which in-groups and campaigns that they want to QC the records for and then they will submit and they will be logged-in to the QC system. QC agents with a qc_level of 4-5 can select to review first level reccords, review all 2nd level records, review only 2nd level changed-status or review 2nd level same-status records. QC agents with 6-7 qc_level can also have the option of entering a management screen showing more information on the QC system including committing QC records and links to QC reports.
Upon login, they will be able to see the count of QC-able records and they can click on a link to bring up the next record to be QCd.
Upon clicking on a link, the qc.php application will insert a record into the vicidial_qc_log to keep track of changes and other information on the qc record session. The customer and original call data will remain unaltered in the vicidial_qc_list table.
The SCRIPTS tab and web form will both function exactly as they do in the vicidial.php application, with the exception that there will be added qc_web_form_address and qc_script options for both campaigns and inbound groups. There will also be an option to have any of these launched upon a new record appearing on the QC agent's screen.
The qc.php user interface will be using AJAX as a method to bring up records and keep track of QC-agent activity and performance.
An optional element is for a small audio frame be opened with each new customer record that will have an audio recording of the call that the QC agent can listen to. At this point in time, the best candidate for this is the Flourish Flash-based application(http://flourishplayer.sourceforge.net/) It is open source under a BSD-like license and is based on Adobe Flash, which currently seems to be much more lightweight and provides a much lower barrier to entry on most platforms than JAVA does.
Each qc_user_level will have different permissions for the qc system:
1- modify nothing
2- modify nothing but status
3- modify everything
4- can check records of other QC agents
5- can view stats on qc system and unlock locked records from first level QC agents
6- can view finished and non-committed records and alter them and unlock locked records from first and second level QC agents
7- Manager level (can do anything including delete QC records)
The the QC agent roles:
FIRST - first level review
SECOND_ALL - second level review all records
SECOND_CHANGED - second level review only changed-status records
SECOND_PASSED - second level review only unchanged-status records
THIRD - third level review and commit/clear
MANAGER - manager level actions
The qc_stage is a record status within QC that tells what is going on with the record:
NEW - record has never been QCd
LOCK_1 - a QC agent is reviewing the record
PASS - QC agent has passed the record
LOCK_2 - a QC agent is reviewing the record for possible finishing
FINISH - record is ready to be processed
COMMIT - QC record is committed to the system and cannot be modified by anyone
DEAD - QC record is old and present for logs only, newer record has taken it's place
The Database Changes:
!!! IMPORTANT !!!
THESE ARE FOR REFERENCE ONLY, DO NOT RUN THEM!!!
# This table contains the live session information for qc_agents
CREATE TABLE qc_agent_sessions (
qc_session_id INT(9) UNSIGNED PRIMARY KEY NOT NULL,
user VARCHAR(20),
qc_user_level INT(2) default '0',
qc_role VARCHAR(20),
status ENUM('READY','INQC','PAUSED') default 'PAUSED',
qc_id INT(9) UNSIGNED NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
selected_campaigns_groups TEXT,
qc_records_today SMALLINT(5) UNSIGNED default '0',
login_time DATETIME,
last_action_time DATETIME,
index (user),
index (last_action_time)
);
# This table contains the stats information for qc_agents for today
CREATE TABLE qc_agent_stats (
user VARCHAR(20),
campaign_group_id VARCHAR(20),
qc_records_today SMALLINT(5) UNSIGNED default '0',
last_record_time DATETIME,
last_record_finish DATETIME,
index (user),
index (campaign_group_id)
);
# This table contains the log information for qc_agent logins
CREATE TABLE vicidial_user_qc_log (
user VARCHAR(20),
event_date DATETIME,
selected_campaigns_groups TEXT,
index (user),
index (event_date)
);
# For ability to restrict statuses by user_level per campaign/in-group
CREATE TABLE qc_allowed_statuses (
status VARCHAR(6) PRIMARY KEY NOT NULL,
qc_user_level INT(2) default '0',
campaign_group_id VARCHAR(20)
);
# This table contains the original lead and log information before changes
CREATE TABLE vicidial_qc_list (
qc_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
qc_import_date DATETIME,
qc_stage VARCHAR(6) default 'NEW',
call_date DATETIME,
vicidial_id VARCHAR(20) UNIQUE NOT NULL,
campaign_group_id VARCHAR(20),
lead_id INT(9) UNSIGNED NOT NULL,
list_id BIGINT(14) UNSIGNED,
length_in_sec SMALLINT(5) UNSIGNED default '0',
status VARCHAR(6),
call_type VARCHAR(20),
term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','NONE') default 'NONE',
modify_date TIMESTAMP,
qc_user VARCHAR(20),
user VARCHAR(20),
user_group VARCHAR(20),
fronter VARCHAR(20),
vendor_lead_code VARCHAR(20),
source_id VARCHAR(50),
phone_code VARCHAR(10),
phone_number VARCHAR(12),
title VARCHAR(4),
first_name VARCHAR(30),
middle_initial VARCHAR(1),
last_name VARCHAR(30),
address1 VARCHAR(100),
address2 VARCHAR(100),
address3 VARCHAR(100),
city VARCHAR(50),
state VARCHAR(2),
province VARCHAR(50),
postal_code VARCHAR(10),
country_code VARCHAR(3),
gender ENUM('M','F','U') default 'U',
date_of_birth DATE,
alt_phone VARCHAR(12),
email VARCHAR(70),
security_phrase VARCHAR(100),
comments VARCHAR(255),
index (vicidial_id),
index (lead_id),
index (phone_number)
);
# This table contains the updated QC records
CREATE TABLE vicidial_qc_log (
qc_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
qc_id INT(9) UNSIGNED NOT NULL,
qc_stage VARCHAR(6),
modify_date TIMESTAMP,
qc_user VARCHAR(20),
qc_status VARCHAR(6),
qc_code VARCHAR(8),
qc_date DATETIME,
qc_length_in_sec SMALLINT(5) UNSIGNED default '0',
qc_comments TEXT,
qc_altered ENUM('0','1') default '0',
status VARCHAR(6),
vendor_lead_code VARCHAR(20),
phone_code VARCHAR(10),
phone_number VARCHAR(12),
title VARCHAR(4),
first_name VARCHAR(30),
middle_initial VARCHAR(1),
last_name VARCHAR(30),
address1 VARCHAR(100),
address2 VARCHAR(100),
address3 VARCHAR(100),
city VARCHAR(50),
state VARCHAR(2),
province VARCHAR(50),
postal_code VARCHAR(10),
country_code VARCHAR(3),
gender ENUM('M','F','U') default 'U',
date_of_birth DATE,
alt_phone VARCHAR(12),
email VARCHAR(70),
security_phrase VARCHAR(100),
comments VARCHAR(255),
index (qc_id),
index (phone_number),
index (qc_stage)
);
# Changes committed to upgrade sql file:
# For the inbound groups table, some fields will need to be added to the vicidial_campaigns table:
ALTER TABLE vicidial_inbound_groups ADD qc_enabled ENUM('Y','N') default 'N';
ALTER TABLE vicidial_inbound_groups ADD qc_statuses TEXT;
ALTER TABLE vicidial_inbound_groups ADD qc_shift_id VARCHAR(20) default '24HRMIDNIGHT';
ALTER TABLE vicidial_inbound_groups ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD qc_show_recording ENUM('Y','N') default 'Y';
ALTER TABLE vicidial_inbound_groups ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_inbound_groups ADD qc_script VARCHAR(10);
# Alter some earlier defined fields and populate with default values
ALTER TABLE vicidial_campaigns CHANGE campaign_shift_start_time qc_shift_id VARCHAR(20) default '24HRMIDNIGHT';
ALTER TABLE vicidial_campaigns CHANGE campaign_shift_length qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE vicidial_campaigns CHANGE campaign_day_start_time qc_show_recording ENUM('Y','N') default 'Y';
UPDATE vicidial_campaigns SET qc_shift_id='24HRMIDNIGHT';
UPDATE vicidial_campaigns SET qc_get_record_launch='NONE';
UPDATE vicidial_campaigns SET qc_show_recording='Y';
ALTER TABLE system_settings ADD qc_last_pull_time DATETIME;
# qc codes to be used for statistics
CREATE TABLE vicidial_qc_codes (
code VARCHAR(8) PRIMARY KEY NOT NULL,
code_name VARCHAR(30)
);
# For the campaigns table, some fields will need to be added to the vicidial_campaigns table:
ALTER TABLE vicidial_campaigns ADD qc_enabled ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD qc_statuses TEXT;
ALTER TABLE vicidial_campaigns ADD qc_lists TEXT;
ALTER TABLE vicidial_campaigns ADD campaign_shift_start_time VARCHAR(4) default '0900';
ALTER TABLE vicidial_campaigns ADD campaign_shift_length VARCHAR(5) default '16:00';
ALTER TABLE vicidial_campaigns ADD campaign_day_start_time VARCHAR(4) default '0100';
ALTER TABLE vicidial_campaigns ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_campaigns ADD qc_script VARCHAR(10);
# For the in-groups/campaigns QC permissions, some fields will need to be added to the vicidial_user_groups table:
ALTER TABLE vicidial_user_groups ADD qc_allowed_campaigns TEXT;
ALTER TABLE vicidial_user_groups ADD qc_allowed_inbound_groups TEXT;
# For the user QC permissions, some fields will need to be added to the vicidial_users table:
ALTER TABLE vicidial_users ADD qc_enabled ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_user_level INT(2) default '1';
ALTER TABLE vicidial_users ADD qc_pass ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_finish ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD qc_commit ENUM('1','0') default '0';
File diff suppressed because it is too large Load Diff
@@ -237,10 +237,12 @@ exten => _86000[0-4]X,1,Meetme,${EXTEN}|q
exten => _86000[5-9]X,1,Meetme,${EXTEN}|F
exten => _86001XX,1,Meetme,${EXTEN}|F
exten => _8600200,1,Meetme,${EXTEN}|F
; quiet entry and leaving conferences for VICIDIAL
; quiet entry and leaving conferences for VICIDIAL (inbound announce and SendDTMF)
exten => _78600XXX,1,Meetme,${EXTEN:1}|Fq
; quiet monitor extensions for meetme rooms (for room managers)
; quiet monitor-only extensions for meetme rooms (for room managers)
exten => _68600XXX,1,Meetme,${EXTEN:1}|Fmq
; quiet monitor-only entry and leaving conferences for VICIDIAL (recording)
exten => _58600XXX,1,Meetme,${EXTEN:1}|Fmq
; voicelab exten
exten => _86009XX,1,Meetme,${EXTEN}|Fmq
@@ -329,8 +331,8 @@ exten => 8501,2,Hangup
; this is used to allow the GUI to send live calls directly into voicemail
; don't forget to set GUI variable $voicemail_dump_exten to this extension
exten => _85026666666666.,1,Wait(2)
exten => _85026666666666.,2,Voicemail(${EXTEN:14})
exten => _85026666666666.,1,Wait(1)
exten => _85026666666666.,2,Voicemail(${EXTEN:14}|u)
exten => _85026666666666.,3,Hangup
; this is used for sending DTMF signals within conference calls, the client app
@@ -80,7 +80,7 @@ exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---
; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery
exten => 7275551212,1,Ringing
exten => 7275551212,2,Wait(1)
exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----{CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)})
exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)})
exten => 7275551212,4,Answer
exten => 7275551212,5,Dial(sip/spa2000&sip/spa2001,30,To)
exten => 7275551212,6,Voicemail,u2000
@@ -241,6 +241,8 @@ exten => _8600200,1,Meetme,${EXTEN}|F
exten => _78600XXX,1,Meetme,${EXTEN:1}|Fq
; quiet monitor extensions for meetme rooms (for room managers)
exten => _68600XXX,1,Meetme,${EXTEN:1}|Fmq
; quiet monitor-only entry and leaving conferences for VICIDIAL (recording)
exten => _58600XXX,1,Meetme,${EXTEN:1}|Fmq
; voicelab exten
exten => _86009XX,1,Meetme,${EXTEN}|Fmq
@@ -329,8 +331,8 @@ exten => 8501,2,Hangup
; this is used to allow the GUI to send live calls directly into voicemail
; don't forget to set GUI variable $voicemail_dump_exten to this extension
exten => _85026666666666.,1,Wait(2)
exten => _85026666666666.,2,Voicemail(${EXTEN:14})
exten => _85026666666666.,1,Wait(1)
exten => _85026666666666.,2,Voicemail(${EXTEN:14}|u)
exten => _85026666666666.,3,Hangup
; this is used for sending DTMF signals within conference calls, the client app
@@ -1,4 +1,4 @@
CREATE TABLE phones (
CREATE TABLE phones (
extension VARCHAR(100),
dialplan_number VARCHAR(20),
voicemail_id VARCHAR(10),
@@ -69,7 +69,7 @@ enable_sipsak_messages ENUM('0','1') default '0',
index (server_ip)
);
CREATE TABLE servers (
CREATE TABLE servers (
server_id VARCHAR(10) NOT NULL,
server_description VARCHAR(255),
server_ip VARCHAR(15) NOT NULL,
@@ -95,7 +95,7 @@ balance_trunks_offlimits SMALLINT(5) UNSIGNED default '0'
);
CREATE TABLE live_channels (
CREATE TABLE live_channels (
channel VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
channel_group VARCHAR(30),
@@ -103,7 +103,7 @@ extension VARCHAR(100),
channel_data VARCHAR(100)
);
CREATE TABLE live_sip_channels (
CREATE TABLE live_sip_channels (
channel VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
channel_group VARCHAR(30),
@@ -111,7 +111,7 @@ extension VARCHAR(100),
channel_data VARCHAR(100)
);
CREATE TABLE parked_channels (
CREATE TABLE parked_channels (
channel VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
channel_group VARCHAR(30),
@@ -120,13 +120,13 @@ parked_by VARCHAR(100),
parked_time DATETIME
);
CREATE TABLE conferences (
CREATE TABLE conferences (
conf_exten INT(7) UNSIGNED NOT NULL,
server_ip VARCHAR(15) NOT NULL,
extension VARCHAR(100)
);
CREATE TABLE recording_log (
CREATE TABLE recording_log (
recording_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100),
server_ip VARCHAR(15),
@@ -148,7 +148,7 @@ index(user),
index(vicidial_id)
);
CREATE TABLE live_inbound (
CREATE TABLE live_inbound (
uniqueid VARCHAR(20) NOT NULL,
channel VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
@@ -165,7 +165,7 @@ comment_d VARCHAR(50),
comment_e VARCHAR(50)
);
CREATE TABLE inbound_numbers (
CREATE TABLE inbound_numbers (
extension VARCHAR(30) NOT NULL,
full_number VARCHAR(30) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
@@ -173,12 +173,12 @@ inbound_name VARCHAR(30),
department VARCHAR(30)
);
CREATE TABLE server_updater (
CREATE TABLE server_updater (
server_ip VARCHAR(15) NOT NULL,
last_update DATETIME
);
CREATE TABLE call_log (
CREATE TABLE call_log (
uniqueid VARCHAR(20) PRIMARY KEY NOT NULL,
channel VARCHAR(100),
channel_group VARCHAR(30),
@@ -198,7 +198,7 @@ index (server_ip),
index (channel)
);
CREATE TABLE park_log (
CREATE TABLE park_log (
uniqueid VARCHAR(20) PRIMARY KEY NOT NULL,
status VARCHAR(10),
channel VARCHAR(100),
@@ -214,7 +214,7 @@ user VARCHAR(20),
index (parked_time)
);
CREATE TABLE vicidial_manager (
CREATE TABLE vicidial_manager (
man_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
uniqueid VARCHAR(20),
entry_date DATETIME,
@@ -239,7 +239,7 @@ index (uniqueid),
index serverstat(server_ip,status)
);
CREATE TABLE vicidial_list (
CREATE TABLE vicidial_list (
lead_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
entry_date DATETIME,
modify_date TIMESTAMP,
@@ -271,7 +271,7 @@ email VARCHAR(70),
security_phrase VARCHAR(100),
comments VARCHAR(255),
called_count SMALLINT(5) UNSIGNED default '0',
last_local_call_time DATETIME
last_local_call_time DATETIME,
index (phone_number),
index (list_id),
index (called_since_last_reset),
@@ -281,7 +281,7 @@ index (postal_code),
index (last_local_call_time)
);
CREATE TABLE vicidial_hopper (
CREATE TABLE vicidial_hopper (
hopper_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
campaign_id VARCHAR(8),
@@ -295,7 +295,7 @@ priority TINYINT(2) default '0',
index (lead_id)
);
CREATE TABLE vicidial_live_agents (
CREATE TABLE vicidial_live_agents (
live_agent_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user VARCHAR(20),
server_ip VARCHAR(15) NOT NULL,
@@ -325,7 +325,7 @@ index (last_update_time),
index (last_call_finish)
);
CREATE TABLE vicidial_auto_calls (
CREATE TABLE vicidial_auto_calls (
auto_call_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
server_ip VARCHAR(15) NOT NULL,
campaign_id VARCHAR(20),
@@ -348,7 +348,7 @@ index (call_time),
index (last_update_time)
);
CREATE TABLE vicidial_log (
CREATE TABLE vicidial_log (
uniqueid VARCHAR(20) PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
list_id BIGINT(14) UNSIGNED,
@@ -369,7 +369,7 @@ index (lead_id),
index (call_date)
);
CREATE TABLE vicidial_closer_log (
CREATE TABLE vicidial_closer_log (
closecallid INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
list_id BIGINT(14) UNSIGNED,
@@ -392,7 +392,7 @@ index (lead_id),
index (call_date)
);
CREATE TABLE vicidial_xfer_log (
CREATE TABLE vicidial_xfer_log (
xfercallid INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
list_id BIGINT(14) UNSIGNED,
@@ -406,7 +406,7 @@ index (lead_id),
index (call_date)
);
CREATE TABLE vicidial_users (
CREATE TABLE vicidial_users (
user_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user VARCHAR(20) NOT NULL,
pass VARCHAR(20) NOT NULL,
@@ -468,7 +468,7 @@ vdc_agent_api_access ENUM('0','1') default '0'
CREATE UNIQUE INDEX user ON vicidial_users (user);
CREATE TABLE vicidial_user_log (
CREATE TABLE vicidial_user_log (
user_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user VARCHAR(20),
event VARCHAR(50),
@@ -479,7 +479,7 @@ user_group VARCHAR(20),
index (user)
);
CREATE TABLE vicidial_user_groups (
CREATE TABLE vicidial_user_groups (
user_group VARCHAR(20) NOT NULL,
group_name VARCHAR(40) NOT NULL,
allowed_campaigns TEXT,
@@ -488,7 +488,7 @@ qc_allowed_inbound_groups TEXT,
group_shifts TEXT
);
CREATE TABLE vicidial_campaigns (
CREATE TABLE vicidial_campaigns (
campaign_id VARCHAR(8) PRIMARY KEY NOT NULL,
campaign_name VARCHAR(40),
active ENUM('Y','N'),
@@ -563,9 +563,9 @@ drop_inbound_group VARCHAR(20) default '---NONE---',
qc_enabled ENUM('Y','N') default 'N',
qc_statuses TEXT,
qc_lists TEXT,
campaign_shift_start_time VARCHAR(4) default '0900',
campaign_shift_length VARCHAR(5) default '16:00',
campaign_day_start_time VARCHAR(4) default '0100',
qc_shift_id VARCHAR(20) default '24HRMIDNIGHT',
qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE',
qc_show_recording ENUM('Y','N') default 'Y',
qc_web_form_address VARCHAR(255),
qc_script VARCHAR(10),
survey_first_audio_file VARCHAR(50) default 'US_pol_survey_hello',
@@ -583,7 +583,7 @@ disable_alter_custphone ENUM('Y','N') default 'Y',
display_queue_count ENUM('Y','N') default 'Y'
);
CREATE TABLE vicidial_lists (
CREATE TABLE vicidial_lists (
list_id BIGINT(14) UNSIGNED PRIMARY KEY NOT NULL,
list_name VARCHAR(30),
campaign_id VARCHAR(8),
@@ -593,7 +593,7 @@ list_changedate DATETIME,
list_lastcalldate DATETIME
);
CREATE TABLE vicidial_statuses (
CREATE TABLE vicidial_statuses (
status VARCHAR(6) PRIMARY KEY NOT NULL,
status_name VARCHAR(30),
selectable ENUM('Y','N'),
@@ -601,7 +601,7 @@ human_answered ENUM('Y','N') default 'N',
category VARCHAR(20) default 'UNDEFINED'
);
CREATE TABLE vicidial_campaign_statuses (
CREATE TABLE vicidial_campaign_statuses (
status VARCHAR(6) NOT NULL,
status_name VARCHAR(30),
selectable ENUM('Y','N'),
@@ -611,7 +611,7 @@ category VARCHAR(20) default 'UNDEFINED',
index (campaign_id)
);
CREATE TABLE vicidial_campaign_hotkeys (
CREATE TABLE vicidial_campaign_hotkeys (
status VARCHAR(6) NOT NULL,
hotkey VARCHAR(1) NOT NULL,
status_name VARCHAR(30),
@@ -620,13 +620,13 @@ campaign_id VARCHAR(8),
index (campaign_id)
);
CREATE TABLE vicidial_conferences (
CREATE TABLE vicidial_conferences (
conf_exten INT(7) UNSIGNED NOT NULL,
server_ip VARCHAR(15) NOT NULL,
extension VARCHAR(100)
);
CREATE TABLE vicidial_phone_codes (
CREATE TABLE vicidial_phone_codes (
country_code SMALLINT(5) UNSIGNED,
country CHAR(3),
areacode CHAR(3),
@@ -637,7 +637,7 @@ DST_range VARCHAR(8),
geographic_description VARCHAR(30)
);
CREATE TABLE vicidial_inbound_groups (
CREATE TABLE vicidial_inbound_groups (
group_id VARCHAR(20) PRIMARY KEY NOT NULL,
group_name VARCHAR(30),
group_color VARCHAR(7),
@@ -671,7 +671,14 @@ queue_priority TINYINT(2) default '0',
drop_inbound_group VARCHAR(20) default '---NONE---',
ingroup_recording_override ENUM('DISABLED','NEVER','ONDEMAND','ALLCALLS','ALLFORCE') default 'DISABLED',
ingroup_rec_filename VARCHAR(50) default 'NONE',
afterhours_xfer_group VARCHAR(20) default '---NONE---'
afterhours_xfer_group VARCHAR(20) default '---NONE---',
qc_enabled ENUM('Y','N') default 'N',
qc_statuses TEXT,
qc_shift_id VARCHAR(20) default '24HRMIDNIGHT',
qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE',
qc_show_recording ENUM('Y','N') default 'Y',
qc_web_form_address VARCHAR(255),
qc_script VARCHAR(10)
);
CREATE TABLE vicidial_stations (
@@ -685,7 +692,7 @@ DB_pass VARCHAR(15),
DB_port VARCHAR(6)
);
CREATE TABLE vicidial_remote_agents (
CREATE TABLE vicidial_remote_agents (
remote_agent_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user_start VARCHAR(20),
number_of_lines TINYINT UNSIGNED default '1',
@@ -696,7 +703,7 @@ campaign_id VARCHAR(8),
closer_campaigns TEXT
);
CREATE TABLE live_inbound_log (
CREATE TABLE live_inbound_log (
uniqueid VARCHAR(20) NOT NULL,
channel VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
@@ -716,7 +723,7 @@ index (phone_ext),
index (start_time)
);
CREATE TABLE web_client_sessions (
CREATE TABLE web_client_sessions (
extension VARCHAR(100) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
program ENUM('agc','vicidial','monitor','other') default 'agc',
@@ -724,7 +731,7 @@ start_time DATETIME NOT NULL,
session_name VARCHAR(40) UNIQUE NOT NULL
);
CREATE TABLE server_performance (
CREATE TABLE server_performance (
start_time DATETIME NOT NULL,
server_ip VARCHAR(15) NOT NULL,
sysload INT(6) NOT NULL,
@@ -744,7 +751,7 @@ cpu_system_percent SMALLINT(3) UNSIGNED NOT NULL default '0',
cpu_idle_percent SMALLINT(3) UNSIGNED NOT NULL default '0'
);
CREATE TABLE vicidial_agent_log (
CREATE TABLE vicidial_agent_log (
agent_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user VARCHAR(20),
server_ip VARCHAR(15) NOT NULL,
@@ -767,7 +774,7 @@ index (lead_id),
index (user)
);
CREATE TABLE vicidial_scripts (
CREATE TABLE vicidial_scripts (
script_id VARCHAR(10) PRIMARY KEY NOT NULL,
script_name VARCHAR(50),
script_comments VARCHAR(255),
@@ -775,13 +782,13 @@ script_text TEXT,
active ENUM('Y','N')
);
CREATE TABLE phone_favorites (
CREATE TABLE phone_favorites (
extension VARCHAR(100),
server_ip VARCHAR(15),
extensions_list TEXT
);
CREATE TABLE vicidial_callbacks (
CREATE TABLE vicidial_callbacks (
callback_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED,
list_id BIGINT(14) UNSIGNED,
@@ -799,7 +806,7 @@ index (status),
index (callback_time)
);
CREATE TABLE vicidial_list_pins (
CREATE TABLE vicidial_list_pins (
pins_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
entry_time DATETIME,
phone_number VARCHAR(12),
@@ -813,14 +820,14 @@ index (phone_number),
index (entry_time)
);
CREATE TABLE vicidial_lead_filters (
CREATE TABLE vicidial_lead_filters (
lead_filter_id VARCHAR(10) PRIMARY KEY NOT NULL,
lead_filter_name VARCHAR(30) NOT NULL,
lead_filter_comments VARCHAR(255),
lead_filter_sql TEXT
);
CREATE TABLE vicidial_call_times (
CREATE TABLE vicidial_call_times (
call_time_id VARCHAR(10) PRIMARY KEY NOT NULL,
call_time_name VARCHAR(30) NOT NULL,
call_time_comments VARCHAR(255) default '',
@@ -843,7 +850,7 @@ ct_saturday_stop SMALLINT(4) unsigned default '0',
ct_state_call_times TEXT default ''
);
CREATE TABLE vicidial_state_call_times (
CREATE TABLE vicidial_state_call_times (
state_call_time_id VARCHAR(10) PRIMARY KEY NOT NULL,
state_call_time_state VARCHAR(2) NOT NULL,
state_call_time_name VARCHAR(30) NOT NULL,
@@ -866,7 +873,7 @@ sct_saturday_start SMALLINT(4) unsigned default '0',
sct_saturday_stop SMALLINT(4) unsigned default '0'
);
CREATE TABLE vicidial_campaign_stats (
CREATE TABLE vicidial_campaign_stats (
campaign_id VARCHAR(20) PRIMARY KEY NOT NULL,
update_time TIMESTAMP,
dialable_leads INT(9) UNSIGNED default '0',
@@ -904,11 +911,11 @@ status_category_4 VARCHAR(20),
status_category_count_4 INT(9) UNSIGNED default '0'
);
CREATE TABLE vicidial_dnc (
CREATE TABLE vicidial_dnc (
phone_number VARCHAR(12) PRIMARY KEY NOT NULL
);
CREATE TABLE vicidial_lead_recycle (
CREATE TABLE vicidial_lead_recycle (
recycle_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
campaign_id VARCHAR(8),
status VARCHAR(6) NOT NULL,
@@ -918,7 +925,7 @@ active ENUM('Y','N') default 'N',
index (campaign_id)
);
CREATE TABLE vicidial_campaign_server_stats (
CREATE TABLE vicidial_campaign_server_stats (
campaign_id VARCHAR(20) NOT NULL,
server_ip VARCHAR(15) NOT NULL,
update_time TIMESTAMP,
@@ -927,7 +934,7 @@ index (campaign_id),
index (server_ip)
);
CREATE TABLE vicidial_server_trunks (
CREATE TABLE vicidial_server_trunks (
server_ip VARCHAR(15) NOT NULL,
campaign_id VARCHAR(20) NOT NULL,
dedicated_trunks SMALLINT(5) UNSIGNED default '0',
@@ -936,7 +943,7 @@ index (campaign_id),
index (server_ip)
);
CREATE TABLE vicidial_postal_codes (
CREATE TABLE vicidial_postal_codes (
postal_code VARCHAR(10) NOT NULL,
state VARCHAR(4),
GMT_offset VARCHAR(5),
@@ -946,7 +953,7 @@ country CHAR(3),
country_code SMALLINT(5) UNSIGNED
);
CREATE TABLE vicidial_pause_codes (
CREATE TABLE vicidial_pause_codes (
pause_code VARCHAR(6) NOT NULL,
pause_code_name VARCHAR(30),
billable ENUM('NO','YES','HALF') default 'NO',
@@ -954,7 +961,7 @@ campaign_id VARCHAR(8),
index (campaign_id)
);
CREATE TABLE system_settings (
CREATE TABLE system_settings (
version VARCHAR(50),
install_date VARCHAR(50),
use_non_latin ENUM('0','1') default '0',
@@ -982,7 +989,7 @@ vdc_agent_api_active ENUM('0','1') default '0',
qc_last_pull_time DATETIME
);
CREATE TABLE vicidial_campaigns_list_mix (
CREATE TABLE vicidial_campaigns_list_mix (
vcl_id VARCHAR(20) PRIMARY KEY NOT NULL,
vcl_name VARCHAR(50),
campaign_id VARCHAR(8),
@@ -992,7 +999,7 @@ status ENUM('ACTIVE','INACTIVE') default 'INACTIVE',
index (campaign_id)
);
CREATE TABLE vicidial_status_categories (
CREATE TABLE vicidial_status_categories (
vsc_id VARCHAR(20) PRIMARY KEY NOT NULL,
vsc_name VARCHAR(50),
vsc_description VARCHAR(255),
@@ -1069,7 +1076,7 @@ index (campaign_id),
index (user)
);
CREATE TABLE vicidial_user_closer_log (
CREATE TABLE vicidial_user_closer_log (
user VARCHAR(20),
campaign_id VARCHAR(20),
event_date DATETIME,
@@ -1079,12 +1086,12 @@ index (user),
index (event_date)
);
CREATE TABLE vicidial_qc_codes (
CREATE TABLE vicidial_qc_codes (
code VARCHAR(8) PRIMARY KEY NOT NULL,
code_name VARCHAR(30)
);
CREATE TABLE vicidial_agent_sph (
CREATE TABLE vicidial_agent_sph (
campaign_group_id VARCHAR(20) NOT NULL,
stat_date DATE NOT NULL,
shift VARCHAR(20) NOT NULL,
@@ -1099,13 +1106,13 @@ index (campaign_group_id),
index (stat_date)
);
CREATE TABLE phones_alias (
CREATE TABLE phones_alias (
alias_id VARCHAR(20) NOT NULL UNIQUE PRIMARY KEY,
alias_name VARCHAR(50),
logins_list VARCHAR(255)
);
CREATE TABLE vicidial_shifts (
CREATE TABLE vicidial_shifts (
shift_id VARCHAR(20) NOT NULL,
shift_name VARCHAR(50),
shift_start_time VARCHAR(4) default '0900',
@@ -1114,7 +1121,7 @@ shift_weekdays VARCHAR(7) default '0123456',
index (shift_id)
);
CREATE TABLE vicidial_timeclock_log (
CREATE TABLE vicidial_timeclock_log (
timeclock_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
event_epoch INT(10) UNSIGNED NOT NULL,
event_date DATETIME NOT NULL,
@@ -1132,7 +1139,7 @@ tcid_link INT(9) UNSIGNED,
index (user)
);
CREATE TABLE vicidial_timeclock_status (
CREATE TABLE vicidial_timeclock_status (
user VARCHAR(20) UNIQUE NOT NULL,
user_group VARCHAR(20) NOT NULL,
event_epoch INT(10) UNSIGNED,
@@ -1143,7 +1150,7 @@ shift_id VARCHAR(20),
index (user)
);
CREATE TABLE vicidial_timeclock_audit_log (
CREATE TABLE vicidial_timeclock_audit_log (
timeclock_id INT(9) UNSIGNED NOT NULL,
event_epoch INT(10) UNSIGNED NOT NULL,
event_date DATETIME NOT NULL,
@@ -1159,7 +1166,7 @@ index (timeclock_id),
index (user)
);
CREATE TABLE vicidial_admin_log (
CREATE TABLE vicidial_admin_log (
admin_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
event_date DATETIME NOT NULL,
user VARCHAR(20) NOT NULL,
@@ -1225,5 +1232,9 @@ INSERT INTO vicidial_state_call_times SET state_call_time_id='utah',state_call_t
INSERT INTO vicidial_state_call_times SET state_call_time_id='washington',state_call_time_state='WA',state_call_time_name='Washington 8am',sct_default_start='800',sct_default_stop='2100';
INSERT INTO vicidial_state_call_times SET state_call_time_id='wyoming',state_call_time_state='WY',state_call_time_name='Wyoming 8am-8pm',sct_default_start='800',sct_default_stop='2000';
UPDATE system_settings SET db_schema_version='1100';
INSERT INTO vicidial_shifts SET shift_id='24HRMIDNIGHT',shift_name='24 hours 7 days a week',shift_start_time='0000',shift_length='24:00',shift_weekdays='0123456';
UPDATE system_settings SET qc_last_pull_time=NOW();
UPDATE system_settings SET db_schema_version='1101';
+21
View File
@@ -314,3 +314,24 @@ ALTER TABLE vicidial_list ADD last_local_call_time DATETIME;
CREATE INDEX last_local_call_time ON vicidial_list (last_local_call_time);
UPDATE system_settings SET db_schema_version='1100';
INSERT INTO vicidial_shifts SET shift_id='24HRMIDNIGHT',shift_name='24 hours 7 days a week',shift_start_time='0000',shift_length='24:00',shift_weekdays='0123456';
ALTER TABLE vicidial_campaigns CHANGE campaign_shift_start_time qc_shift_id VARCHAR(20) default '24HRMIDNIGHT';
ALTER TABLE vicidial_campaigns CHANGE campaign_shift_length qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE vicidial_campaigns CHANGE campaign_day_start_time qc_show_recording ENUM('Y','N') default 'Y';
UPDATE vicidial_campaigns SET qc_shift_id='24HRMIDNIGHT';
UPDATE vicidial_campaigns SET qc_get_record_launch='NONE';
UPDATE vicidial_campaigns SET qc_show_recording='Y';
ALTER TABLE vicidial_inbound_groups ADD qc_enabled ENUM('Y','N') default 'N';
ALTER TABLE vicidial_inbound_groups ADD qc_statuses TEXT;
ALTER TABLE vicidial_inbound_groups ADD qc_shift_id VARCHAR(20) default '24HRMIDNIGHT';
ALTER TABLE vicidial_inbound_groups ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD qc_show_recording ENUM('Y','N') default 'Y';
ALTER TABLE vicidial_inbound_groups ADD qc_web_form_address VARCHAR(255);
ALTER TABLE vicidial_inbound_groups ADD qc_script VARCHAR(10);
UPDATE system_settings SET qc_last_pull_time="2008-01-01";
UPDATE system_settings SET db_schema_version='1101';
@@ -35,17 +35,9 @@ Drop Transfer Group -<\/B> If Drop Action is set to IN_GROUP, the call will be s
QC SETTINGS FOR THIS CAMPAIGN||
QC Enabled: ||
QC Statuses: ||
QC Lists: ||
Campaign Shift Start Time: ||
Campaign Shift Length: ||
Campaign Day Start Time: ||
Modify Campaign QC Settings||
QC Enabled -<\/B> Setting this field to Y allows for the agent Quality Control features to work. Default is N||
QC Statuses -<\/B> This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review||
QC Lists -<\/B> This area is where you select which lists of leads should be gone over by the QC system. Place a check next to the list that you want QC to review||
Campaign Shift Start Time -<\/B> This is the time that the campaign shift begins. Must only be numbers, 9:30 AM would be 0930||
Campaign Shift Length -<\/B> This is the time in Hours and Minutes that the campaign shift lasts. 8 hours would be 08:00||
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||
@@ -232,6 +224,14 @@ QC Last Pull Time: ||
and less than 43200 seconds or 12 hours||
LEADS AT LIMIT||
Lead counts taken from active lists in the campaign only||
QC Get Record Launch-<\/B> This allows one of the following actions to be triggered upon a QC agent receiving a new record||
QC Show Recording -<\/B> This allows for a recording that may be linked with the QC record to be display in the QC agent screen||
QC Shift -<\/B> This is the shift timeframe used to pull QC records for a campaign. The days of the week are ignored for these functions||
QC Get Record Launch||
QC Show Recording||
QC Shift||
Inbound Group QC Settings||
QC Shift -<\/B> This is the shift timeframe used to pull QC records for an inbound_group. The days of the week are ignored for these functions||
############################################################ CLIENT
+42 -20
View File
@@ -54,7 +54,7 @@
# - $comments - ('Good Customer',...)
# - $auto_dial_level - ('0','1','1.2',...)
# - $VDstop_rec_after_each_call - ('0','1')
# - $conf_silent_prefix - ('7','8','',...)
# - $conf_silent_prefix - ('7','8','5',...)
# - $extension - ('123','user123','25-1',...)
# - $protocol - ('Zap','SIP','IAX2',...)
# - $user_abb - ('1234','6666',...)
@@ -71,6 +71,7 @@
# - $no_delete_sessions - ('0','1')
# - $LogouTKicKAlL - ('0','1');
# - $closer_blended = ('0','1');
# - $inOUT = ('IN','OUT');
# CHANGELOG:
# 50629-1044 - First build of script
@@ -152,11 +153,13 @@
# 80630-2153 - Added queue_log logging for Manual dial calls
# 80703-0139 - Added alter customer phone permissions
# 80707-2325 - Added vicidial_id to recording_log for tracking of vicidial or closer log to recording
# 80713-0624 - Added vicidial_list_last_local_call_time field
# 80713-0624 - Added vicidial_list.last_local_call_time field
# 80717-1604 - Modified logging function to use inOUT to determine call direction and place to log
# 80719-1147 - Changed recording conf prefix
#
$version = '2.0.5-77';
$build = '80713-0624';
$version = '2.0.5-79';
$build = '80719-1147';
require("dbconnect.php");
@@ -293,7 +296,8 @@ if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];}
elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];}
if (isset($_GET["closer_blended"])) {$closer_blended=$_GET["closer_blended"];}
elseif (isset($_POST["closer_blended"])) {$closer_blended=$_POST["closer_blended"];}
if (isset($_GET["inOUT"])) {$inOUT=$_GET["inOUT"];}
elseif (isset($_POST["inOUT"])) {$inOUT=$_POST["inOUT"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -1217,15 +1221,12 @@ if ($stage == "end")
$term_reason='NONE';
if ($start_epoch < 1000)
{
$stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$check_inbound = $row[0];
if ($check_inbound > 0)
if ($inOUT == 'IN')
{
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
##### look for the start epoch in the vicidial_closer_log table
$stmt="SELECT start_epoch,term_reason,closecallid FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;";
$stmt="SELECT start_epoch,term_reason,closecallid FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
}
else
{
@@ -1248,8 +1249,12 @@ if ($stage == "end")
$length_in_sec = 0;
}
if ( ($length_in_sec < 1) and ($check_inbound > 0) )
if ( ($length_in_sec < 1) and ($inOUT == 'IN') )
{
$fp = fopen ("./vicidial_debug.txt", "a");
fwrite ($fp, "$NOW_TIME|INBND_LOG_1|$uniqueid|$lead_id|$user|$inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$start_epoch|\n");
fclose($fp);
##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log
$stmt="SELECT start_epoch,term_reason FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
$rslt=mysql_query($stmt, $link);
@@ -1272,18 +1277,22 @@ if ($stage == "end")
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
$closer_logged=0;
if ($check_inbound > 0)
if ($inOUT == 'IN')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
if ($affected_rows > 0)
{
$closer_logged=1;
echo "$uniqueid\n$channel\n";
}
else
{
$fp = fopen ("./vicidial_debug.txt", "a");
fwrite ($fp, "$NOW_TIME|INBND_LOG_2|$uniqueid|$lead_id|$user|$inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$start_epoch|\n");
fclose($fp);
}
}
#############################################
@@ -1512,7 +1521,7 @@ if ($stage == "end")
}
}
if ($closer_logged < 1)
if ($inOUT == 'OUT')
{
$SQLterm = "term_reason='$term_reason',";
@@ -1539,7 +1548,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -1653,7 +1662,20 @@ if ($stage == "end")
$start_time = $row[1];
$vicidial_id = $row[2];
if (strlen($vicidial_id)<1) {$vidSQL = ",vicidial_id='$VDvicidial_id'";}
if (strlen($vicidial_id)<1)
{$vidSQL = ",vicidial_id='$VDvicidial_id'";}
else
{
if ( (ereg('.',$vicidial_id)) and ($inOUT == 'IN') )
{
if (!ereg('.',$VDvicidial_id))
{$vidSQL = ",vicidial_id='$VDvicidial_id'";}
$fp = fopen ("./vicidial_debug.txt", "a");
fwrite ($fp, "$NOW_TIME|INBND_LOG_3|$uniqueid|$lead_id|$user|$inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|\n");
fclose($fp);
}
}
$length_in_sec = ($StarTtime - $start_time);
$length_in_min = ($length_in_sec / 60);
$length_in_min = sprintf("%8.2f", $length_in_min);
+11 -5
View File
@@ -184,10 +184,11 @@
# 80703-1106 - Added API functionality for Hangup and Dispo, added Agent Display Queue Count
# 80707-2325 - Added vicidial_id to recording_log for tracking of vicidial or closer log to recording
# 80709-0358 - Added Default alt phone dial hard-code option
# 80719-1147 - Changed recording and senddtmf conf prefix
#
$version = '2.0.5-162';
$build = '80709-0358';
$version = '2.0.5-163';
$build = '80719-1147';
require("dbconnect.php");
@@ -276,7 +277,11 @@ while ($i < $qm_conf_ct)
##### END SETTINGS LOOKUP #####
###########################################
$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
##### DEFINABLE SETTINGS AND OPTIONS
###########################################
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
$dtmf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently
$HKuser_level = '5'; # minimum vicidial user_level for HotKeys
$campaign_login_list = '1'; # show drop-down list of campaigns at login
$manual_dial_preview = '1'; # allow preview lead option when manual dial
@@ -1875,6 +1880,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var xferchannellive=0;
var nochannelinsession=0;
var agc_dial_prefix = '91';
var dtmf_silent_prefix = '<? echo $dtmf_silent_prefix ?>';
var conf_silent_prefix = '<? echo $conf_silent_prefix ?>';
var menuheight = 30;
var menuwidth = 30;
@@ -2348,7 +2354,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (xmlhttp)
{
var queryCID = dtmf_string;
VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=SysCIDOriginate&format=text&channel=" + dtmf_send_extension + "&queryCID=" + queryCID + "&exten=" + conf_silent_prefix + '' + conf_dtmf_room + "&ext_context=" + ext_context + "&ext_priority=1";
VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=SysCIDOriginate&format=text&channel=" + dtmf_send_extension + "&queryCID=" + queryCID + "&exten=" + dtmf_silent_prefix + '' + conf_dtmf_room + "&ext_context=" + ext_context + "&ext_priority=1";
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VMCoriginate_query);
@@ -3052,7 +3058,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0";
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&DB=0";
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
+45 -7
View File
@@ -12,6 +12,7 @@
# 80430-1920 - Added Customer hangup cause stats
# 80620-0031 - Fixed human answered calculation for drop perfentage
# 80709-0230 - Added time stats to call statuses
# 80717-2118 - Added calls/hour out of agent login time in status summary
#
header ("Content-type: text/html; charset=utf-8");
@@ -21,6 +22,8 @@ require("dbconnect.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
if (isset($_GET["agent_hours"])) {$agent_hours=$_GET["agent_hours"];}
elseif (isset($_POST["agent_hours"])) {$agent_hours=$_POST["agent_hours"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
@@ -108,6 +111,7 @@ while ($i < $groups_to_print)
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo "<TITLE>VICIDIAL: VDAD Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
echo "<INPUT TYPE=HIDDEN NAME=agent_hours VALUE=\"$agent_hours\">\n";
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
echo " to <INPUT TYPE=TEXT NAME=end_date SIZE=10 MAXLENGTH=10 VALUE=\"$end_date\">\n";
echo "<SELECT SIZE=1 NAME=group>\n";
@@ -342,9 +346,10 @@ $TOTALcalls = 0;
echo "\n";
echo "---------- CALL STATUS STATS\n";
echo "+--------+----------------------+------------+------------+----------+----------+\n";
echo "| STATUS | DESCRIPTION | CALLS | TOTAL TIME | AVG TIME |CALLS/HOUR|\n";
echo "+--------+----------------------+------------+------------+----------+----------+\n";
echo "+--------+----------------------+------------+----------------------------------+----------+\n";
echo "| | | | CALL TIME |AGENT TIME|\n";
echo "| STATUS | DESCRIPTION | CALLS | TOTAL TIME | AVG TIME |CALLS/HOUR|CALLS/HOUR|\n";
echo "+--------+----------------------+------------+------------+----------+----------+----------+\n";
## first get all statuses and names
$stmt="SELECT * from vicidial_statuses order by status";
@@ -372,6 +377,17 @@ while ($Cstatuses_to_print > $o)
$o++;
}
## Pull the count of agent seconds for the total tally
$stmt="SELECT sum(pause_sec + wait_sec + talk_sec + dispo_sec) from vicidial_agent_log where event_time >= '$query_date_BEGIN' and event_time <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000;";
$rslt=mysql_query($stmt, $link);
$Ctally_to_print = mysql_num_rows($rslt);
if ($Ctally_to_print > 0)
{
$rowx=mysql_fetch_row($rslt);
$AGENTsec = "$rowx[0]";
}
## get counts and time totals for all statuses in this campaign
$stmt="select count(*),status,sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
@@ -388,6 +404,8 @@ while ($i < $statuses_to_print)
$TOTALcalls = ($TOTALcalls + $row[0]);
$STATUSrate = ($STATUScount / ($TOTALsec / 3600) );
$STATUSrate = sprintf("%.2f", $STATUSrate);
$AGENTrate = ($STATUScount / ($AGENTsec / 3600) );
$AGENTrate = sprintf("%.2f", $AGENTrate);
$STATUShours_H = ($row[2] / 3600);
$STATUShours_H_int = round($STATUShours_H, 2);
@@ -422,6 +440,7 @@ while ($i < $statuses_to_print)
$STATUShours = sprintf("%10s", $STATUShours);while(strlen($STATUShours)>10) {$STATUShours = substr("$STATUShours", 0, -1);}
$STATUSavg = sprintf("%8s", $STATUSavg);while(strlen($STATUSavg)>8) {$STATUSavg = substr("$STATUSavg", 0, -1);}
$STATUSrate = sprintf("%8s", $STATUSrate);while(strlen($STATUSrate)>8) {$STATUSrate = substr("$STATUSrate", 0, -1);}
$AGENTrate = sprintf("%8s", $AGENTrate);while(strlen($AGENTrate)>8) {$AGENTrate = substr("$AGENTrate", 0, -1);}
if ($non_latin < 1)
{
@@ -435,7 +454,7 @@ while ($i < $statuses_to_print)
}
echo "| $status | $status_name | $STATUScount | $STATUShours | $STATUSavg | $STATUSrate |\n";
echo "| $status | $status_name | $STATUScount | $STATUShours | $STATUSavg | $STATUSrate | $AGENTrate |\n";
$i++;
}
@@ -450,6 +469,22 @@ else
{
$TOTALrate = ($TOTALcalls / ($TOTALsec / 3600) );
$TOTALrate = sprintf("%.2f", $TOTALrate);
$aTOTALrate = ($TOTALcalls / ($AGENTsec / 3600) );
$aTOTALrate = sprintf("%.2f", $aTOTALrate);
$aTOTALhours_H = ($AGENTsec / 3600);
$aTOTALhours_H_int = round($aTOTALhours_H, 2);
$aTOTALhours_H_int = intval("$aTOTALhours_H_int");
$aTOTALhours_M = ($aTOTALhours_H - $aTOTALhours_H_int);
$aTOTALhours_M = ($aTOTALhours_M * 60);
$aTOTALhours_M_int = round($aTOTALhours_M, 2);
$aTOTALhours_M_int = intval("$aTOTALhours_M_int");
$aTOTALhours_S = ($aTOTALhours_M - $aTOTALhours_M_int);
$aTOTALhours_S = ($aTOTALhours_S * 60);
$aTOTALhours_S = round($aTOTALhours_S, 0);
if ($aTOTALhours_S < 10) {$aTOTALhours_S = "0$aTOTALhours_S";}
if ($aTOTALhours_M_int < 10) {$aTOTALhours_M_int = "0$aTOTALhours_M_int";}
$aTOTALhours = "$aTOTALhours_H_int:$aTOTALhours_M_int:$aTOTALhours_S";
$TOTALhours_H = ($TOTALsec / 3600);
$TOTALhours_H_int = round($TOTALhours_H, 2);
@@ -481,12 +516,15 @@ else
}
$TOTALcalls = sprintf("%10s", $TOTALcalls);
$TOTALhours = sprintf("%10s", $TOTALhours);while(strlen($TOTALhours)>10) {$TOTALhours = substr("$TOTALhours", 0, -1);}
$aTOTALhours = sprintf("%10s", $aTOTALhours);while(strlen($aTOTALhours)>10) {$aTOTALhours = substr("$aTOTALhours", 0, -1);}
$TOTALavg = sprintf("%8s", $TOTALavg);while(strlen($TOTALavg)>8) {$TOTALavg = substr("$TOTALavg", 0, -1);}
$TOTALrate = sprintf("%8s", $TOTALrate);while(strlen($TOTALrate)>8) {$TOTALrate = substr("$TOTALrate", 0, -1);}
$aTOTALrate = sprintf("%8s", $aTOTALrate);while(strlen($aTOTALrate)>8) {$aTOTALrate = substr("$aTOTALrate", 0, -1);}
echo "+--------+----------------------+------------+------------+----------+----------+\n";
echo "| TOTAL: | $TOTALcalls | $TOTALhours | $TOTALavg | $TOTALrate |\n";
echo "+--------+----------------------+------------+------------+----------+----------+\n";
echo "+--------+----------------------+------------+------------+----------+----------+----------+\n";
echo "| TOTAL: | $TOTALcalls | $TOTALhours | $TOTALavg | $TOTALrate | |\n";
echo "| AGENT TIME | $aTOTALhours | | $aTOTALrate |\n";
echo "+--------------------------------------------+------------+---------------------+----------+\n";
##############################
@@ -932,12 +932,13 @@ $calls_to_list = mysql_num_rows($rslt);
if (eregi("INCALL",$Lstatus))
{
if (!ereg("$Acallerid[$i]\|",$callerids))
{
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = ' DEAD ';
}
### temporarily deactivate DEAD calls display until bug is fixed
# if (!ereg("$Acallerid[$i]\|",$callerids))
# {
# $Astatus[$i] = 'DEAD';
# $Lstatus = 'DEAD';
# $status = ' DEAD ';
# }
if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) )
{$CM='A';}
+235 -37
View File
@@ -691,12 +691,12 @@ if (isset($_GET["qc_statuses"])) {$qc_statuses=$_GET["qc_statuses"];}
elseif (isset($_POST["qc_statuses"])) {$qc_statuses=$_POST["qc_statuses"];}
if (isset($_GET["qc_lists"])) {$qc_lists=$_GET["qc_lists"];}
elseif (isset($_POST["qc_lists"])) {$qc_lists=$_POST["qc_lists"];}
if (isset($_GET["campaign_shift_start_time"])) {$campaign_shift_start_time=$_GET["campaign_shift_start_time"];}
elseif (isset($_POST["campaign_shift_start_time"])) {$campaign_shift_start_time=$_POST["campaign_shift_start_time"];}
if (isset($_GET["campaign_shift_length"])) {$campaign_shift_length=$_GET["campaign_shift_length"];}
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_get_record_launch"])) {$qc_get_record_launch=$_GET["qc_get_record_launch"];}
elseif (isset($_POST["qc_get_record_launch"])) {$qc_get_record_launch=$_POST["qc_get_record_launch"];}
if (isset($_GET["qc_show_recording"])) {$qc_show_recording=$_GET["qc_show_recording"];}
elseif (isset($_POST["qc_show_recording"])) {$qc_show_recording=$_POST["qc_show_recording"];}
if (isset($_GET["qc_shift_id"])) {$qc_shift_id=$_GET["qc_shift_id"];}
elseif (isset($_POST["qc_shift_id"])) {$qc_shift_id=$_POST["qc_shift_id"];}
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"];}
@@ -930,8 +930,6 @@ $qc_user_level = ereg_replace("[^0-9]","",$qc_user_level);
$qc_pass = ereg_replace("[^0-9]","",$qc_pass);
$qc_finish = ereg_replace("[^0-9]","",$qc_finish);
$qc_commit = ereg_replace("[^0-9]","",$qc_commit);
$campaign_shift_start_time = ereg_replace("[^0-9]","",$campaign_shift_start_time);
$campaign_day_start_time = ereg_replace("[^0-9]","",$campaign_day_start_time);
$shift_start_time = ereg_replace("[^0-9]","",$shift_start_time);
$timeclock_end_of_day = ereg_replace("[^0-9]","",$timeclock_end_of_day);
$survey_xfer_exten = ereg_replace("[^0-9]","",$survey_xfer_exten);
@@ -980,6 +978,7 @@ $tovdad_display = ereg_replace("[^NY]","",$tovdad_display);
$campaign_allow_inbound = ereg_replace("[^NY]","",$campaign_allow_inbound);
$disable_alter_custphone = ereg_replace("[^NY]","",$disable_alter_custphone);
$display_queue_count = ereg_replace("[^NY]","",$display_queue_count);
$qc_show_recording = ereg_replace("[^NY]","",$qc_show_recording);
$qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled);
@@ -1008,6 +1007,7 @@ $qc_script = ereg_replace("[^0-9a-zA-Z]","",$qc_script);
$code = ereg_replace("[^0-9a-zA-Z]","",$code);
$survey_no_response_action = ereg_replace("[^0-9a-zA-Z]","",$survey_no_response_action);
$survey_ni_status = ereg_replace("[^0-9a-zA-Z]","",$survey_ni_status);
$qc_get_record_launch = ereg_replace("[^0-9a-zA-Z]","",$qc_get_record_launch);
### DIGITS and Dots
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
@@ -1099,6 +1099,7 @@ $afterhours_xfer_group = ereg_replace("[^-\_0-9a-zA-Z]","",$afterhours_xfer_grou
$after_hours_action = ereg_replace("[^-\_0-9a-zA-Z]","",$after_hours_action);
$alias_id = ereg_replace("[^-\_0-9a-zA-Z]","",$alias_id);
$shift_id = ereg_replace("[^-\_0-9a-zA-Z]","",$shift_id);
$qc_shift_id = ereg_replace("[^-\_0-9a-zA-Z]","",$qc_shift_id);
$survey_first_audio_file = ereg_replace("[^-\_0-9a-zA-Z]","",$survey_first_audio_file);
$survey_opt_in_audio_file = ereg_replace("[^-\_0-9a-zA-Z]","",$survey_opt_in_audio_file);
$survey_ni_audio_file = ereg_replace("[^-\_0-9a-zA-Z]","",$survey_ni_audio_file);
@@ -1165,7 +1166,6 @@ $queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pas
$after_hours_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$after_hours_message_filename);
$welcome_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$welcome_message_filename);
$onhold_prompt_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$onhold_prompt_filename);
$campaign_shift_length = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$campaign_shift_length);
### ALPHA-NUMERIC and underscore and dash and slash and at and space and colon
$vdc_header_date_format = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$vdc_header_date_format);
@@ -1341,11 +1341,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir);
# 80625-0032 - Added time/phone display format options to system settings
# 80703-0124 - Added alter cust phone and api settings
# 80715-1130 - Added Recycle leads limit count
# 80719-1351 - Changed QC settings in campaigns and In-Groups
#
# 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.5-135';
$build = '80715-1130';
$admin_version = '2.0.5-136';
$build = '80719-1351';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -2796,24 +2797,19 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<B>QC Statuses -</B> This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review.
<BR>
<A NAME="vicidial_campaigns-qc_lists">
<A NAME="vicidial_campaigns-qc_shift_id">
<BR>
<B>QC Lists -</B> This area is where you select which lists of leads should be gone over by the QC system. Place a check next to the list that you want QC to review.
<B>QC Shift -</B> This is the shift timeframe used to pull QC records for a campaign. The days of the week are ignored for these functions.
<BR>
<A NAME="vicidial_campaigns-campaign_shift_start_time">
<A NAME="vicidial_campaigns-qc_get_record_launch">
<BR>
<B>Campaign Shift Start Time -</B> This is the time that the campaign shift begins. Must only be numbers, 9:30 AM would be 0930.
<B>QC Get Record Launch-</B> This allows one of the following actions to be triggered upon a QC agent receiving a new record.
<BR>
<A NAME="vicidial_campaigns-campaign_shift_length">
<A NAME="vicidial_campaigns-qc_show_recording">
<BR>
<B>Campaign Shift Length -</B> This is the time in Hours and Minutes that the campaign shift lasts. 8 hours would be 08:00.
<BR>
<A NAME="vicidial_campaigns-campaign_day_start_time">
<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.
<B>QC Show Recording -</B> This allows for a recording that may be linked with the QC record to be display in the QC agent screen.
<BR>
<A NAME="vicidial_campaigns-qc_web_form_address">
@@ -3100,6 +3096,41 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>In-Group Recording Filename -</B> This field will override the Campaign Recording Filenaming Scheme unless it is set to NONE. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. Default is NONE.
<BR>
<A NAME="vicidial_inbound_groups-qc_enabled">
<BR>
<B>QC Enabled -</B> Setting this field to Y allows for the agent Quality Control features to work. Default is N.
<BR>
<A NAME="vicidial_inbound_groups-qc_statuses">
<BR>
<B>QC Statuses -</B> This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review.
<BR>
<A NAME="vicidial_inbound_groups-qc_shift_id">
<BR>
<B>QC Shift -</B> This is the shift timeframe used to pull QC records for an inbound_group. The days of the week are ignored for these functions.
<BR>
<A NAME="vicidial_inbound_groups-qc_get_record_launch">
<BR>
<B>QC Get Record Launch-</B> This allows one of the following actions to be triggered upon a QC agent receiving a new record.
<BR>
<A NAME="vicidial_inbound_groups-qc_show_recording">
<BR>
<B>QC Show Recording -</B> This allows for a recording that may be linked with the QC record to be display in the QC agent screen.
<BR>
<A NAME="vicidial_inbound_groups-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_inbound_groups-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.
<BR><BR><BR><BR>
@@ -4472,7 +4503,7 @@ function user_auto()
var user_field = document.getElementById("user");
if (user_toggle.value < 1)
{
user_field.value = 'AUTOGENERATEZZZZZZZZ';
user_field.value = 'AUTOGENERATEZZZ';
user_field.disabled = true;
user_toggle.value = 1;
}
@@ -5566,6 +5597,10 @@ if ($ADD=="2")
{echo "<br>USER NOT ADDED - there is already a user in the system with this user number\n";}
else
{
if (ereg('AUTOGENERA',$user))
{
$user = 'AUTOGENERA';
}
if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 10) )
{
echo "<br>USER NOT ADDED - Please go back and look at the data you entered\n";
@@ -5794,7 +5829,7 @@ if ($ADD==20)
{
echo "<br><B>CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id</B>\n";
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,campaign_shift_start_time,campaign_shift_length,campaign_day_start_time,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count from vicidial_campaigns where campaign_id='$source_campaign_id';";
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id from vicidial_campaigns where campaign_id='$source_campaign_id';";
$rslt=mysql_query($stmt, $link);
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
@@ -6211,7 +6246,7 @@ if ($ADD==2011)
}
else
{
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$rslt=mysql_query($stmt, $link);
echo "<br><B>GROUP ADDED: $group_id</B>\n";
@@ -7425,7 +7460,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',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script' where campaign_id='$campaign_id';";
$stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_shift_id='$qc_shift_id' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmt, $link);
### LOG CHANGES TO LOG FILE ###
@@ -7829,9 +7864,27 @@ if ($ADD==4111)
}
else
{
$p=0;
$qc_statuses_ct = count($qc_statuses);
while ($p < $qc_statuses_ct)
{
$QC_statuses .= " $qc_statuses[$p]";
$p++;
}
$p=0;
$qc_lists_ct = count($qc_lists);
while ($p < $qc_lists_ct)
{
$QC_lists .= " $qc_lists[$p]";
$p++;
}
if (strlen($QC_statuses)>0) {$QC_statuses .= " -";}
if (strlen($QC_lists)>0) {$QC_lists .= " -";}
echo "<br><B>GROUP MODIFIED: $group_id</B>\n";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group' where group_id='$group_id';";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script' where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
### LOG CHANGES TO LOG FILE ###
@@ -10358,9 +10411,9 @@ if ($ADD==31)
$qc_enabled = $row[71];
$qc_statuses = $row[72];
$qc_lists = $row[73];
$campaign_shift_start_time = $row[74];
$campaign_shift_length = $row[75];
$campaign_day_start_time = $row[76];
$qc_shift_id = $row[74];
$qc_get_record_launch = $row[75];
$qc_show_recording = $row[76];
$qc_web_form_address = $row[77];
$qc_script = $row[78];
$survey_first_audio_file = $row[79];
@@ -11226,21 +11279,55 @@ if ($ADD==31)
$p++;
}
##### get scripts listings for pulldown
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
$rslt=mysql_query($stmt, $link);
$scripts_to_print = mysql_num_rows($rslt);
$QCscripts_list="";
$o=0;
while ($scripts_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$QCscripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$scriptname_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
##### get shifts listings for pulldown
$stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id";
$rslt=mysql_query($stmt, $link);
$shifts_to_print = mysql_num_rows($rslt);
$QCshifts_list="";
$o=0;
while ($shifts_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$QCshifts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$shiftname_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
echo "<br><br><b>QC SETTINGS FOR THIS CAMPAIGN:</b><br>\n";
echo "<form action=$PHP_SELF method=POST><center><TABLE width=500 cellspacing=3>\n";
echo "<form action=$PHP_SELF method=POST><center><TABLE width=700 cellspacing=3>\n";
echo "<tr bgcolor=#B9CBFD><td align=right><input type=hidden name=ADD value=48>\n";
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
echo "QC Enabled: </td><td><select size=1 name=qc_enabled><option>Y</option><option>N</option><option SELECTED>$qc_enabled</option></select> $NWB#vicidial_campaigns-qc_enabled$NWE</td></tr>\n";
echo "<tr bgcolor=#9BB9FB><td align=right>QC Statuses: <BR> $NWB#vicidial_campaigns-qc_statuses$NWE</td><td>$qc_statuses_list</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>QC Lists: <BR> $NWB#vicidial_campaigns-qc_lists$NWE</td><td>$qc_lists_list</td></tr>\n";
echo "<tr bgcolor=#9BB9FB><td align=right>Campaign Shift Start Time: </td><td><input type=text size=6 maxlength=4 name=campaign_shift_start_time value=\"$campaign_shift_start_time\"> $NWB#vicidial_campaigns-campaign_shift_start_time$NWE</td></tr>\n";
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=#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>QC Lists: <BR> $NWB#vicidial_campaigns-qc_lists$NWE</td><td>$qc_lists_list</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><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 "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=331111111&shift_id=$qc_shift_id\">QC Shift</a>: </td><td align=left><select size=1 name=qc_shift_id>\n";
echo "$QCshifts_list";
echo "<option selected value=\"$qc_shift_id\">$qc_shift_id - $shiftname_list[$qc_shift_id]</option>\n";
echo "</select>$NWB#vicidial_campaigns-qc_shift_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>QC Get Record Launch: </td><td><select size=1 name=qc_get_record_launch><option>NONE</option><option>SCRIPT</option><option>WEBFORM</option><option>QCSCRIPT</option><option>QCWEBFORM</option><option SELECTED>$qc_get_record_launch</option></select> $NWB#vicidial_campaigns-qc_get_record_launch$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>QC Show Recording: </td><td><select size=1 name=qc_show_recording><option>Y</option><option>N</option><option SELECTED>$qc_show_recording</option></select> $NWB#vicidial_campaigns-qc_show_recording$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=SUBMIT></td></tr>\n";
echo "</table>\n";
echo "<BR></center></FORM><br>\n";
@@ -12648,6 +12735,13 @@ if ($ADD==3111)
$ingroup_recording_override = $row[31];
$ingroup_rec_filename = $row[32];
$afterhours_xfer_group = $row[33];
$qc_enabled = $row[34];
$qc_statuses = $row[35];
$qc_shift_id = $row[36];
$qc_get_record_launch = $row[37];
$qc_show_recording = $row[38];
$qc_web_form_address = $row[39];
$qc_script = $row[40];
##### get in-groups listings for dynamic pulldown
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
@@ -12793,7 +12887,111 @@ if ($ADD==3111)
echo "<tr bgcolor=#B6D3FC><td align=right>In-Group Recording Filename: </td><td align=left><input type=text name=ingroup_rec_filename size=50 maxlength=50 value=\"$ingroup_rec_filename\">$NWB#vicidial_inbound_groups-ingroup_rec_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
echo "</TABLE></center>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2> &nbsp; </td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2> Inbound Group QC Settings: </td></tr>\n";
##### get status listings for dynamic pulldown
$qc_statuses = preg_replace("/^ | -$/","",$qc_statuses);
$QCstatuses = explode(" ", $qc_statuses);
$QCs_to_print = (count($QCstatuses) -0);
$stmt="SELECT * from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status";
$rslt=mysql_query($stmt, $link);
$statuses_to_print = mysql_num_rows($rslt);
$qc_statuses_list='';
$o=0;
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
$p=0;
while ($p < $QCs_to_print)
{
if ($rowx[0] == $QCstatuses[$p])
{
$qc_statuses_list .= " CHECKED";
}
$p++;
}
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
$o++;
}
$stmt="SELECT distinct(status),status_name from vicidial_campaign_statuses order by status";
$rslt=mysql_query($stmt, $link);
$Cstatuses_to_print = mysql_num_rows($rslt);
$o=0;
while ($Cstatuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if (!ereg("\"$rowx[0]\"",$qc_statuses_list))
{
$qc_statuses_list .= "<input type=\"checkbox\" name=\"qc_statuses[]\" value=\"$rowx[0]\"";
$p=0;
while ($p < $QCs_to_print)
{
if ($rowx[0] == $QCstatuses[$p])
{
$qc_statuses_list .= " CHECKED";
}
$p++;
}
$qc_statuses_list .= "> $rowx[0] - $rowx[1]<BR>\n";
}
$o++;
}
##### get scripts listings for pulldown
$stmt="SELECT script_id,script_name from vicidial_scripts order by script_id";
$rslt=mysql_query($stmt, $link);
$scripts_to_print = mysql_num_rows($rslt);
$QCscripts_list="";
$o=0;
while ($scripts_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$QCscripts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$scriptname_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
##### get shifts listings for pulldown
$stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id";
$rslt=mysql_query($stmt, $link);
$shifts_to_print = mysql_num_rows($rslt);
$QCshifts_list="";
$o=0;
while ($shifts_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$QCshifts_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$shiftname_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
echo "<tr bgcolor=#9BB9FB><td align=right>QC Enabled: </td><td><select size=1 name=qc_enabled><option>Y</option><option>N</option><option SELECTED>$qc_enabled</option></select> $NWB#vicidial_inbound_groups-qc_enabled$NWE</td></tr>\n";
echo "<tr bgcolor=#9BB9FB><td align=right>QC Statuses: <BR> $NWB#vicidial_inbound_groups-qc_statuses$NWE</td><td>$qc_statuses_list</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><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_inbound_groups-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_inbound_groups-qc_script$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right><a href=\"$PHP_SELF?ADD=331111111&shift_id=$qc_shift_id\">QC Shift</a>: </td><td align=left><select size=1 name=qc_shift_id>\n";
echo "$QCshifts_list";
echo "<option selected value=\"$qc_shift_id\">$qc_shift_id - $shiftname_list[$qc_shift_id]</option>\n";
echo "</select>$NWB#vicidial_inbound_groups-qc_shift_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>QC Get Record Launch: </td><td><select size=1 name=qc_get_record_launch><option>NONE</option><option>SCRIPT</option><option>WEBFORM</option><option>QCSCRIPT</option><option>QCWEBFORM</option><option SELECTED>$qc_get_record_launch</option></select> $NWB#vicidial_inbound_groups-qc_get_record_launch$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=right>QC Show Recording: </td><td><select size=1 name=qc_show_recording><option>Y</option><option>N</option><option SELECTED>$qc_show_recording</option></select> $NWB#vicidial_inbound_groups-qc_show_recording$NWE</td></tr>\n";
echo "<tr bgcolor=#B9CBFD><td align=center colspan=2><input type=submit name=submit value=SUBMIT></td></tr>\n";
echo "</table>\n";
echo "<BR></center></FORM><br>\n";
### list of agent rank or skill-level for this inbound group
echo "<center>\n";