Added three more transfer-conference number-to-dial presets, and ListID override options
Added Dispo Call URL, allows back-end call to a web page or URL when agent dispos a call Added log rolling archive script to automatically move logs into archive tables monthly git-svn-id: svn://192.168.202.10@1291 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -351,6 +351,20 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
webform or D1/D2-dial to happen at a specified number of seconds after
|
||||
the customer connects to the agent. Also, an API callw as added for this
|
||||
|
||||
85. Added three more transfer-conference number-to-dial presets as well as List
|
||||
ID override options for all five number presets
|
||||
|
||||
86. Added Dispo Call URL that allows a back-end call to a web page or URL, that
|
||||
will not display to the agent, which can send information like the
|
||||
selected disposition, talk time, phone number or most of the other
|
||||
fields available in the web form into a formatted URL to post to a
|
||||
remote web server. Available in Campaigns and In-Groups.
|
||||
|
||||
87. Added log rolling archive script to automatically move logs into archive
|
||||
tables monthly. The ADMIN_archive_log_tables.pl script needs to be added
|
||||
to your crontab to run monthly(example: "30 1 1 * *")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# ADMIN_archive_log_tables.pl
|
||||
#
|
||||
# This script is designed to put all records from call_log, vicidial_log and
|
||||
# vicidial_agent_log in relevant _archive tables and delete records in original
|
||||
# tables older than 2 months from current date. Also, deletes old
|
||||
# server_performance table records without archiving them as well as optimizing
|
||||
# all involved tables.
|
||||
#
|
||||
# Place in the crontab and run every month after one in the morning, or whenever
|
||||
# your server is not busy with other tasks
|
||||
# 30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl
|
||||
#
|
||||
# NOTE: On a high-load outbound dialing system, this script can take hours to
|
||||
# run. While the script is running the system is unusable. Please schedule to
|
||||
# run this script at a time when the system will not be used for several hours.
|
||||
#
|
||||
# original author: I. Taushanov(okli)
|
||||
# Based on perl scripts in ViciDial from Matt Florell and post:
|
||||
# http://www.eflo.net/VICIDIALforum/viewtopic.php?p=22506&sid=ca5347cffa6f6382f56ce3db9fb3d068#22506
|
||||
#
|
||||
# Copyright (C) 2010 I. Taushanov, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 90615-1701 - First version
|
||||
# 100101-1722 - Added error safety checks
|
||||
# 100103-2052 - Formatting fixes, name change, added initial table counts and added archive tables to official SQL files
|
||||
#
|
||||
|
||||
### 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 [-q] = quiet\n [-t] = test\n\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($args =~ /-q/i)
|
||||
{
|
||||
$q=1; $Q=1;
|
||||
}
|
||||
if ($args =~ /-t/i)
|
||||
{
|
||||
$T=1; $TEST=1;
|
||||
print "\n-----TESTING-----\n\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "no command line options set\n";
|
||||
}
|
||||
### end parsing run-time options ###
|
||||
|
||||
|
||||
$secX = time();
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
#change 2 to how many months old records to be moved and deleted
|
||||
$mon = ($mon - 2);
|
||||
if ($mon < 0)
|
||||
{
|
||||
$mon = ($mon + 12);
|
||||
$year = ($year - 1);
|
||||
}
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
|
||||
$del_time = "$year-$mon-$mday 01:00:00";
|
||||
|
||||
|
||||
if (!$Q) {print "\n\n\n\n-- ADMIN_archive_log_tables.pl --\n\n";}
|
||||
if (!$Q) {print "This program is designed to put all records from call_log, vicidial_log, server_performance and vicidial_agent_log in relevant _archive tables \nand delete records in original tables older than 2 months ( $del_time ) from current date \n\n";}
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
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;
|
||||
|
||||
if (!$T)
|
||||
{
|
||||
##### call_log
|
||||
$stmtA = "SELECT count(*) from call_log;";
|
||||
$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;
|
||||
$call_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from call_log_archive;";
|
||||
$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;
|
||||
$call_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing call_log table... ($call_log_count|$call_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO call_log_archive SELECT * from call_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into call_log_archive table\n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "DELETE FROM call_log WHERE start_time < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from call_log table \n";}
|
||||
|
||||
$stmtA = "optimize table call_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "DELETE from call_log_archive where channel LIKE 'Local/9%' and extension not IN('8365','8366','8367','8368','8369','8370','8371','8372','8373','8374') and caller_code LIKE 'V%' and length_in_sec < 75 and start_time < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from call_log_archive table \n";}
|
||||
|
||||
$stmtA = "optimize table call_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_log
|
||||
$stmtA = "SELECT count(*) from vicidial_log;";
|
||||
$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;
|
||||
$vicidial_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_log_archive;";
|
||||
$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;
|
||||
$vicidial_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_log table... ($vicidial_log_count|$vicidial_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_log_archive SELECT * from vicidial_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "DELETE FROM vicidial_log WHERE call_date < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### server_performance
|
||||
$stmtA = "SELECT count(*) from server_performance;";
|
||||
$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;
|
||||
$server_performance_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing server_performance table... ($server_performance_count)\n";}
|
||||
$stmtA = "DELETE FROM server_performance WHERE start_time < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from server_performance table \n";}
|
||||
|
||||
$stmtA = "optimize table server_performance;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
|
||||
##### vicidial_agent_log
|
||||
$stmtA = "SELECT count(*) from vicidial_agent_log;";
|
||||
$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;
|
||||
$vicidial_agent_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_agent_log_archive;";
|
||||
$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;
|
||||
$vicidial_agent_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_agent table... ($vicidial_agent_log_count|$vicidial_agent_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_agent_log_archive SELECT * from vicidial_agent_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_agent_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "DELETE FROM vicidial_agent_log WHERE event_time < '$del_time';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_agent_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_agent_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_agent_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
}
|
||||
#$dbhA->disconnect();
|
||||
#print "$del_time\n\n";
|
||||
|
||||
|
||||
### calculate time to run script ###
|
||||
$secY = time();
|
||||
$secZ = ($secY - $secX);
|
||||
$secZm = ($secZ /60);
|
||||
if (!$Q) {print "\nscript execution time in seconds: $secZ minutes: $secZm\n";}
|
||||
|
||||
exit;
|
||||
@@ -458,6 +458,9 @@ PHASE 6: ADDING CRONTAB ENTRIES FOR ASTGUICLIENT/VICIDIAL SCRIPTS
|
||||
### remove old recordings more than 7 days old
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
|
||||
### roll logs monthly on high-volume dialing systems
|
||||
#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl
|
||||
|
||||
### remove old vicidial logs and asterisk logs more than 2 days old
|
||||
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
|
||||
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
|
||||
|
||||
@@ -26,6 +26,14 @@ NOTE: as of SVN trunk 2009-05-19 the voicemail and prompt recording extensions a
|
||||
|
||||
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
AS OF RELEASE 2.2.0 YOU SHOULD NOT HAVE TO TAKE ANY STEPS BEYOND STEP 2 IN THIS DOCUMENT TO GET MULTI-SERVER VICIDIAL TO WORK IF YOU ARE USING THE DEFAULT VICIDIAL CONF FILES.
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1. The VICIDIAL/Asterisk servers need to have all of the perl scripts and cron jobs installed on them, except these which only need to be on one of the servers:
|
||||
- AST_VDhopper.pl (crontab)
|
||||
- AST_cleanup_agent_log.pl (crontab)
|
||||
@@ -33,6 +41,7 @@ NOTE: as of SVN trunk 2009-05-19 the voicemail and prompt recording extensions a
|
||||
- AST_DB_optimize.pl (crontab)
|
||||
- AST_VDadapt.pl (defined in /etc/astguiclient.conf)
|
||||
- AST_VDauto_dial_FILL.pl (defined in /etc/astguiclient.conf)
|
||||
- ADMIN_archive_log_tables.pl (crontab)
|
||||
|
||||
2. The VARactive_keepalives variable in /etc/astguiclient.conf should have "5" and "7" on only ONE SERVER in your entire dialer setup, the other servers should not have 5 or 7 in that field.
|
||||
# 1 - AST_update
|
||||
@@ -169,6 +178,7 @@ If you have any questions or problems please post to the astguiclient-users list
|
||||
- AST_DB_optimize.pl (crontab)
|
||||
- AST_VDadapt.pl (defined in /etc/astguiclient.conf)
|
||||
- AST_VDauto_dial_FILL.pl (defined in /etc/astguiclient.conf)
|
||||
- ADMIN_archive_log_tables.pl (crontab)
|
||||
|
||||
8. On all servers but one you should DELETE the following line from your extensions.conf:
|
||||
; prompt recording AGI script, ID is 4321
|
||||
|
||||
@@ -2384,6 +2384,8 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running
|
||||
50 0 * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --last-24hours
|
||||
## uncomment below if using QueueMetrics
|
||||
#*/5 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --only-qm-live-call-check
|
||||
|
||||
## uncomment below if using Vtiger
|
||||
#1 1 * * * /usr/share/astguiclient/Vtiger_optimize_all_tables.pl --quiet
|
||||
|
||||
### updater for VICIDIAL hopper
|
||||
@@ -2412,6 +2414,9 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running
|
||||
### remove old recordings more than 7 days old
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
|
||||
### roll logs monthly on high-volume dialing systems
|
||||
#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl
|
||||
|
||||
### remove old vicidial logs and asterisk logs more than 2 days old
|
||||
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
|
||||
29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f
|
||||
|
||||
@@ -685,8 +685,8 @@ 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',
|
||||
quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2') default 'N',
|
||||
prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2') default 'N',
|
||||
quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N',
|
||||
prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N',
|
||||
drop_rate_group VARCHAR(20) default 'DISABLED',
|
||||
view_calls_in_queue ENUM('NONE','ALL','1','2','3','4','5') default 'NONE',
|
||||
view_calls_in_queue_launch ENUM('AUTO','MANUAL') default 'MANUAL',
|
||||
@@ -702,9 +702,14 @@ agent_select_territories ENUM('Y','N') default 'N',
|
||||
campaign_calldate DATETIME,
|
||||
crm_popup_login ENUM('Y','N') default 'N',
|
||||
crm_login_address TEXT,
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action_message VARCHAR(255) default '',
|
||||
timer_action_seconds MEDIUMINT(7) default '-1'
|
||||
timer_action_seconds MEDIUMINT(7) default '-1',
|
||||
start_call_url TEXT,
|
||||
dispo_call_url TEXT,
|
||||
xferconf_c_number VARCHAR(50) default '',
|
||||
xferconf_d_number VARCHAR(50) default '',
|
||||
xferconf_e_number VARCHAR(50) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -719,7 +724,12 @@ reset_time VARCHAR(100) default '',
|
||||
agent_script_override VARCHAR(10) default '',
|
||||
campaign_cid_override VARCHAR(20) default '',
|
||||
am_message_exten_override VARCHAR(100) default '',
|
||||
drop_inbound_group_override VARCHAR(20) default ''
|
||||
drop_inbound_group_override VARCHAR(20) default '',
|
||||
xferconf_a_number VARCHAR(50) default '',
|
||||
xferconf_b_number VARCHAR(50) default '',
|
||||
xferconf_c_number VARCHAR(50) default '',
|
||||
xferconf_d_number VARCHAR(50) default '',
|
||||
xferconf_e_number VARCHAR(50) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_statuses (
|
||||
@@ -841,9 +851,14 @@ no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N',
|
||||
no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE',
|
||||
no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
||||
web_form_address_two TEXT,
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE',
|
||||
timer_action_message VARCHAR(255) default '',
|
||||
timer_action_seconds MEDIUMINT(7) default '-1'
|
||||
timer_action_seconds MEDIUMINT(7) default '-1',
|
||||
start_call_url TEXT,
|
||||
dispo_call_url TEXT,
|
||||
xferconf_c_number VARCHAR(50) default '',
|
||||
xferconf_d_number VARCHAR(50) default '',
|
||||
xferconf_e_number VARCHAR(50) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -2001,7 +2016,14 @@ 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='1189',db_schema_update_date=NOW();
|
||||
CREATE TABLE call_log_archive LIKE call_log;
|
||||
|
||||
CREATE TABLE vicidial_log_archive LIKE vicidial_log;
|
||||
|
||||
CREATE TABLE vicidial_agent_log_archive LIKE vicidial_agent_log;
|
||||
ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT NULL;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1191',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -688,3 +688,36 @@ ALTER TABLE vicidial_inbound_groups ADD timer_action_message VARCHAR(255) defaul
|
||||
ALTER TABLE vicidial_inbound_groups ADD timer_action_seconds MEDIUMINT(7) default '-1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW();
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD start_call_url TEXT;
|
||||
ALTER TABLE vicidial_campaigns ADD dispo_call_url TEXT;
|
||||
ALTER TABLE vicidial_campaigns ADD xferconf_c_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_campaigns ADD xferconf_d_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_campaigns ADD xferconf_e_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_campaigns MODIFY quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N';
|
||||
ALTER TABLE vicidial_campaigns MODIFY prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N';
|
||||
ALTER TABLE vicidial_campaigns MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE';
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups ADD start_call_url TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD dispo_call_url TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD xferconf_c_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_inbound_groups ADD xferconf_d_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_inbound_groups ADD xferconf_e_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_inbound_groups MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE';
|
||||
|
||||
ALTER TABLE vicidial_lists ADD xferconf_a_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_lists ADD xferconf_b_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_lists ADD xferconf_c_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_lists ADD xferconf_d_number VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_lists ADD xferconf_e_number VARCHAR(50) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1190',db_schema_update_date=NOW();
|
||||
|
||||
CREATE TABLE call_log_archive LIKE call_log;
|
||||
|
||||
CREATE TABLE vicidial_log_archive LIKE vicidial_log;
|
||||
|
||||
CREATE TABLE vicidial_agent_log_archive LIKE vicidial_agent_log;
|
||||
ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT NULL;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1191',db_schema_update_date=NOW();
|
||||
|
||||
@@ -365,6 +365,13 @@ This is the message that appears on the agent screen at the time the Timer Actio
|
||||
Timer Action Seconds||
|
||||
This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive||
|
||||
This setting will override the Campaign settings||
|
||||
Start Call URL||
|
||||
This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. This URL can NOT be a relative path. The Start URL does not work for Manual dial calls. Default is blank||
|
||||
Dispo Call URL||
|
||||
This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call. This URL can NOT be a relative path. Default is blank||
|
||||
Xfer-Conf Number Override||
|
||||
These five fields allow for you to override the Transfer Conference number presets when the lead is from this list. Default is blank||
|
||||
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, have the agent use the CONSULTATIVE checkbox, which does not work for third party non-ViciDial consultative calls. For those just have the agent click the Dial With Customer button. 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, for instance if you want to do a call to a special IVR you have set to extension 83900 you would put AXFER83900 in the number-to-dial field||
|
||||
|
||||
|
||||
add-file: user_territories.php
|
||||
|
||||
@@ -0,0 +1,292 @@
|
||||
<?php
|
||||
# vdc_call_url_test.php
|
||||
#
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed display and log the start_call_url and dispo_call_url
|
||||
# queries if activated
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 100103-1317 - First build of script
|
||||
#
|
||||
|
||||
$version = '2.2.0-1';
|
||||
$build = '100103-1317';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$query_string = getenv("QUERY_STRING");
|
||||
|
||||
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
|
||||
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
|
||||
$vendor_lead_code = $vendor_id;
|
||||
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
|
||||
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
|
||||
if (isset($_GET["gmt_offset_now"])) {$gmt_offset_now=$_GET["gmt_offset_now"];}
|
||||
elseif (isset($_POST["gmt_offset_now"])) {$gmt_offset_now=$_POST["gmt_offset_now"];}
|
||||
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
|
||||
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
|
||||
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
|
||||
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
|
||||
if (isset($_GET["title"])) {$title=$_GET["title"];}
|
||||
elseif (isset($_POST["title"])) {$title=$_POST["title"];}
|
||||
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
|
||||
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
|
||||
if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];}
|
||||
elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];}
|
||||
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
|
||||
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
|
||||
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
|
||||
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
|
||||
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
|
||||
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
|
||||
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
|
||||
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
|
||||
if (isset($_GET["city"])) {$city=$_GET["city"];}
|
||||
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
|
||||
if (isset($_GET["state"])) {$state=$_GET["state"];}
|
||||
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
|
||||
if (isset($_GET["province"])) {$province=$_GET["province"];}
|
||||
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
|
||||
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
|
||||
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
|
||||
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
|
||||
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
|
||||
if (isset($_GET["gender"])) {$gender=$_GET["gender"];}
|
||||
elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];}
|
||||
if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];}
|
||||
elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];}
|
||||
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
|
||||
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
|
||||
if (isset($_GET["email"])) {$email=$_GET["email"];}
|
||||
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
|
||||
if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];}
|
||||
elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];}
|
||||
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
|
||||
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
|
||||
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
|
||||
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
|
||||
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
|
||||
if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];}
|
||||
elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];}
|
||||
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
|
||||
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
|
||||
if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];}
|
||||
elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];}
|
||||
if (isset($_GET["closer"])) {$closer=$_GET["closer"];}
|
||||
elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];}
|
||||
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
||||
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
||||
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
|
||||
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
|
||||
if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];}
|
||||
elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];}
|
||||
if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];}
|
||||
elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];}
|
||||
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
|
||||
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
|
||||
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
|
||||
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
|
||||
if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];}
|
||||
elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];}
|
||||
elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];}
|
||||
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
|
||||
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
|
||||
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
|
||||
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
|
||||
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
|
||||
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
|
||||
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
|
||||
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
|
||||
if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];}
|
||||
elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];}
|
||||
if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];}
|
||||
elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];}
|
||||
if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];}
|
||||
elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];}
|
||||
if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
|
||||
elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
|
||||
if (isset($_GET["owner"])) {$owner=$_GET["owner"];}
|
||||
elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];}
|
||||
if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];}
|
||||
elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];}
|
||||
if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];}
|
||||
elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];}
|
||||
if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];}
|
||||
elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];}
|
||||
if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];}
|
||||
elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];}
|
||||
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
|
||||
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
|
||||
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
|
||||
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
|
||||
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
|
||||
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
|
||||
if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];}
|
||||
elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];}
|
||||
if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];}
|
||||
elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];}
|
||||
if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];}
|
||||
elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];}
|
||||
if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];}
|
||||
elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];}
|
||||
if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];}
|
||||
elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];}
|
||||
if (isset($_GET["talk_time"])) {$talk_time=$_GET["talk_time"];}
|
||||
elseif (isset($_POST["talk_time"])) {$talk_time=$_POST["talk_time"];}
|
||||
if (isset($_GET["talk_time_min"])) {$talk_time_min=$_GET["talk_time_min"];}
|
||||
elseif (isset($_POST["talk_time_min"])) {$talk_time_min=$_POST["talk_time_min"];}
|
||||
if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
|
||||
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
|
||||
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
header ("Pragma: no-cache"); // HTTP/1.0
|
||||
|
||||
$txt = '.txt';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$CIDdate = date("mdHis");
|
||||
$ENTRYdate = date("YmdHis");
|
||||
$MT[0]='';
|
||||
$agents='@agents';
|
||||
|
||||
$IFRAME=0;
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$timeclock_end_of_day = $row[1];
|
||||
$agentonly_callback_campaign_lock = $row[2];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$user=ereg_replace("[^-_0-9a-zA-Z]","",$user);
|
||||
$pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass);
|
||||
$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec);
|
||||
$phone_code = ereg_replace("[^0-9]","",$phone_code);
|
||||
$phone_number = ereg_replace("[^0-9]","",$phone_number);
|
||||
}
|
||||
else
|
||||
{
|
||||
$user = ereg_replace("'|\"|\\\\|;","",$user);
|
||||
$pass = ereg_replace("'|\"|\\\\|;","",$pass);
|
||||
}
|
||||
|
||||
|
||||
# default optional vars if not set
|
||||
if (!isset($format)) {$format="text";}
|
||||
if ($format == 'debug') {$DB=1;}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
if ($format=='debug')
|
||||
{
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build USER: $user server_ip: $server_ip-->\n";
|
||||
echo "<title>VICIDiaL Script Display Script";
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$output .= "$lead_id|";
|
||||
$output .= "$vendor_id|";
|
||||
$output .= "$vendor_lead_code|";
|
||||
$output .= "$list_id|";
|
||||
$output .= "$gmt_offset_now|";
|
||||
$output .= "$phone_code|";
|
||||
$output .= "$phone_number|";
|
||||
$output .= "$title|";
|
||||
$output .= "$first_name|";
|
||||
$output .= "$middle_initial|";
|
||||
$output .= "$last_name|";
|
||||
$output .= "$address1|";
|
||||
$output .= "$address2|";
|
||||
$output .= "$address3|";
|
||||
$output .= "$city|";
|
||||
$output .= "$state|";
|
||||
$output .= "$province|";
|
||||
$output .= "$postal_code|";
|
||||
$output .= "$country_code|";
|
||||
$output .= "$gender|";
|
||||
$output .= "$date_of_birth|";
|
||||
$output .= "$alt_phone|";
|
||||
$output .= "$email|";
|
||||
$output .= "$security_phrase|";
|
||||
$output .= "$comments|";
|
||||
$output .= "$user|";
|
||||
$output .= "$pass|";
|
||||
$output .= "$campaign|";
|
||||
$output .= "$phone_login|";
|
||||
$output .= "$original_phone_login|";
|
||||
$output .= "$phone_pass|";
|
||||
$output .= "$fronter|";
|
||||
$output .= "$closer|";
|
||||
$output .= "$group|";
|
||||
$output .= "$channel_group|";
|
||||
$output .= "$SQLdate|";
|
||||
$output .= "$epoch|";
|
||||
$output .= "$uniqueid|";
|
||||
$output .= "$customer_zap_channel|";
|
||||
$output .= "$customer_server_ip|";
|
||||
$output .= "$server_ip|";
|
||||
$output .= "$SIPexten|";
|
||||
$output .= "$session_id|";
|
||||
$output .= "$phone|";
|
||||
$output .= "$parked_by|";
|
||||
$output .= "$dispo|";
|
||||
$output .= "$dialed_number|";
|
||||
$output .= "$dialed_label|";
|
||||
$output .= "$source_id|";
|
||||
$output .= "$rank|";
|
||||
$output .= "$owner|";
|
||||
$output .= "$camp_script|";
|
||||
$output .= "$in_script|";
|
||||
$output .= "$script_width|";
|
||||
$output .= "$script_height|";
|
||||
$output .= "$fullname|";
|
||||
$output .= "$recording_filename|";
|
||||
$output .= "$recording_id|";
|
||||
$output .= "$user_custom_one|";
|
||||
$output .= "$user_custom_two|";
|
||||
$output .= "$user_custom_three|";
|
||||
$output .= "$user_custom_four|";
|
||||
$output .= "$user_custom_five|";
|
||||
$output .= "$talk_time|";
|
||||
$output .= "$talk_time_min|";
|
||||
$output .= "$agent_log_id|";
|
||||
|
||||
echo "$output\n$query_string\n";
|
||||
|
||||
$fp = fopen ("./call_url_log.txt", "a");
|
||||
fwrite ($fp, "$output|$query_string\n");
|
||||
fclose($fp);
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
# vdc_db_query.php
|
||||
#
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
# This script is designed to exchange information between vicidial.php and the database server for various actions
|
||||
#
|
||||
# required variables:
|
||||
# - $server_ip
|
||||
@@ -225,10 +224,11 @@
|
||||
# 91204-1937 - Added logging of agent grab calls
|
||||
# 91213-0946 - Added queue_position to queue_log COMPLETE... records
|
||||
# 91228-1340 - Added API fields update functions
|
||||
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
|
||||
#
|
||||
|
||||
$version = '2.2.0-134';
|
||||
$build = '91228-1340';
|
||||
$version = '2.2.0-135';
|
||||
$build = '100103-1254';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=276;
|
||||
$one_mysql_log=0;
|
||||
@@ -1928,6 +1928,50 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
}
|
||||
|
||||
### Check for List ID override settings
|
||||
$VDCL_xferconf_a_number='';
|
||||
$VDCL_xferconf_b_number='';
|
||||
$VDCL_xferconf_c_number='';
|
||||
$VDCL_xferconf_d_number='';
|
||||
$VDCL_xferconf_e_number='';
|
||||
$stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VC_preset_ct = mysql_num_rows($rslt);
|
||||
if ($VC_preset_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDCL_xferconf_a_number = $row[0];
|
||||
$VDCL_xferconf_b_number = $row[1];
|
||||
$VDCL_xferconf_c_number = $row[2];
|
||||
$VDCL_xferconf_d_number = $row[3];
|
||||
$VDCL_xferconf_e_number = $row[4];
|
||||
}
|
||||
|
||||
if (strlen($list_id)>0)
|
||||
{
|
||||
$stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIG_preset_ct = mysql_num_rows($rslt);
|
||||
if ($VDIG_preset_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (strlen($row[0]) > 0)
|
||||
{$VDCL_xferconf_a_number = $row[0];}
|
||||
if (strlen($row[1]) > 0)
|
||||
{$VDCL_xferconf_b_number = $row[1];}
|
||||
if (strlen($row[2]) > 0)
|
||||
{$VDCL_xferconf_c_number = $row[2];}
|
||||
if (strlen($row[3]) > 0)
|
||||
{$VDCL_xferconf_d_number = $row[3];}
|
||||
if (strlen($row[4]) > 0)
|
||||
{$VDCL_xferconf_e_number = $row[4];}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$comments = eregi_replace("\r",'',$comments);
|
||||
$comments = eregi_replace("\n",'!N',$comments);
|
||||
@@ -1971,6 +2015,11 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$LeaD_InfO .= $owner . "\n";
|
||||
$LeaD_InfO .= "\n";
|
||||
$LeaD_InfO .= $script_recording_delay . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_a_number . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_b_number . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_c_number . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_d_number . "\n";
|
||||
$LeaD_InfO .= $VDCL_xferconf_e_number . "\n";
|
||||
|
||||
echo $LeaD_InfO;
|
||||
}
|
||||
@@ -3733,7 +3782,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$script_recording_delay = $row[0];
|
||||
}
|
||||
|
||||
$stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group from vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00114',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3741,16 +3790,46 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
if ($VDIG_cid_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDCL_campaign_script = $row[0];
|
||||
$VDCL_get_call_launch = $row[1];
|
||||
$VDCL_xferconf_a_dtmf = $row[2];
|
||||
$VDCL_xferconf_a_number = $row[3];
|
||||
$VDCL_xferconf_b_dtmf = $row[4];
|
||||
$VDCL_xferconf_b_number = $row[5];
|
||||
$VDCL_campaign_script = $row[0];
|
||||
$VDCL_get_call_launch = $row[1];
|
||||
$VDCL_xferconf_a_dtmf = $row[2];
|
||||
$VDCL_xferconf_a_number = $row[3];
|
||||
$VDCL_xferconf_b_dtmf = $row[4];
|
||||
$VDCL_xferconf_b_number = $row[5];
|
||||
$VDCL_default_xfer_group = $row[6];
|
||||
if (strlen($VDCL_default_xfer_group)<2) {$VDCL_default_xfer_group='X';}
|
||||
$VDCL_start_call_url = $row[7];
|
||||
$VDCL_dispo_call_url = $row[8];
|
||||
$VDCL_xferconf_c_number = $row[9];
|
||||
$VDCL_xferconf_d_number = $row[10];
|
||||
$VDCL_xferconf_e_number = $row[11];
|
||||
}
|
||||
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X||||\n|\n";
|
||||
|
||||
### Check for List ID override settings
|
||||
if (strlen($list_id)>0)
|
||||
{
|
||||
$stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIG_xferOR_ct = mysql_num_rows($rslt);
|
||||
if ($VDIG_xferOR_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (strlen($row[0]) > 0)
|
||||
{$VDCL_xferconf_a_number = $row[0];}
|
||||
if (strlen($row[1]) > 0)
|
||||
{$VDCL_xferconf_b_number = $row[1];}
|
||||
if (strlen($row[2]) > 0)
|
||||
{$VDCL_xferconf_c_number = $row[2];}
|
||||
if (strlen($row[3]) > 0)
|
||||
{$VDCL_xferconf_d_number = $row[3];}
|
||||
if (strlen($row[4]) > 0)
|
||||
{$VDCL_xferconf_e_number = $row[4];}
|
||||
}
|
||||
}
|
||||
|
||||
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number\n|\n";
|
||||
|
||||
if (ereg('X',$dialed_label))
|
||||
{
|
||||
@@ -3811,7 +3890,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$script_recording_delay = $row[0];
|
||||
}
|
||||
|
||||
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3837,8 +3916,13 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$VDCL_timer_action = $row[15];
|
||||
$VDCL_timer_action_message = $row[16];
|
||||
$VDCL_timer_action_seconds = $row[17];
|
||||
$VDCL_start_call_url = $row[18];
|
||||
$VDCL_dispo_call_url = $row[19];
|
||||
$VDCL_xferconf_c_number = $row[20];
|
||||
$VDCL_xferconf_d_number = $row[21];
|
||||
$VDCL_xferconf_e_number = $row[22];
|
||||
|
||||
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3862,6 +3946,17 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
{$VDCL_timer_action_message = $row[7];}
|
||||
if (strlen($VDCL_timer_action_seconds) < 1)
|
||||
{$VDCL_timer_action_seconds = $row[8];}
|
||||
if (strlen($VDCL_start_call_url) < 1)
|
||||
{$VDCL_start_call_url = $row[9];}
|
||||
if (strlen($VDCL_dispo_call_url) < 1)
|
||||
{$VDCL_dispo_call_url = $row[10];}
|
||||
if (strlen($VDCL_xferconf_c_number) < 1)
|
||||
{$VDCL_xferconf_c_number = $row[11];}
|
||||
if (strlen($VDCL_xferconf_d_number) < 1)
|
||||
{$VDCL_xferconf_d_number = $row[12];}
|
||||
if (strlen($VDCL_xferconf_e_number) < 1)
|
||||
{$VDCL_xferconf_e_number = $row[13];}
|
||||
|
||||
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
|
||||
{
|
||||
$VDCL_ingroup_script = $row[0];
|
||||
@@ -3915,7 +4010,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
||||
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3933,6 +4028,11 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
$VDCL_timer_action = $row[7];
|
||||
$VDCL_timer_action_message = $row[8];
|
||||
$VDCL_timer_action_seconds = $row[9];
|
||||
$VDCL_start_call_url = $row[10];
|
||||
$VDCL_dispo_call_url = $row[11];
|
||||
$VDCL_xferconf_c_number = $row[12];
|
||||
$VDCL_xferconf_d_number = $row[13];
|
||||
$VDCL_xferconf_e_number = $row[14];
|
||||
}
|
||||
|
||||
$script_recording_delay=0;
|
||||
@@ -3975,9 +4075,33 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
}
|
||||
}
|
||||
|
||||
### Check for List ID override settings
|
||||
if (strlen($list_id)>0)
|
||||
{
|
||||
$stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIG_cidOR_ct = mysql_num_rows($rslt);
|
||||
if ($VDIG_cidOR_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (strlen($row[0]) > 0)
|
||||
{$VDCL_xferconf_a_number = $row[0];}
|
||||
if (strlen($row[1]) > 0)
|
||||
{$VDCL_xferconf_b_number = $row[1];}
|
||||
if (strlen($row[2]) > 0)
|
||||
{$VDCL_xferconf_c_number = $row[2];}
|
||||
if (strlen($row[3]) > 0)
|
||||
{$VDCL_xferconf_d_number = $row[3];}
|
||||
if (strlen($row[4]) > 0)
|
||||
{$VDCL_xferconf_e_number = $row[4];}
|
||||
}
|
||||
}
|
||||
|
||||
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";}
|
||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";}
|
||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|\n";}
|
||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|\n";}
|
||||
|
||||
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4117,6 +4241,92 @@ if ($ACTION == 'VDADcheckINCOMING')
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
### Issue Start Call URL if defined
|
||||
if (strlen($VDCL_start_call_url) > 7)
|
||||
{
|
||||
if (eregi('--A--user_custom_',$VDCL_start_call_url))
|
||||
{
|
||||
$stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VUC_ct = mysql_num_rows($rslt);
|
||||
if ($VUC_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_custom_one = $row[0];
|
||||
$user_custom_two = $row[1];
|
||||
$user_custom_three = $row[2];
|
||||
$user_custom_four = $row[3];
|
||||
$user_custom_five = $row[4];
|
||||
}
|
||||
}
|
||||
$VDCL_start_call_url = preg_replace('/^VAR/','',$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--lead_id--B--',"$lead_id",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--vendor_id--B--',"$vendor_id",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--list_id--B--',"$list_id",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--phone_code--B--',"$phone_code",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--phone_number--B--',"$phone_number",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--title--B--',"$title",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--first_name--B--',"$first_name",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--middle_initial--B--',"$middle_initial",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--last_name--B--',"$last_name",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--address1--B--',"$address1",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--address2--B--',"$address2",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--address3--B--',"$address3",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--city--B--',"$city",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--state--B--',"$state",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--province--B--',"$province",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--postal_code--B--',"$postal_code",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--country_code--B--',"$country_code",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--gender--B--',"$gender",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--alt_phone--B--',"$alt_phone",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--email--B--',"$email",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--security_phrase--B--',"$security_phrase",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--comments--B--',"$comments",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user--B--',"$user",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--pass--B--',"$pass",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--campaign--B--',"$campaign",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--phone_login--B--',"$phone_login",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--phone_pass--B--',"$phone_pass",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--fronter--B--',"$fronter",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--closer--B--',"$closer",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--group--B--',"$group",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--channel_group--B--',"$channel_group",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--SQLdate--B--',"$SQLdate",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--epoch--B--',"$epoch",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--uniqueid--B--',"$uniqueid",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--server_ip--B--',"$server_ip",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--SIPexten--B--',"$SIPexten",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--session_id--B--',"$session_id",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--phone--B--',"$phone",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--parked_by--B--',"$parked_by",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--dispo--B--',"$dispo",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--dialed_number--B--',"$dialed_number",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--dialed_label--B--',"$dialed_label",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--source_id--B--',"$source_id",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--rank--B--',"$rank",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--owner--B--',"$owner",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--camp_script--B--',"$camp_script",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--in_script--B--',"$in_script",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--fullname--B--',"$fullname",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--talk_time--B--',"0",$VDCL_start_call_url);
|
||||
$VDCL_start_call_url = eregi_replace('--A--talk_time_min--B--',"0",$VDCL_start_call_url);
|
||||
if ($DB > 0) {echo "$VDCL_start_call_url<BR>\n";}
|
||||
$SCUfile = file("$VDCL_start_call_url");
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4172,29 +4382,6 @@ if ($ACTION == 'userLOGout')
|
||||
$vc_remove = mysql_affected_rows($link);
|
||||
}
|
||||
|
||||
##### Delete the vicidial_live_agents record for this session
|
||||
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00130',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$retry_count=0;
|
||||
while ( ($errno > 0) and ($retry_count < 9) )
|
||||
{
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$one_mysql_log=1;
|
||||
$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9130$retry_count",$user,$server_ip,$session_name,$one_mysql_log);
|
||||
$one_mysql_log=0;
|
||||
$retry_count++;
|
||||
}
|
||||
$vla_delete = mysql_affected_rows($link);
|
||||
|
||||
##### Delete the vicidial_live_inbound_agents records for this session
|
||||
$stmt="DELETE from vicidial_live_inbound_agents where user ='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00131',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$vlia_delete = mysql_affected_rows($link);
|
||||
|
||||
##### Delete the web_client_sessions
|
||||
$stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4231,14 +4418,40 @@ if ($ACTION == 'userLOGout')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00135',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
|
||||
##### Delete the vicidial_live_agents record for this session
|
||||
$stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00130',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$retry_count=0;
|
||||
while ( ($errno > 0) and ($retry_count < 9) )
|
||||
{
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$one_mysql_log=1;
|
||||
$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9130$retry_count",$user,$server_ip,$session_name,$one_mysql_log);
|
||||
$one_mysql_log=0;
|
||||
$retry_count++;
|
||||
}
|
||||
$vla_delete = mysql_affected_rows($link);
|
||||
|
||||
##### Delete the vicidial_live_inbound_agents records for this session
|
||||
$stmt="DELETE from vicidial_live_inbound_agents where user ='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00131',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$vlia_delete = mysql_affected_rows($link);
|
||||
|
||||
$pause_sec=0;
|
||||
$stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
$stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00136',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDpr_ct = mysql_num_rows($rslt);
|
||||
if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) )
|
||||
{
|
||||
$agent_log_id = $row[5];
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$pause_sec = (($StarTtime - $row[0]) + $row[1]);
|
||||
|
||||
@@ -4337,6 +4550,17 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt = "SELECT dispo_call_url from vicidial_campaigns where campaign_id='$campaign';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VC_dcu_ct = mysql_num_rows($rslt);
|
||||
if ($VC_dcu_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$dispo_call_url =$row[0];
|
||||
}
|
||||
|
||||
### reset the API fields in vicidial_live_agents record
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_timer_action_seconds='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4376,6 +4600,13 @@ if ($ACTION == 'updateDISPO')
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00144',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt = "SELECT dispo_call_url from vicidial_inbound_groups where group_id='$stage';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$dispo_call_url = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4569,7 +4800,7 @@ if ($ACTION == 'updateDISPO')
|
||||
$dispo_epochSQL='';
|
||||
$lead_id_commentsSQL='';
|
||||
$StarTtime = date("U");
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch,lead_id,comments from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch,lead_id,comments,agent_log_id from vicidial_agent_log where agent_log_id <='$agent_log_id' and lead_id='$lead_id' order by agent_log_id desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00150',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -4577,6 +4808,7 @@ if ($ACTION == 'updateDISPO')
|
||||
if ($VDpr_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$agent_log_id = $row[6];
|
||||
if ( (eregi("NULL",$row[2])) or ($row[2] < 1000) )
|
||||
{
|
||||
$row[2]=$StarTtime;
|
||||
@@ -4611,17 +4843,18 @@ if ($ACTION == 'updateDISPO')
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00272',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$user_group='';
|
||||
$stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$ug_record_ct = mysql_num_rows($rslt);
|
||||
if ($ug_record_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_group = trim("$row[0]");
|
||||
}
|
||||
$user_group='';
|
||||
$stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$ug_record_ct = mysql_num_rows($rslt);
|
||||
if ($ug_record_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_group = trim("$row[0]");
|
||||
}
|
||||
$CALL_agent_log_id = $agent_log_id;
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
@@ -5180,6 +5413,160 @@ if ($ACTION == 'updateDISPO')
|
||||
|
||||
mysql_close($linkB);
|
||||
}
|
||||
|
||||
### Issue Dispo Call URL if defined
|
||||
if (strlen($dispo_call_url) > 7)
|
||||
{
|
||||
$talk_time=0;
|
||||
$talk_time_min=0;
|
||||
if (eregi('--A--user_custom_',$dispo_call_url))
|
||||
{
|
||||
$stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VUC_ct = mysql_num_rows($rslt);
|
||||
if ($VUC_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_custom_one = $row[0];
|
||||
$user_custom_two = $row[1];
|
||||
$user_custom_three = $row[2];
|
||||
$user_custom_four = $row[3];
|
||||
$user_custom_five = $row[4];
|
||||
}
|
||||
}
|
||||
|
||||
if (eregi('--A--talk_time',$dispo_call_url))
|
||||
{
|
||||
$stmt = "select talk_sec,dead_sec from vicidial_agent_log where lead_id='$lead_id' and agent_log_id='$CALL_agent_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VAL_talk_ct = mysql_num_rows($rslt);
|
||||
if ($VAL_talk_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$talk_sec = $row[0];
|
||||
$dead_sec = $row[1];
|
||||
$talk_time = ($talk_sec - $dead_sec);
|
||||
if ($talk_time < 1)
|
||||
{$talk_time = 0;}
|
||||
else
|
||||
{
|
||||
$talk_time_min = ceil($talk_time / 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##### grab the data from vicidial_list for the lead_id
|
||||
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,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,called_count,last_local_call_time,rank,owner FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysql_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$dispo = trim("$row[3]");
|
||||
$tsr = trim("$row[4]");
|
||||
$vendor_id = trim("$row[5]");
|
||||
$vendor_lead_code = trim("$row[5]");
|
||||
$source_id = trim("$row[6]");
|
||||
$list_id = trim("$row[7]");
|
||||
$gmt_offset_now = trim("$row[8]");
|
||||
$phone_code = trim("$row[10]");
|
||||
$phone_number = trim("$row[11]");
|
||||
$title = trim("$row[12]");
|
||||
$first_name = trim("$row[13]");
|
||||
$middle_initial = trim("$row[14]");
|
||||
$last_name = trim("$row[15]");
|
||||
$address1 = trim("$row[16]");
|
||||
$address2 = trim("$row[17]");
|
||||
$address3 = trim("$row[18]");
|
||||
$city = trim("$row[19]");
|
||||
$state = trim("$row[20]");
|
||||
$province = trim("$row[21]");
|
||||
$postal_code = trim("$row[22]");
|
||||
$country_code = trim("$row[23]");
|
||||
$gender = trim("$row[24]");
|
||||
$date_of_birth = trim("$row[25]");
|
||||
$alt_phone = trim("$row[26]");
|
||||
$email = trim("$row[27]");
|
||||
$security = trim("$row[28]");
|
||||
$comments = stripslashes(trim("$row[29]"));
|
||||
$called_count = trim("$row[30]");
|
||||
$rank = trim("$row[32]");
|
||||
$owner = trim("$row[33]");
|
||||
}
|
||||
|
||||
$dispo_call_url = preg_replace('/^VAR/','',$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--lead_id--B--',"$lead_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--vendor_id--B--',"$vendor_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--list_id--B--',"$list_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--phone_code--B--',"$phone_code",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--phone_number--B--',"$phone_number",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--title--B--',"$title",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--first_name--B--',"$first_name",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--middle_initial--B--',"$middle_initial",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--last_name--B--',"$last_name",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--address1--B--',"$address1",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--address2--B--',"$address2",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--address3--B--',"$address3",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--city--B--',"$city",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--state--B--',"$state",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--province--B--',"$province",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--postal_code--B--',"$postal_code",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--country_code--B--',"$country_code",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--gender--B--',"$gender",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--alt_phone--B--',"$alt_phone",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--email--B--',"$email",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--security_phrase--B--',"$security_phrase",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--comments--B--',"$comments",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user--B--',"$user",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--pass--B--',"$pass",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--campaign--B--',"$campaign",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--phone_login--B--',"$phone_login",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--phone_pass--B--',"$phone_pass",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--fronter--B--',"$fronter",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--closer--B--',"$closer",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--group--B--',"$group",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--channel_group--B--',"$channel_group",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--SQLdate--B--',"$SQLdate",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--epoch--B--',"$epoch",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--uniqueid--B--',"$uniqueid",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--server_ip--B--',"$server_ip",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--SIPexten--B--',"$SIPexten",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--session_id--B--',"$session_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--phone--B--',"$phone",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--parked_by--B--',"$parked_by",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--dispo--B--',"$dispo",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--dialed_number--B--',"$dialed_number",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--dialed_label--B--',"$dialed_label",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--source_id--B--',"$source_id",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--rank--B--',"$rank",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--owner--B--',"$owner",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--camp_script--B--',"$camp_script",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--in_script--B--',"$in_script",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--fullname--B--',"$fullname",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--talk_time--B--',"$talk_time",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--talk_time_min--B--',"$talk_time_min",$dispo_call_url);
|
||||
$dispo_call_url = eregi_replace('--A--agent_log_id--B--',"$CALL_agent_log_id",$dispo_call_url);
|
||||
if ($DB > 0) {echo "$dispo_call_url<BR>\n";}
|
||||
$SCUfile = file("$dispo_call_url");
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
}
|
||||
echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vicidial.php - the web-based version of the astVICIDIAL client application
|
||||
#
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Other scripts that this application depends on:
|
||||
# - vdc_db_query.php: Updates information in the database
|
||||
@@ -267,10 +267,11 @@
|
||||
# 91211-1412 - Added User custom variables and CRM login popup
|
||||
# 91219-0657 - Set pause code automatically on ReQueue and INBOUND_MAN Dial-Next-Number
|
||||
# 91228-1339 - Added API "fields update" functions and "timer action" functions
|
||||
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
|
||||
#
|
||||
|
||||
$version = '2.2.0-245';
|
||||
$build = '91228-1339';
|
||||
$version = '2.2.0-246';
|
||||
$build = '100103-1250';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=64;
|
||||
$one_mysql_log=0;
|
||||
@@ -1099,7 +1100,7 @@ $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,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds 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,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number 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";}
|
||||
@@ -1165,6 +1166,11 @@ $VDloginDISPLAY=0;
|
||||
$timer_action = $row[58];
|
||||
$timer_action_message = $row[59];
|
||||
$timer_action_seconds = $row[60];
|
||||
$start_call_url = $row[61];
|
||||
$dispo_call_url = $row[62];
|
||||
$xferconf_c_number = $row[63];
|
||||
$xferconf_d_number = $row[64];
|
||||
$xferconf_e_number = $row[65];
|
||||
|
||||
if ($user_territories_active < 1)
|
||||
{$agent_select_territories = 0;}
|
||||
@@ -1202,18 +1208,24 @@ $VDloginDISPLAY=0;
|
||||
{$dispo_check_all_pause=1;}
|
||||
|
||||
$quick_transfer_button_enabled=0;
|
||||
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2/",$quick_transfer_button))
|
||||
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$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))
|
||||
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$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;}
|
||||
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
|
||||
{$preset_populate = $xferconf_c_number;}
|
||||
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
|
||||
{$preset_populate = $xferconf_d_number;}
|
||||
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
|
||||
{$preset_populate = $xferconf_e_number;}
|
||||
}
|
||||
|
||||
$default_group_alias_cid='';
|
||||
@@ -2293,6 +2305,9 @@ $CCAL_OUT .= "</table>";
|
||||
var CalL_XC_a_NuMber = '<?php echo $xferconf_a_number ?>';
|
||||
var CalL_XC_b_Dtmf = '<?php echo $xferconf_b_dtmf ?>';
|
||||
var CalL_XC_b_NuMber = '<?php echo $xferconf_b_number ?>';
|
||||
var CalL_XC_c_NuMber = '<?php echo $xferconf_c_number ?>';
|
||||
var CalL_XC_d_NuMber = '<?php echo $xferconf_d_number ?>';
|
||||
var CalL_XC_e_NuMber = '<?php echo $xferconf_e_number ?>';
|
||||
var VU_hotkeys_active = '<?php echo $VU_hotkeys_active ?>';
|
||||
var VU_agent_choose_ingroups = '<?php echo $VU_agent_choose_ingroups ?>';
|
||||
var VU_agent_choose_ingroups_DV = '';
|
||||
@@ -4562,7 +4577,20 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
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') )
|
||||
if (prepopulate_transfer_preset_enabled > 0)
|
||||
{
|
||||
if (prepopulate_transfer_preset == 'PRESET_1')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_2')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_3')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_4')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_5')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
|
||||
}
|
||||
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
|
||||
{
|
||||
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>";
|
||||
|
||||
@@ -4570,6 +4598,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_2')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_3')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_4')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_5')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
|
||||
}
|
||||
|
||||
if (call_requeue_button > 0)
|
||||
@@ -5135,6 +5169,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
document.vicidial_form.owner.value = MDnextResponse_array[36];
|
||||
// CalL_ScripT_id = MDnextResponse_array[37];
|
||||
script_recording_delay = MDnextResponse_array[38];
|
||||
CalL_XC_a_NuMber = MDnextResponse_array[39];
|
||||
CalL_XC_b_NuMber = MDnextResponse_array[40];
|
||||
CalL_XC_c_NuMber = MDnextResponse_array[41];
|
||||
CalL_XC_d_NuMber = MDnextResponse_array[42];
|
||||
CalL_XC_e_NuMber = MDnextResponse_array[43];
|
||||
|
||||
timer_action = campaign_timer_action;
|
||||
timer_action_message = campaign_timer_action_message;
|
||||
@@ -6205,6 +6244,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
if (VDIC_data_VDIG[17].length > 5)
|
||||
{VDIC_web_form_address_two = VDIC_data_VDIG[17];}
|
||||
|
||||
var call_timer_action = VDIC_data_VDIG[18];
|
||||
|
||||
if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) )
|
||||
{
|
||||
timer_action = campaign_timer_action;
|
||||
timer_action_message = campaign_timer_action_message;
|
||||
timer_action_seconds = campaign_timer_action_seconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
var call_timer_action_message = VDIC_data_VDIG[19];
|
||||
var call_timer_action_seconds = VDIC_data_VDIG[20];
|
||||
timer_action = call_timer_action;
|
||||
timer_action_message = call_timer_action_message;
|
||||
timer_action_seconds = call_timer_action_seconds;
|
||||
}
|
||||
|
||||
CalL_XC_c_NuMber = VDIC_data_VDIG[21];
|
||||
CalL_XC_d_NuMber = VDIC_data_VDIG[22];
|
||||
CalL_XC_e_NuMber = VDIC_data_VDIG[23];
|
||||
|
||||
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
|
||||
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
|
||||
{VDIC_fronter = " Fronter: " + VDIC_data_VDFR[0] + " - " + VDIC_data_VDFR[1];}
|
||||
@@ -6281,22 +6341,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
document.vicidial_form.rank.value = check_VDIC_array[44];
|
||||
document.vicidial_form.owner.value = check_VDIC_array[45];
|
||||
script_recording_delay = check_VDIC_array[46];
|
||||
var call_timer_action = check_VDIC_array[47];
|
||||
|
||||
if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) )
|
||||
{
|
||||
timer_action = campaign_timer_action;
|
||||
timer_action_message = campaign_timer_action_message;
|
||||
timer_action_seconds = campaign_timer_action_seconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
var call_timer_action_message = check_VDIC_array[48];
|
||||
var call_timer_action_seconds = check_VDIC_array[49];
|
||||
timer_action = call_timer_action;
|
||||
timer_action_message = call_timer_action_message;
|
||||
timer_action_seconds = call_timer_action_seconds;
|
||||
}
|
||||
|
||||
var gIndex = 0;
|
||||
if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;}
|
||||
@@ -6374,7 +6418,20 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
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') )
|
||||
if (prepopulate_transfer_preset_enabled > 0)
|
||||
{
|
||||
if (prepopulate_transfer_preset == 'PRESET_1')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_2')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_3')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_4')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
|
||||
if (prepopulate_transfer_preset == 'PRESET_5')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
|
||||
}
|
||||
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
|
||||
{
|
||||
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>";
|
||||
|
||||
@@ -6382,6 +6439,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_2')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_3')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_4')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
|
||||
if (quick_transfer_button == 'PRESET_5')
|
||||
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
|
||||
}
|
||||
|
||||
if (call_requeue_button > 0)
|
||||
@@ -7910,6 +7973,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
document.vicidial_form.conf_dtmf.value = CalL_XC_b_Dtmf;
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;
|
||||
}
|
||||
function DtMf_PreSet_c()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;
|
||||
}
|
||||
function DtMf_PreSet_d()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;
|
||||
}
|
||||
function DtMf_PreSet_e()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;
|
||||
}
|
||||
|
||||
function DtMf_PreSet_a_DiaL()
|
||||
{
|
||||
@@ -7923,6 +7998,21 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;
|
||||
basic_originate_call(CalL_XC_b_NuMber,'NO','YES',session_id,'YES','','1','0');
|
||||
}
|
||||
function DtMf_PreSet_c_DiaL()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;
|
||||
basic_originate_call(CalL_XC_c_NuMber,'NO','YES',session_id,'YES','','1','0');
|
||||
}
|
||||
function DtMf_PreSet_d_DiaL()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;
|
||||
basic_originate_call(CalL_XC_d_NuMber,'NO','YES',session_id,'YES','','1','0');
|
||||
}
|
||||
function DtMf_PreSet_e_DiaL()
|
||||
{
|
||||
document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;
|
||||
basic_originate_call(CalL_XC_e_NuMber,'NO','YES',session_id,'YES','','1','0');
|
||||
}
|
||||
|
||||
// ################################################################################
|
||||
// Show message that customer has hungup the call before agent has
|
||||
@@ -9372,22 +9462,31 @@ else
|
||||
WebFormRefresH('NO','YES');
|
||||
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
|
||||
}
|
||||
|
||||
if (timer_action == 'WEBFORM2')
|
||||
{
|
||||
WebFormTwoRefresH('NO','YES');
|
||||
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
|
||||
}
|
||||
|
||||
if (timer_action == 'D1_DIAL')
|
||||
{
|
||||
DtMf_PreSet_a_DiaL();
|
||||
}
|
||||
|
||||
if (timer_action == 'D2_DIAL')
|
||||
{
|
||||
DtMf_PreSet_b_DiaL();
|
||||
}
|
||||
if (timer_action == 'D3_DIAL')
|
||||
{
|
||||
DtMf_PreSet_c_DiaL();
|
||||
}
|
||||
if (timer_action == 'D4_DIAL')
|
||||
{
|
||||
DtMf_PreSet_d_DiaL();
|
||||
}
|
||||
if (timer_action == 'D5_DIAL')
|
||||
{
|
||||
DtMf_PreSet_e_DiaL();
|
||||
}
|
||||
|
||||
timer_action = 'NONE';
|
||||
}
|
||||
@@ -9650,7 +9749,7 @@ else
|
||||
{
|
||||
UpdateFieldsData();
|
||||
}
|
||||
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) )
|
||||
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
|
||||
{
|
||||
TimerActionRun();
|
||||
}
|
||||
@@ -10406,14 +10505,17 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
|
||||
<TR>
|
||||
<TD ALIGN=LEFT COLSPAN=4>
|
||||
<span STYLE="background-color: <?php echo $MAIN_COLOR ?>" id="DialBlindTransfer"><IMG SRC="./images/vdc_XB_blindtransfer_OFF.gif" border=0 alt="Dial Blind Transfer" style="vertical-align:middle"></span>
|
||||
|
||||
|
||||
<span STYLE="background-color: <?php echo $MAIN_COLOR ?>" id="DialWithCustomer"><a href="#" onclick="SendManualDial('YES');return false;"><IMG SRC="./images/vdc_XB_dialwithcustomer.gif" border=0 alt="Dial With Customer" style="vertical-align:middle"></a></span>
|
||||
|
||||
|
||||
<span STYLE="background-color: <?php echo $MAIN_COLOR ?>" id="ParkCustomerDial"><a href="#" onclick="xfer_park_dial();return false;"><IMG SRC="./images/vdc_XB_parkcustomerdial.gif" border=0 alt="Park Customer Dial" style="vertical-align:middle"></a></span>
|
||||
|
||||
<font class="body_tiny">
|
||||
<a href="#" onclick="DtMf_PreSet_a();return false;">D1</a>
|
||||
<a href="#" onclick="DtMf_PreSet_b();return false;">D2</a>
|
||||
<a href="#" onclick="DtMf_PreSet_c();return false;">D3</a>
|
||||
<a href="#" onclick="DtMf_PreSet_d();return false;">D4</a>
|
||||
<a href="#" onclick="DtMf_PreSet_e();return false;">D5</a>
|
||||
</font>
|
||||
|
||||
<span STYLE="background-color: <?php echo $MAIN_COLOR ?>" id="DialBlindVMail"><IMG SRC="./images/vdc_XB_ammessage_OFF.gif" border=0 alt="Blind Transfer VMail Message" style="vertical-align:middle"></span>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
# This page does a search against a standard vtiger CRM system. If the record
|
||||
# is not present, it will create a new one and send the agent's screen to that new page.
|
||||
#
|
||||
# This code is tested against vtiger 5.0.4
|
||||
# This code is tested against vtiger 5.0.4 and 5.1.0
|
||||
#
|
||||
# CHANGES
|
||||
# 60719-1615 - First version
|
||||
|
||||
Reference in New Issue
Block a user