Added Quick Transfer button to the agent interface, as well as a preset prepopulate option

Added a process to update statuses in the vicidial_list table by batch, with web report

git-svn-id: svn://192.168.202.10@1169 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-06-28 11:36:19 +00:00
parent e2240dbbc7
commit 50a7237235
13 changed files with 1002 additions and 74 deletions
+9
View File
@@ -104,6 +104,15 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
28. Changed the agent alert extension to a filename in in-groups
29. Added process for updating statuses on leads in the vicidial_list table
through a batch process(VICIDIAL_UPDATE_leads_status_file.pl) as well
as a web-based report to show the stats for these transactions
30. Added the option for a Quick Transfer from the agent screen. This option
allows the blind transfer of a call to the default transfer group or one
of the presets with a single button click. Also added a preset populate
feature to pre-populate the Number to Call field with one of the presets
for the campaign.
+534
View File
@@ -0,0 +1,534 @@
#!/usr/bin/perl
#
# VICIDIAL_UPDATE_leads_status_file.pl version 2.2.0
#
# DESCRIPTION:
# script lets you update vicidial_list records from a PIPE-delimited
# file that is in the proper format. (for format see --help)
#
# NOTE: add to DNC feature is not implemented yet
#
# /usr/share/astguiclient/VICIDIAL_UPDATE_leads_status_file.pl --quiet --delete-from-hopper
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# CHANGES
# 90627-1402 - First Build
#
$secX = time();
$MT[0]='';
$Ealert='';
$force_quiet=0;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
$pulldate0 = "$year-$mon-$mday $hour:$min:$sec";
$SQL_date = "$year-$mon-$mday $hour:$min:$sec";
$inSD = $pulldate0;
$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec );
$MT[0]='';
# 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;}
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
$i++;
}
# Customized Variables
$server_ip = $VARserver_ip; # Asterisk server IP
if (!$VDHLOGfile) {$VDHLOGfile = "$PATHlogs/updateleads.$year-$mon-$mday";}
### 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 " [--quiet] = quiet\n";
print " [--test] = test\n";
print " [--debug] = debug output\n";
print " [--delete-from-hopper] = delete lead from hopper if present\n";
print " [--format=standard] = ability to define a format, standard is default, formats allowed shown in examples\n";
print " [--ftp-pull] = grabs lead files from a remote FTP server, uses REPORTS FTP login information\n";
print " [--ftp-dir=leads_in] = remote FTP server directory to grab files from, should have a DONE sub-directory\n";
print " [--email-list=test@test.com:test2@test.com] = send email results for each file to these addresses\n";
print " [--email-sender=vicidial@localhost] = sender for the email results\n";
print " [--help] = this help screen\n\n";
print "\n";
print "This script takes in files in the following order when they are placed in the $PATHhome/UPDATE_IN directory to be imported into the vicidial_list table (examples):\n\n";
print "standard:\n";
print "vendor_lead_code|new_status|DNC_this_lead\n\n";
print "leadid:\n";
print "lead_id|new_status|DNC_this_lead\n\n";
exit;
}
else
{
if ($args =~ /-quiet/i)
{
$q=1;
$DB=0;
$DBX=0;
$force_quiet=1;
}
if ( ($args =~ /-debug/i) && ($force_quiet < 1) )
{
$DB=1;
print "\n----- DEBUGGING -----\n\n";
}
if ( ($args =~ /-debugX/i) && ($force_quiet < 1) )
{
$DBX=1;
print "\n----- SUPER-DUPER DEBUGGING -----\n\n";
}
else {$DBX=0;}
if ($args =~ /--delete-from-hopper/)
{
$delete_from_hopper=1;
if ($q < 1) {print "\n----- DELETE FROM HOPPER -----\n\n";}
}
else {$DBX=0;}
if ($args =~ /-format=/i)
{
@data_in = split(/-format=/,$args);
$format = $data_in[1];
$format =~ s/ .*//gi;
if ($q < 1) {print "\n----- FORMAT OVERRIDE: $format -----\n\n";}
}
else
{$format = 'standard';}
if ($args =~ /-test/i)
{
$T=1;
$TEST=1;
if ($q < 1) {print "\n----- TESTING -----\n\n";}
}
if ($args =~ /-ftp-pull/i)
{
$ftp_pull=1;
if ($q < 1) {print "\n----- FTP LEAD FILE PULL -----\n\n";}
}
if ($args =~ /--ftp-dir=/i)
{
@data_in = split(/--ftp-dir=/,$args);
$ftp_dir = $data_in[1];
$ftp_dir =~ s/ .*//gi;
if ($q < 1) {print "\n----- REMOTE FTP DIRECTORY: $ftp_dir -----\n\n";}
}
else
{$ftp_dir = '';}
if ($args =~ /--email-list=/i)
{
@data_in = split(/--email-list=/,$args);
$email_list = $data_in[1];
$email_list =~ s/ .*//gi;
$email_list =~ s/:/,/gi;
if ($q < 1) {print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n";}
}
else
{$email_list = '';}
if ($args =~ /--email-sender=/i)
{
@data_in = split(/--email-sender=/,$args);
$email_sender = $data_in[1];
$email_sender =~ s/ .*//gi;
$email_sender =~ s/:/,/gi;
if ($q < 1) {print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n";}
}
else
{$email_sender = 'vicidial@localhost';}
}
}
else
{
print "no command line options set\n";
$args = "";
$i=0;
$forcelistid = '';
$format='standard';
}
### end parsing run-time options ###
if ($q < 1)
{
print "\n\n\n\n\n\n\n\n\n\n\n\n-- VICIDIAL_UPDATE_leads_status_file.pl --\n\n";
print "This program is designed to take a pipe delimited file and update vicidial_list entries in the VICIDIAL system. \n\n";
}
$i=0;
$US = '_';
$phone_list = '|';
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;
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmtA = "SELECT use_non_latin 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]";
}
$sthA->finish();
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");}
$suf = '.txt';
$people_packages_id_update='';
$dir1 = "$PATHhome/UPDATE_IN";
$dir2 = "$PATHhome/UPDATE_IN/DONE";
if($DBX){print STDERR "\nUPDATE_IN directory: |$dir1|\n";}
if ($ftp_pull > 0)
{
$i=0;
use Net::FTP;
$files_copied_count=0;
$ftp = Net::FTP->new("$VARREPORT_host", Port => "$VARREPORT_port", Debug => "$DBX", Passive => 1)
or die "Can't connect: $@\n";
$ftp->login("$VARREPORT_user","$VARREPORT_pass") or die "Cannot log in /: $!";
@FILES = $ftp->dir("$ftp_dir")
or die "Can't get a list of files in $ftp_dir: $!";
foreach(@FILES)
{
if ($DBX > 0) {print "$FILES[$i]\n";}
if ($FILES[$i] !~ /^d/i)
{
chomp($FILES[$i]);
@FILEDETAILS = split(/ \d\d:\d\d /, $FILES[$i]);
$FILES[$i] = "$FILEDETAILS[1]";
$FILES[$i] =~ s/ *$//gi;
if (length($FILES[$i]) > 4)
{
$GOODfname = $FILES[$i];
$FILES[$i] =~ s/ /_/gi;
$FILES[$i] =~ s/\(|\)|\||\\|\/|\'|\"|//gi;
$ftp->rename("$ftp_dir/$GOODfname","$ftp_dir/$FILES[$i]");
$FILEname = $FILES[$i];
$ftp->get("$ftp_dir/$FILES[$i]", "$dir1/$FILES[$i]");
if (!$TEST) {$ftp->rename("$ftp_dir/$FILES[$i]", "$ftp_dir/DONE/$FILES[$i]");}
if ($DB > 0) {print "FTP FILE COPIED: $FILES[$i]\n";}
$files_copied_count++;
}
}
$i++;
}
if (!$q) {print "$ftp_dir - $VARREPORT_host - $#FILES - $files_copied_count\n";}
}
$i=0;
@FILES=@MT;
opendir(FILE, "$dir1/");
@FILES = readdir(FILE);
foreach(@FILES)
{
$size1 = 0;
$size2 = 0;
$person_id_delete = '';
$transaction_id_delete = '';
if (length($FILES[$i]) > 4)
{
$size1 = (-s "$dir1/$FILES[$i]");
if (!$q) {print "$FILES[$i] $size1\n";}
sleep(2);
$size2 = (-s "$dir1/$FILES[$i]");
if (!$q) {print "$FILES[$i] $size2\n\n";}
if ( ($FILES[$i] !~ /^TRANSFERRED/i) && ($size1 eq $size2) && (length($FILES[$i]) > 4))
{
$GOODfname = $FILES[$i];
$FILES[$i] =~ s/ /_/gi;
$FILES[$i] =~ s/\(|\)|\||\\|\/|\'|\"|//gi;
rename("$dir1/$GOODfname","$dir1/$FILES[$i]");
$FILEname = $FILES[$i];
`cp -f $dir1/$FILES[$i] $dir2/$source$FILES[$i]`;
### open the in file for reading ###
open(infile, "$dir2/$source$FILES[$i]")
|| die "Can't open $source$FILES[$i]: $!\n";
$a=0; ### each line of input file counter ###
$b=0; ### status of 'UPDATED' counter ###
$c=0; ### status of 'NOT_UPDATED' counter ###
$d=0; ### status of 'NOT_FOUND' counter ###
$multi_insert_counter=0;
$multistmt='';
#if ($DB)
while (<infile>)
{
@m=@MT;
# print "$a| $number\n";
$number = $_;
chomp($number);
# $number =~ s/,/\|/gi;
$number =~ s/\t/\|/gi;
$number =~ s/\'|\t|\r|\n|\l//gi;
$number =~ s/\'|\t|\r|\n|\l//gi;
$number =~ s/\",,,,,,,\"/\|\|\|\|\|\|\|/gi;
$number =~ s/\",,,,,,\"/\|\|\|\|\|\|/gi;
$number =~ s/\",,,,,\"/\|\|\|\|\|/gi;
$number =~ s/\",,,,\"/\|\|\|\|/gi;
$number =~ s/\",,,\"/\|\|\|/gi;
$number =~ s/\",,\"/\|\|/gi;
$number =~ s/\",\"/\|/gi;
$number =~ s/\"//gi;
@m = split(/\|/, $number);
$format_set=0;
# This is the format for the leadid update files
# lead_id|new_status|add_to_DNC
# "32124","HOLD","N"
if ( ($format =~ /leadid/) && ($format_set < 1) )
{
@name=@MT;
$vendor_lead_code = '';
$lead_id = $m[0];
$status = $m[1];
$add_to_dnc = $m[2];
$lookupSQL = "lead_id='$lead_id'";
$format_set++;
}
# This is the format for the standard update files
# vendor_lead_code|new_status|add_to_DNC
# 321654987,HOLD,N
if ($format_set < 1)
{
$vendor_lead_code = $m[0];
$lead_id = '';
$status = $m[1];
$add_to_dnc = $m[2];
$lookupSQL = "vendor_lead_code='$vendor_lead_code'";
}
if ($DBX) {print "$a|$vendor_lead_code|$lead_id|$status|$add_to_dnc\n";}
$lead_found=0;
$stmtA = "SELECT lead_id,vendor_lead_code,status,phone_number from vicidial_list where $lookupSQL;";
if($DBX){print STDERR "\n|$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;
$lead_id = $aryA[0];
$vendor_lead_code = $aryA[1];
$old_status = $aryA[2];
$phone_number = $aryA[3];
$lead_found++;
}
$sthA->finish();
if ($lead_found > 0)
{
$stmtZ = "UPDATE vicidial_list SET status='$status' where $lookupSQL;";
if (!$T) {$Uaffected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
if ($Uaffected_rows > 0)
{$result = 'UPDATED'; $b++;}
else
{$result = 'NO_UPDATE'; $c++;}
if ($delete_from_hopper > 0)
{
$stmtZ = "DELETE from vicidial_hopper where lead_id='$lead_id';";
if (!$T) {$Uaffected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
}
}
else
{$result = 'NOT_FOUND'; $d++;}
# CREATE TABLE vicidial_list_update_log (
# event_date DATETIME,
# lead_id INT(9) UNSIGNED,
# vendor_id VARCHAR(20),
# phone_number VARCHAR(20),
# status VARCHAR(6),
# old_status VARCHAR(6),
# filename VARCHAR(255) default '',
# result VARCHAR(20),
# result_rows SMALLINT(3) UNSIGNED default '0',
# index (event_date)
# );
$stmtZ = "INSERT INTO vicidial_list_update_log SET event_date='$SQL_date',lead_id='$lead_id',vendor_id='$vendor_lead_code',phone_number='$phone_number',status='$status',old_status='$old_status',filename='$FILEname',result='$result',result_rows='$Uaffected_rows';";
if (!$T) {$affected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
# $alt_phone_id = $dbhA->{'mysql_insertid'};
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
$a++;
if ($q < 1)
{
if ($a =~ /100$/i) {print STDERR "0 $a\r";}
if ($a =~ /200$/i) {print STDERR "+ $a\r";}
if ($a =~ /300$/i) {print STDERR "| $a\r";}
if ($a =~ /400$/i) {print STDERR "\\ $a\r";}
if ($a =~ /500$/i) {print STDERR "- $a\r";}
if ($a =~ /600$/i) {print STDERR "/ $a\r";}
if ($a =~ /700$/i) {print STDERR "| $a\r";}
if ($a =~ /800$/i) {print STDERR "+ $a\r";}
if ($a =~ /900$/i) {print STDERR "0 $a\r";}
if ($a =~ /000$/i) {print "$a|$b|$c|$d|$phone_number|\n";}
}
}
### open the stats out file for writing ###
open(Sout, ">>$VDHLOGfile")
|| die "Can't open $VDHLOGfile: $!\n";
### close file handler and DB connections ###
$Falert = "\n\nTOTALS FOR $FILEname:\n";
$Falert .= "Lines in update file: $a\n";
$Falert .= "UPDATED: $b\n";
$Falert .= "NOT UPDATED: $c\n";
$Falert .= "NOT FOUND: $d\n";
if ($q < 1) {print "$Falert";}
print Sout "$Falert";
$Ealert .= "$Falert";
close(infile);
close(Sout);
chmod 0777, "$VDHLOGfile";
### Move file to the DONE directory locally
if (!$T) {`mv -f $dir1/$FILEname $dir2/$FILEname`;}
}
}
$i++;
}
$dbhA->disconnect();
### calculate time to run script ###
$secY = time();
$secZ = ($secY - $secX);
$secZm = ($secZ /60);
if ($q < 1)
{
print "script execution time in seconds: $secZ minutes: $secZm\n";
}
###### EMAIL SECTION
if ( (length($Ealert)>5) && (length($email_list) > 3) )
{
if ($q < 1) {print "Sending email: $email_list\n";}
use MIME::QuotedPrint;
use MIME::Base64;
use Mail::Sendmail;
$mailsubject = "VICIDIAL LEAD UPDATE LOAD $pulldate0";
%mail = ( To => "$email_list",
From => "$email_sender",
Subject => "$mailsubject",
Message => "VICIDIAL LEAD UPDATE LOAD $pulldate0\n\n$Ealert\n"
);
sendmail(%mail) or die $mail::Sendmail::error;
if ($q < 1) {print "ok. log says:\n", $mail::sendmail::log;} ### print mail log for status
}
exit;
+17 -2
View File
@@ -651,7 +651,9 @@ survey_fourth_digit VARCHAR(1) default '',
survey_fourth_audio_file VARCHAR(50) default 'US_thanks_no_contact',
survey_fourth_status VARCHAR(6) default 'NI',
survey_fourth_exten VARCHAR(20) default '8300',
drop_lockout_time VARCHAR(6) default '0'
drop_lockout_time VARCHAR(6) default '0',
quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2') default 'N',
prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2') default 'N'
);
CREATE TABLE vicidial_lists (
@@ -1551,6 +1553,19 @@ dial_time SMALLINT(2) UNSIGNED default '0',
index (call_date)
);
CREATE TABLE vicidial_list_update_log (
event_date DATETIME,
lead_id INT(9) UNSIGNED,
vendor_id VARCHAR(20),
phone_number VARCHAR(20),
status VARCHAR(6),
old_status VARCHAR(6),
filename VARCHAR(255) default '',
result VARCHAR(20),
result_rows SMALLINT(3) UNSIGNED default '0',
index (event_date)
);
ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP;
@@ -1659,7 +1674,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1157';
UPDATE system_settings SET db_schema_version='1158';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+14
View File
@@ -0,0 +1,14 @@
100001|NOCALL
100002|NEW
100003|DC
100004|NOCALL
100005|NEW
100006|NEW
100007|NEW
100008|NEW
100009|NEW
100010|NOCALL
100011|NEW
100012|NOCALL
100013|NEW
100014|NEW
+18
View File
@@ -218,3 +218,21 @@ ALTER TABLE vicidial_inbound_groups ADD no_agent_action_value VARCHAR(255) defau
ALTER TABLE vicidial_closer_log MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE') default 'NONE';
UPDATE system_settings SET db_schema_version='1157';
CREATE TABLE vicidial_list_update_log (
event_date DATETIME,
lead_id INT(9) UNSIGNED,
vendor_id VARCHAR(20),
phone_number VARCHAR(20),
status VARCHAR(6),
old_status VARCHAR(6),
filename VARCHAR(255) default '',
result VARCHAR(20),
result_rows SMALLINT(3) UNSIGNED default '0',
index (event_date)
);
ALTER TABLE vicidial_campaigns ADD quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2') default 'N';
ALTER TABLE vicidial_campaigns ADD prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2') default 'N';
UPDATE system_settings SET db_schema_version='1158';
+5
View File
@@ -2159,6 +2159,11 @@ if ($WEBONLY < 1)
`mkdir -p $PATHhome/VTIGER_IN/DONE`;
`chmod -R 0766 $PATHhome/VTIGER_IN`;
}
if (!-e "$PATHhome/UPDATE_IN/DONE")
{
`mkdir -p $PATHhome/UPDATE_IN/DONE`;
`chmod -R 0766 $PATHhome/UPDATE_IN`;
}
print "Creating $PATHmonitor directories...\n";
if (!-e "$PATHmonitor")
@@ -186,6 +186,10 @@ No Agent No Queue Action||
If No Agent No Queue is enabled, then this field defines where the call will go if there are no agents in the In-Group. Default is MESSAGE, this plays the sound files in the Action Value field and then hangs up||
No Agent No Queue Action Value||
This is the value for the Action above. Default is||
Quick Transfer Button||
This option will add a Quick Transfer button to the agent screen below the Transfer-Conf button that will allow one click blind transferring of calls to the selected In-Group or number. IN_GROUP will send calls to the Default Xfer Group for this Campaign, or In-Group if there was an inbound call. The PRESET options will send the calls to the preset selected. Default is N for disabled||
PrePopulate Transfer Preset||
This option will fill in the Number to Dial field in the Transfer Conference frame of the agent screen if defined. Default is N for disabled||
add-file: user_territories.php
@@ -196,6 +200,7 @@ add-file: AST_agent_timeclock_detail.php
############################################################ CLIENT
You are not allowed to dial into other agent sessions||
QUICK TRANSFER||
############################################################ MANAGER Manual
Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

+148 -64
View File
@@ -233,10 +233,11 @@
# 90529-0741 - Added nophone agent phone login that will not show any empty session alerts
# 90531-0635 - Added option to hide customer phone number
# 90611-1422 - Fixed multiple logging bugs
# 90628-0655 - Added Quick Transfer button and Preset Prepopulate option
#
$version = '2.2.0-211';
$build = '90611-1422';
$version = '2.2.0-212';
$build = '90628-0655';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61;
$one_mysql_log=0;
@@ -1044,56 +1045,73 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the campaign settings
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,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,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,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,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$park_ext = $row[0];
$park_file_name = $row[1];
$web_form_address = stripslashes($row[2]);
$allow_closers = $row[3];
$auto_dial_level = $row[4];
$dial_timeout = $row[5];
$dial_prefix = $row[6];
$campaign_cid = $row[7];
$campaign_vdad_exten = $row[8];
$campaign_rec_exten = $row[9];
$campaign_recording = $row[10];
$campaign_rec_filename = $row[11];
$campaign_script = $row[12];
$get_call_launch = $row[13];
$campaign_am_message_exten = $row[14];
$xferconf_a_dtmf = $row[15];
$xferconf_a_number = $row[16];
$xferconf_b_dtmf = $row[17];
$xferconf_b_number = $row[18];
$alt_number_dialing = $row[19];
$VC_scheduled_callbacks = $row[20];
$wrapup_seconds = $row[21];
$wrapup_message = $row[22];
$closer_campaigns = $row[23];
$use_internal_dnc = $row[24];
$allcalls_delay = $row[25];
$omit_phone_code = $row[26];
$agent_pause_codes_active = $row[27];
$no_hopper_leads_logins = $row[28];
$campaign_allow_inbound = $row[29];
$manual_dial_list_id = $row[30];
$default_xfer_group = $row[31];
$xfer_groups = $row[32];
$disable_alter_custphone = $row[33];
$display_queue_count = $row[34];
$manual_dial_filter = $row[35];
$CopY_tO_ClipboarD = $row[36];
$use_campaign_dnc = $row[37];
$three_way_call_cid = $row[38];
$dial_method = $row[39];
$three_way_dial_prefix = $row[40];
$web_form_target = $row[41];
$vtiger_screen_login = $row[42];
$agent_allow_group_alias = $row[43];
$default_group_alias = $row[44];
$park_ext = $row[0];
$park_file_name = $row[1];
$web_form_address = stripslashes($row[2]);
$allow_closers = $row[3];
$auto_dial_level = $row[4];
$dial_timeout = $row[5];
$dial_prefix = $row[6];
$campaign_cid = $row[7];
$campaign_vdad_exten = $row[8];
$campaign_rec_exten = $row[9];
$campaign_recording = $row[10];
$campaign_rec_filename = $row[11];
$campaign_script = $row[12];
$get_call_launch = $row[13];
$campaign_am_message_exten = $row[14];
$xferconf_a_dtmf = $row[15];
$xferconf_a_number = $row[16];
$xferconf_b_dtmf = $row[17];
$xferconf_b_number = $row[18];
$alt_number_dialing = $row[19];
$VC_scheduled_callbacks = $row[20];
$wrapup_seconds = $row[21];
$wrapup_message = $row[22];
$closer_campaigns = $row[23];
$use_internal_dnc = $row[24];
$allcalls_delay = $row[25];
$omit_phone_code = $row[26];
$agent_pause_codes_active = $row[27];
$no_hopper_leads_logins = $row[28];
$campaign_allow_inbound = $row[29];
$manual_dial_list_id = $row[30];
$default_xfer_group = $row[31];
$xfer_groups = $row[32];
$disable_alter_custphone = $row[33];
$display_queue_count = $row[34];
$manual_dial_filter = $row[35];
$CopY_tO_ClipboarD = $row[36];
$use_campaign_dnc = $row[37];
$three_way_call_cid = $row[38];
$dial_method = $row[39];
$three_way_dial_prefix = $row[40];
$web_form_target = $row[41];
$vtiger_screen_login = $row[42];
$agent_allow_group_alias = $row[43];
$default_group_alias = $row[44];
$quick_transfer_button = $row[45];
$prepopulate_transfer_preset = $row[46];
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PRESET_1|PRESET_2/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
}
$default_group_alias_cid='';
if (strlen($default_group_alias)>1)
@@ -2409,6 +2427,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var alert_enabled = '<?php echo $VU_alert_enabled ?>';
var shift_logout_flag = 0;
var vtiger_callback_id = 0;
var quick_transfer_button = '<?php echo $quick_transfer_button ?>';
var quick_transfer_button_enabled = '<?php echo $quick_transfer_button_enabled ?>';
var prepopulate_transfer_preset = '<?php echo $prepopulate_transfer_preset ?>';
var prepopulate_transfer_preset_enabled = '<?php echo $prepopulate_transfer_preset_enabled ?>';
var no_empty_session_warnings = '<?php echo $no_empty_session_warnings ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -4187,6 +4209,33 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("VolumeUpSpan").innerHTML = "<a href=\"#\" onclick=\"volume_control('UP','" + MDchannel + "','');return false;\"><IMG SRC=\"./images/vdc_volume_up.gif\" BORDER=0></a>";
document.getElementById("VolumeDownSpan").innerHTML = "<a href=\"#\" onclick=\"volume_control('DOWN','" + MDchannel + "','');return false;\"><IMG SRC=\"./images/vdc_volume_down.gif\" BORDER=0></a>";
if (quick_transfer_button == 'IN_GROUP')
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
}
// Build transfer pull-down list
var loop_ct = 0;
var live_XfeR_HTML = '';
var XfeR_SelecT = '';
while (loop_ct < XFgroupCOUNT)
{
if (VARxfergroups[loop_ct] == LIVE_default_xfer_group)
{XfeR_SelecT = 'SELECTED ';}
else {XfeR_SelecT = '';}
live_XfeR_HTML = live_XfeR_HTML + "<option " + XfeR_SelecT + "value=\"" + VARxfergroups[loop_ct] + "\">" + VARxfergroups[loop_ct] + " - " + VARxfergroupsnames[loop_ct] + "</option>\n";
loop_ct++;
}
document.getElementById("XfeRGrouPLisT").innerHTML = "<select size=1 name=XfeRGrouP class=\"cust_form\" id=XfeRGrouP>" + live_XfeR_HTML + "</select>";
// INSERT VICIDIAL_LOG ENTRY FOR THIS CALL PROCESS
DialLog("start");
@@ -5271,11 +5320,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DialBlindVMail").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRVMAIL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_XB_ammessage.gif\" border=0 alt=\"Blind Transfer VMail Message\"></a>";
if (quick_transfer_button == 'IN_GROUP')
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
}
// Build transfer pull-down list
var loop_ct = 0;
var live_XfeR_HTML = '';
var XfeR_SelecT = '';
while (loop_ct < XFgroupCOUNT)
{
if (VARxfergroups[loop_ct] == LIVE_default_xfer_group)
{XfeR_SelecT = 'SELECTED ';}
else {XfeR_SelecT = '';}
live_XfeR_HTML = live_XfeR_HTML + "<option " + XfeR_SelecT + "value=\"" + VARxfergroups[loop_ct] + "\">" + VARxfergroups[loop_ct] + " - " + VARxfergroupsnames[loop_ct] + "</option>\n";
loop_ct++;
}
document.getElementById("XfeRGrouPLisT").innerHTML = "<select size=1 name=XfeRGrouP class=\"cust_form\" id=XfeRGrouP>" + live_XfeR_HTML + "</select>";
if (lastcustserverip == server_ip)
{
{
document.getElementById("VolumeUpSpan").innerHTML = "<a href=\"#\" onclick=\"volume_control('UP','" + lastcustchannel + "','');return false;\"><IMG SRC=\"./images/vdc_volume_up.gif\" BORDER=0></a>";
document.getElementById("VolumeDownSpan").innerHTML = "<a href=\"#\" onclick=\"volume_control('DOWN','" + lastcustchannel + "','');return false;\"><IMG SRC=\"./images/vdc_volume_down.gif\" BORDER=0></a>";
}
}
if (dial_method == "INBOUND_MAN")
{
@@ -5715,6 +5792,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("VolumeUpSpan").innerHTML = "<IMG SRC=\"./images/vdc_volume_up_off.gif\" BORDER=0>";
document.getElementById("VolumeDownSpan").innerHTML = "<IMG SRC=\"./images/vdc_volume_down_off.gif\" BORDER=0>";
if (quick_transfer_button_enabled > 0)
{document.getElementById("QuickXfer").innerHTML = "<IMG SRC=\"./images/vdc_LB_quickxfer_OFF.gif\" border=0 alt=\"QUICK TRANSFER\">";}
document.vicidial_form.custdatetime.value = '';
if (auto_dial_level == 0)
@@ -7916,19 +7996,8 @@ else
HKbutton_allowed = 0;
showDiv('TransferMain');
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('OFF','YES');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>";
var loop_ct = 0;
var live_XfeR_HTML = '';
var XfeR_SelecT = '';
while (loop_ct < XFgroupCOUNT)
{
if (VARxfergroups[loop_ct] == LIVE_default_xfer_group)
{XfeR_SelecT = 'SELECTED ';}
else {XfeR_SelecT = '';}
live_XfeR_HTML = live_XfeR_HTML + "<option " + XfeR_SelecT + "value=\"" + VARxfergroups[loop_ct] + "\">" + VARxfergroups[loop_ct] + " - " + VARxfergroupsnames[loop_ct] + "</option>\n";
loop_ct++;
}
document.getElementById("XfeRGrouPLisT").innerHTML = "<select size=1 name=XfeRGrouP class=\"cust_form\" id=XfeRGrouP>" + live_XfeR_HTML + "</select>";
if (quick_transfer_button_enabled > 0)
{document.getElementById("QuickXfer").innerHTML = "<IMG SRC=\"./images/vdc_LB_quickxfer_OFF.gif\" border=0 alt=\"QUICK TRANSFER\">";}
}
else
{
@@ -7937,6 +8006,15 @@ else
if (showoffvar == 'YES')
{
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON');\"><IMG SRC=\"./images/vdc_LB_transferconf.gif\" border=0 alt=\"Transfer - Conference\"></a>";
if (quick_transfer_button == 'IN_GROUP')
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
}
}
if (three_way_call_cid == 'AGENT_CHOOSE')
@@ -8195,7 +8273,7 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<BR>
<IMG SRC="./images/vdc_XB_number.gif" border=0 alt="Number to call"> <input type=text size=15 name=xfernumber maxlength=25 class="cust_form"> &nbsp;
<IMG SRC="./images/vdc_XB_number.gif" border=0 alt="Number to call"> <input type=text size=15 name=xfernumber maxlength=25 class="cust_form" value="<?php echo $preset_populate ?>"> &nbsp;
<input type=hidden name=xferuniqueid>
<input type=checkbox name=xferoverride size=1 value="0"><font class="body_tiny"> DIAL OVERRIDE</font> &nbsp;
<span STYLE="background-color: #CCCCCC" id="Leave3WayCall"><a href="#" onclick="leave_3way_call('FIRST');return false;"><IMG SRC="./images/vdc_XB_leave3waycall.gif" border=0 alt="LEAVE 3-WAY CALL"></a></span>
@@ -8515,6 +8593,12 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<span id="SpacerSpanB"><IMG SRC="./images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #CCCCCC" id="ParkControl"><IMG SRC="./images/vdc_LB_parkcall_OFF.gif" border=0 alt="Park Call"></span><BR>
<span STYLE="background-color: #CCCCCC" id="XferControl"><IMG SRC="./images/vdc_LB_transferconf_OFF.gif" border=0 alt="Transfer - Conference"></span><BR>
<?php
if ($quick_transfer_button_enabled > 0)
{echo "<span STYLE=\"background-color: #CCCCCC\" id=\"QuickXfer\"><IMG SRC=\"./images/vdc_LB_quickxfer_OFF.gif\" border=0 alt=\"Quick Transfer\"></span><BR>\n";}
?>
<span id="SpacerSpanC"><IMG SRC="./images/blank.gif" width=145 height=16 border=0></span><BR>
<span STYLE="background-color: #FFCCFF" id="HangupControl"><IMG SRC="./images/vdc_LB_hangupcustomer_OFF.gif" border=0 alt="Hangup Customer"></span><BR>
<span id="SpacerSpanD"><IMG SRC="./images/blank.gif" width=145 height=16 border=0></span><BR>
+199
View File
@@ -0,0 +1,199 @@
<?php
# AST_LIST_UPDATEstats.php
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
#
# 90627-2055 - First build
#
require("dbconnect.php");
require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
if (strlen($shift)<2) {$shift='ALL';}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
$i=0;
while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$i++;
}
##### END SETTINGS LOOKUP #####
###########################################
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 7 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
exit;
}
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
if (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = "$NOW_DATE 00:00:00";}
if (!isset($end_date)) {$end_date = "$NOW_DATE 23:59:59";}
?>
<HTML>
<HEAD>
<STYLE type="text/css">
<!--
.green {color: black; background-color: #99FF99}
.red {color: black; background-color: #FF9999}
.orange {color: black; background-color: #FFCC99}
-->
</STYLE>
<?php
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo "<TITLE>List Update Process Report</TITLE></HEAD><BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
$short_header=1;
require("admin_header.php");
if ($DB > 0)
{
echo "<BR>\n";
echo "$query_date|$end_date\n";
echo "<BR>\n";
}
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
echo "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=2><TR><TD align=center valign=top>\n";
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=20 MAXLENGTH=20 VALUE=\"$query_date\">\n";
echo "<BR> to <BR><INPUT TYPE=TEXT NAME=end_date SIZE=20 MAXLENGTH=20 VALUE=\"$end_date\">\n";
echo "</TD><TD align=center valign=top>\n";
echo "</TD><TD align=center valign=top>\n";
echo "</TD><TD align=center valign=top>\n";
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
echo "<INPUT TYPE=submit NAME=SUBMIT VALUE=SUBMIT>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href=\"./admin.php?ADD=999999\">REPORTS</a> </FONT>\n";
echo "</TD></TR></TABLE>\n";
echo "</FORM>\n";
echo "<PRE><FONT SIZE=2>";
if (!$query_date)
{
echo "\n\n";
echo "PLEASE SELECT A DATE RANGE ABOVE AND CLICK SUBMIT\n";
}
else
{
echo "List Update Process Report $NOW_TIME\n";
echo "\n";
echo "Time range $query_date to $end_date\n\n";
### GRAB ALL RECORDS WITHIN RANGE FROM THE DATABASE ###
echo "List Update Summary:\n";
echo "+----------------------------------------------------+------------+----------+----------+\n";
echo "| FILENAME | RESULT | RECORDS | UPDATES |\n";
echo "+----------------------------------------------------+------------+----------+----------+\n";
$stmt="SELECT count(*),filename,result,sum(result_rows) from vicidial_list_update_log where event_date >= '$query_date' and event_date <= '$end_date' group by filename,result order by filename,result;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$records_to_grab = mysql_num_rows($rslt);
$i=0;
while ($i < $records_to_grab)
{
$row=mysql_fetch_row($rslt);
$TOTcount = ($TOTcount + $row[0]);
$TOTupdated = ($TOTupdated + $row[3]);
$count = sprintf("%-8s", $row[0]);
$filename = sprintf("%-50s", trim($row[1]));
$result = sprintf("%-10s", $row[2]);
$updated = sprintf("%-8s", $row[3]);
echo "| $filename | $result | $count | $updated |\n";
$i++;
}
$TOTcount = sprintf("%-8s", $TOTcount);
$TOTupdated = sprintf("%-8s", $TOTupdated);
echo "+----------------------------------------------------+------------+----------+----------+\n";
echo " | $TOTcount | $TOTupdated |\n";
echo " +----------+----------+\n";
echo "\n</PRE>\n";
### GRAB ALL RECORDS WITHIN RANGE FROM THE DATABASE ###
echo "List Update Detail:<BR>\n";
echo "<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=1>\n";
echo "<TR><TD><B>DATE/TIME</B></TD><TD><B>LEAD_ID</B></TD><TD><B>VENDOR_ID</B></TD><TD><B>PHONE</B></TD><TD><B>STATUS</B></TD><TD><B>OLD_STATUS</B></TD><TD><B>FILENAME</B></TD><TD><B>RESULT</B></TD><TD><B>UPDATED_ROWS</B></TD>\n";
echo "</TR>\n";
$stmt="SELECT event_date,lead_id,vendor_id,phone_number,status,old_status,filename,result,result_rows from vicidial_list_update_log where event_date >= '$query_date' and event_date <= '$end_date' order by event_date,filename;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$records_to_grab = mysql_num_rows($rslt);
$i=0;
while ($i < $records_to_grab)
{
$row=mysql_fetch_row($rslt);
$row[6] = trim($row[6]);
echo "<TR><TD>$row[0]</TD><TD>$row[1]</TD><TD>$row[2]</TD><TD>$row[3]</TD><TD>$row[4]</TD><TD>$row[5]</TD><TD>$row[6]</TD><TD>$row[7]</TD><TD>$row[8]</TD></TR>\n";
$i++;
}
$ENDtime = date("U");
$RUNtime = ($ENDtime - $STARTtime);
echo "</TABLE><BR>\nRun Time: $RUNtime seconds\n";
}
?>
</TD></TR></TABLE>
</BODY></HTML>
+35 -5
View File
@@ -1050,6 +1050,10 @@ if (isset($_GET["no_agent_action"])) {$no_agent_action=$_GET["no_agent_action
elseif (isset($_POST["no_agent_action"])) {$no_agent_action=$_POST["no_agent_action"];}
if (isset($_GET["no_agent_action_value"])) {$no_agent_action_value=$_GET["no_agent_action_value"];}
elseif (isset($_POST["no_agent_action_value"])) {$no_agent_action_value=$_POST["no_agent_action_value"];}
if (isset($_GET["quick_transfer_button"])) {$quick_transfer_button=$_GET["quick_transfer_button"];}
elseif (isset($_POST["quick_transfer_button"])) {$quick_transfer_button=$_POST["quick_transfer_button"];}
if (isset($_GET["prepopulate_transfer_preset"])) {$prepopulate_transfer_preset=$_GET["prepopulate_transfer_preset"];}
elseif (isset($_POST["prepopulate_transfer_preset"])) {$prepopulate_transfer_preset=$_POST["prepopulate_transfer_preset"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
@@ -1480,7 +1484,8 @@ if ($non_latin < 1)
$tracking_group = ereg_replace("[^-_0-9a-zA-Z]","",$tracking_group);
$no_agent_no_queue = ereg_replace("[^-_0-9a-zA-Z]","",$no_agent_no_queue);
$no_agent_action = ereg_replace("[^-_0-9a-zA-Z]","",$no_agent_action);
$quick_transfer_button = ereg_replace("[^-_0-9a-zA-Z]","",$quick_transfer_button);
$prepopulate_transfer_preset = ereg_replace("[^-_0-9a-zA-Z]","",$prepopulate_transfer_preset);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -1832,11 +1837,12 @@ else
# 90621-0821 - Added phon Conf File Secret field to use a separate password from the user interface for a phone
# 90621-1220 - Added Call Menu logging tracking_group
# 90627-0547 - Added no-agent-no-queue options
# 90627-2333 - Added default transfer button and prepopulate preset options
#
# 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.2.0-200';
$build = '90627-0547';
$admin_version = '2.2.0-201';
$build = '90627-2333';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -3516,6 +3522,16 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<B>Xfer-Conf DTMF -</B> These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field.
<BR>
<A NAME="vicidial_campaigns-quick_transfer_button">
<BR>
<B>Quick Transfer Button -</B> This option will add a Quick Transfer button to the agent screen below the Transfer-Conf button that will allow one click blind transferring of calls to the selected In-Group or number. IN_GROUP will send calls to the Default Xfer Group for this Campaign, or In-Group if there was an inbound call. The PRESET options will send the calls to the preset selected. Default is N for disabled.
<BR>
<A NAME="vicidial_campaigns-prepopulate_transfer_preset">
<BR>
<B>PrePopulate Transfer Preset -</B> This option will fill in the Number to Dial field in the Transfer Conference frame of the agent screen if defined. Default is N for disabled.
<BR>
<A NAME="vicidial_campaigns-scheduled_callbacks">
<BR>
@@ -7915,7 +7931,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,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,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time) 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,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time 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,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset) 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,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset 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');";
@@ -10362,7 +10378,7 @@ if ($ADD==41)
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
{$hopper_level='100';}
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time' where campaign_id='$campaign_id';";
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -14550,6 +14566,8 @@ if ($ADD==31)
$survey_fourth_status = $row[114];
$survey_fourth_exten = $row[115];
$drop_lockout_time = $row[116];
$quick_transfer_button = $row[117];
$prepopulate_transfer_preset = $row[118];
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -15088,6 +15106,10 @@ if ($ADD==31)
echo "<tr bgcolor=#B6D3FC><td align=right>Transfer-Conf Number 2: </td><td align=left><input type=text name=xferconf_b_number size=20 maxlength=50 value=\"$xferconf_b_number\">$NWB#vicidial_campaigns-xferconf_a_dtmf$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Quick Transfer Button: </td><td align=left><select size=1 name=quick_transfer_button><option>N</option><option>IN_GROUP</option><option>PRESET_1</option><option>PRESET_2</option><option SELECTED>$quick_transfer_button</option></select>$NWB#vicidial_campaigns-quick_transfer_button$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>PrePopulate Transfer Preset: </td><td align=left><select size=1 name=prepopulate_transfer_preset><option>N</option><option>PRESET_1</option><option>PRESET_2</option><option SELECTED>$prepopulate_transfer_preset</option></select>$NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE</td></tr>\n";
if ($SSoutbound_autodial_active > 0)
{
echo "<tr bgcolor=#B6D3FC><td align=right>Alt Number Dialing: </td><td align=left><select size=1 name=alt_number_dialing><option>Y</option><option>N</option><option SELECTED>$alt_number_dialing</option></select>$NWB#vicidial_campaigns-alt_number_dialing$NWE</td></tr>\n";
@@ -22067,6 +22089,10 @@ if ($ADD==999999)
$queuemetrics_url_LU = $row[0];
$vtiger_url_LU = $row[1];
$stmt="SELECT count(*) from vicidial_list_update_log;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$list_update_count = $row[0];
?>
<HTML>
@@ -22134,6 +22160,10 @@ if ($ADD==999999)
{
echo "<LI><a href=\"$vtiger_url_LU\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>VtigerCRM Home</a></FONT>\n";
}
if ($list_update_count > 0)
{
echo "<LI><a href=\"./AST_LIST_UPDATEstats.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>List Update Stats</a></FONT>\n";
}
?>
</UL>
</TD></TR></TABLE>
+18 -3
View File
@@ -584,7 +584,9 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
}
new_content = '<span name=option_route_value_' + option + 'id=option_route_value_' + option + "><a href=\"./admin.php?ADD=3511&menu_id=" + value + "\">Call Menu: </a></span><select size=1 name=option_route_value_" + option + ' id=option_route_value_' + option + " onChange=\"call_menu_link('" + option + "','CALLMENU');\">" + call_menu_list + "\n" + selected_value + '</select>';
else
{value='';}
new_content = '<span name=option_route_link_' + option + ' id=option_route_link_' + option + "><a href=\"./admin.php?ADD=3511&menu_id=" + value + "\">Call Menu: </a></span><select size=1 name=option_route_value_" + option + " id=option_route_value_" + option + " onChange=\"call_menu_link('" + option + "','CALLMENU');\">" + call_menu_list + "\n" + selected_value + '</select>';
}
if (selected_route=='INGROUP')
{
@@ -603,7 +605,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
}
new_content = '<input type=hidden name=option_route_value_context_' + option + ' id=option_route_value_context_' + option + ' value="' + selected_value + '">';
new_content = new_content + '<a href="admin.php?ADD=3111&group_id=' + value + '">In-Group:</a> ';
new_content = new_content + '<span name=option_route_link_' + option + 'id=option_route_link_' + option + '>';
new_content = new_content + '<a href="admin.php?ADD=3111&group_id=' + value + '">In-Group:</a> </span>';
new_content = new_content + '<select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + ' onChange="call_menu_link("' + option + '","INGROUP");">';
new_content = new_content + '' + ingroup_list + "\n" + selected_value + '</select>';
new_content = new_content + ' &nbsp; Handle Method: <select size=1 name=IGhandle_method_' + option + ' id=IGhandle_method_' + option + '>';
@@ -621,7 +624,9 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
}
new_content = 'DID: <select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + '>' + did_list + "\n" + selected_value + '</select>';
else
{value='';}
new_content = '<span name=option_route_link_' + option + ' id=option_route_link_' + option + '><a href="admin.php?ADD=3311&did_pattern=' + value + '">DID:</a> </span><select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + " onChange=\"call_menu_link('" + option + "','DID');\">" + did_list + "\n" + selected_value + '</select>';
}
if (selected_route=='HANGUP')
{
@@ -629,6 +634,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = value;
}
else
{value='vm-goodbye';}
new_content = "Audio File: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=40 maxlength=255 value=\"" + selected_value + "\"> <a href=\"javascript:launch_chooser('option_route_value_" + option + "','date'," + chooser_height + ");\">audio chooser</a>";
}
if (selected_route=='EXTENSION')
@@ -638,6 +645,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
selected_value = value;
selected_context = value_context;
}
else
{value='8304';}
new_content = "Extension: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=20 maxlength=255 value=\"" + selected_value + "\"> &nbsp; Context: <input type=text name=option_route_value_context_" + option + " id=option_route_value_context_" + option + " size=20 maxlength=255 value=\"" + selected_context + "\"> ";
}
if (selected_route=='PHONE')
@@ -646,6 +655,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = '<option SELECTED value="' + value + '">' + value + "</option>\n";
}
else
{value='';}
new_content = 'Phone: <select size=1 name=option_route_value_' + option + ' id=option_route_value_' + option + '>' + phone_list + "\n" + selected_value + '</select>';
}
if (selected_route=='VOICEMAIL')
@@ -654,6 +665,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = value;
}
else
{value='';}
new_content = "Voicemail Box: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=20 maxlength=255 value=\"" + selected_value + "\"> ";
}
if (selected_route=='AGI')
@@ -662,6 +675,8 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511
{
selected_value = value;
}
else
{value='';}
new_content = "AGI: <input type=text name=option_route_value_" + option + " id=option_route_value_" + option + " size=80 maxlength=255 value=\"" + selected_value + "\"> ";
}