Added options to disable incomplete QC functionality and to hide outbound list dialing features in the admin interface.

Added patch for compatibility with Asterisk 1.4 and the Sangoma paraXip CPD (Call Progress Detection) software, as well as VICIDIAL options and programming to allow it to work with CPD

git-svn-id: svn://192.168.202.10@1044 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-02-02 11:40:59 +00:00
parent fa5272bc9a
commit 2d16f985a6
11 changed files with 1617 additions and 1006 deletions
+6
View File
@@ -237,6 +237,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
more accurate time zone encoding. The data is NOT included but can be
purchased from the VICIDIAL Group.
54. Added System Settings option to disable auto-dialing(list dialing) from the
system to simplify administration for inbound-only call centers
55. Added patch and configuration options to allow VICIDIAL to work with Sangoma
ParaXip CPD(Call Progress Detection)
+140 -14
View File
@@ -45,7 +45,7 @@
#exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT-----DNC)
#exten => 8366,5,Hangup
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 80218-2027 - First Build
@@ -58,12 +58,13 @@
# 81020-0235 - Fixed Drop hangup bug and other small bugs
# 81104-0255 - Changed code to alter callerIDnumber for remote agents to the number of the caller
# 81105-0424 - Added MySQL error logging
# 90202-0505 - Added CPD AMD detection and routing options
#
$script = 'agi-VDAD_ALL_outbound.agi';
$AGILOG = '0';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=53;
$mysql_log_count=55;
$one_mysql_log=0;
@@ -377,7 +378,7 @@ if ($affected_rows > 0)
$sthA->finish();
### Grab campaign values from the database
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -398,6 +399,8 @@ if ($affected_rows > 0)
$drop_inbound_group = "$aryA[6]";
$use_internal_dnc = "$aryA[7]";
$use_campaign_dnc = "$aryA[8]";
$cpd_amd_action = "$aryA[9]";
$am_message_exten = "$aryA[10]";
$rec_count++;
}
$sthA->finish();
@@ -876,17 +879,140 @@ if ($channel_status < 1)
}
}
$rec_countCUSTDATA=0;
$rec_countWAIT=0;
$cbc=0;
$aco_sub=0;
$agent_call_order='order by last_call_finish';
if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';}
if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by last_call_time';}
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';}
if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';}
if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';}
if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today';}
############# BEGIN CPD AMD SECTION ############################
if ($cpd_amd_action =~ /DISPO|MESSAGE/)
{
$stmtA = "SELECT count(*) FROM vicidial_cpd_log where callerid='$callerid' and result='Answering-Machine' and status='NEW';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01054'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$cpd_amd = "$aryA[0]";
}
$sthA->finish();
if ($cpd_amd > 0)
{
if ($AGILOG) {$agi_string = "CALL CPD AMD Detected $channel $callerid|$drop_timer"; &agi_output;}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$Fhour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$CIDdate = "$mon$mday$hour$min$sec";
$tsSQLdate = "$year$mon$mday$hour$min$sec";
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
if ($enable_queuemetrics_logging > 0)
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
or die "Couldn't connect to database: " . DBI->errstr;
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='EXITWITHTIMEOUT',data1='1',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01048'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$callerid',queue='$VDADcampaign',agent='NONE',verb='CALLSTATUS',data1='AA',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='01049'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
}
if ($drop_seconds < 1)
{
$drop_seconds = $DROP_TIME;
}
if ($cpd_amd_action =~ /MESSAGE/)
{
if (length($am_message_exten)>0)
{$DROPexten = "$am_message_exten";}
}
$Euniqueid=$uniqueid;
$Euniqueid =~ s/\.\d+//gi;
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='AA',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='AGENT' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01050'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD CPD vicidial_log update: |$affected_rows|$uniqueid"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='AA' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01051'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD CPD vicidial_list update: |$affected_rows|$CIDlead_id"; &agi_output;}
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01052'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAD CPD vac record deleted: |$affected_rows|$VDADcampaign|"; &agi_output;}
$stmtA = "UPDATE vicidial_cpd_log SET status='PROCESSED',cpd_seconds='$drop_timer' where callerid='$callerid' and result='Answering-Machine' and status='NEW';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01055'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
### use STDOUT to send call to proper DROP location
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
$AGI->stream_file('ding'); # stop music-on-hold process
sleep(1);
if ($AGILOG) {$agi_string = "exiting the VDAD app, CPD transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
checkresult($result);
print "SET EXTENSION $DROPexten\n";
checkresult($result);
print "SET PRIORITY 1\n";
checkresult($result);
}
else
{
### insert a NEW record to the vicidial_manager table to be processed
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Hangup','$VHqueryCID','Channel: $channel','','','','','','','','','')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01053'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL call_hungup CPD timout: |$CIDlead_id|$VHqueryCID|$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;}
$AGI->hangup();
}
}
}
############# END CPD AMD SECTION ############################
$rec_countCUSTDATA=0;
$rec_countWAIT=0;
$cbc=0;
$aco_sub=0;
$agent_call_order='order by last_call_finish';
if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';}
if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by last_call_time';}
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';}
if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';}
if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';}
if ($CAMP_callorder =~ /fewest_calls/i) {$aco_sub=1; $agent_call_order = 'order by calls_today';}
##### Attempt to send call to an agent on this server only #####
+25 -10
View File
@@ -73,6 +73,7 @@
# 81013-2216 - Fixed improper deletion of auto_calls records
# 81020-0125 - Bug fixes from changes to auto_calls deletion changes
# 90124-0721 - Added parameter to ensure no auto-dial calls are placed for MANUAL campaigns
# 90202-0203 - Added outbound_autodial_active option to halt all dialing
#
@@ -229,21 +230,22 @@ $sthA->finish();
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$enable_queuemetrics_logging = "$aryA[0]";
$queuemetrics_server_ip = "$aryA[1]";
$queuemetrics_dbname = "$aryA[2]";
$queuemetrics_login= "$aryA[3]";
$queuemetrics_pass = "$aryA[4]";
$queuemetrics_log_id = "$aryA[5]";
$rec_count++;
@aryA = $sthA->fetchrow_array;
$enable_queuemetrics_logging = "$aryA[0]";
$queuemetrics_server_ip = "$aryA[1]";
$queuemetrics_dbname = "$aryA[2]";
$queuemetrics_login= "$aryA[3]";
$queuemetrics_pass = "$aryA[4]";
$queuemetrics_log_id = "$aryA[5]";
$outbound_autodial_active = "$aryA[6]";
$rec_count++;
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -311,6 +313,19 @@ while($one_day_interval > 0)
$campaigns_update = '';
$CPcount=0;
#############################################
##### Check if auto-dialing is enabled
$stmtA = "SELECT outbound_autodial_active FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$outbound_autodial_active = "$aryA[0]";
}
$sthA->finish();
##### Get a listing of the users that are active and ready to take calls
##### Also get a listing of the campaigns and campaigns/serverIP that will be used
$stmtA = "SELECT user,server_ip,campaign_id,conf_exten,status FROM vicidial_live_agents where status IN($active_agents) and server_ip='$server_ip' and last_update_time > '$BDtsSQLdate' order by last_call_time";
@@ -699,7 +714,7 @@ while($one_day_interval > 0)
$user_CIPct = 0;
foreach(@DBIPcampaign)
{
if ($DBIPdial_method[$user_CIPct] =~ /MANUAL|INBOUND_MAN/)
if ( ($DBIPdial_method[$user_CIPct] =~ /MANUAL|INBOUND_MAN/) || ($outbound_autodial_active < 1) )
{
$event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: MANUAL DIAL CAMPAIGN, NO DIALING";
&event_logger;
+34 -2
View File
@@ -308,7 +308,7 @@ while($one_day_interval > 0)
}
##### parse through all other important events #####
if ( ($input_lines[$ILcount] =~ /State: Ringing|State: Up|State: Dialing|Event: Newstate|Event: Hangup|Event: Newcallerid|Event: Shutdown/) && ($input_lines[$ILcount] !~ /ZOMBIE/) )
if ( ($input_lines[$ILcount] =~ /State: Ringing|State: Up|State: Dialing|Event: Newstate|Event: Hangup|Event: Newcallerid|Event: Shutdown|Event: CPD-Result/) && ($input_lines[$ILcount] !~ /ZOMBIE/) )
{
$input_lines[$ILcount] =~ s/^\n|^\n\n//gi;
@command_line=split(/\n/, $input_lines[$ILcount]);
@@ -552,7 +552,39 @@ while($one_day_interval > 0)
# }
# }
}
if ($input_lines[$ILcount] =~ /Event: CPD-Result/)
{
# Event: CPD-Result
# Privilege: system,all
# ChannelDriver: SIP
# Channel: SIP/paraxip-out-08291448
# CallerIDName: V0202034729000030735
# Uniqueid: 1233564450.141
# Result: Answering-Machine
if ( ($command_line[3] =~ /^Channel: /i) && ($command_line[5] =~ /^Uniqueid: /i) )
{
&get_time_now;
$channel = $command_line[3];
$channel =~ s/Channel: |\s*$//gi;
$callid = $command_line[4];
$callid =~ s/CallerIDName: |\s*$//gi;
$uniqueid = $command_line[5];
$uniqueid =~ s/Uniqueid: |\s*$//gi;
$result = $command_line[6];
$result =~ s/Result: |\s*$//gi;
if (length($result)>0)
{
$lead_id = substr($callid, 11, 9);
$lead_id = ($lead_id + 0);
$stmtA = "INSERT INTO vicidial_cpd_log set channel='$channel', uniqueid='$uniqueid', callerid='$callid', server_ip='$server_ip', lead_id='$lead_id', event_date='$now_date', result='$result';";
print STDERR "|$stmtA|\n";
my $affected_rows = $dbhA->do($stmtA);
if($DB){print "|$affected_rows CPD_log inserted|\n";}
}
}
}
}
$ILcount++;
}
@@ -609,7 +609,8 @@ web_form_target VARCHAR(100) NOT NULL default 'vdcwebform',
vtiger_search_category VARCHAR(100) default 'LEAD',
vtiger_create_call_record ENUM('Y','N') default 'Y',
vtiger_create_lead_record ENUM('Y','N') default 'Y',
vtiger_screen_login ENUM('Y','N') default 'Y'
vtiger_screen_login ENUM('Y','N') default 'Y',
cpd_amd_action ENUM('DISABLED','DISPO','MESSAGE') default 'DISABLED'
);
CREATE TABLE vicidial_lists (
@@ -1046,7 +1047,9 @@ vtiger_server_ip VARCHAR(15),
vtiger_dbname VARCHAR(50),
vtiger_login VARCHAR(50),
vtiger_pass VARCHAR(50),
vtiger_url VARCHAR(255)
vtiger_url VARCHAR(255),
qc_features_active ENUM('1','0') default '0',
outbound_autodial_active ENUM('1','0') default '1'
);
CREATE TABLE vicidial_campaigns_list_mix (
@@ -1349,6 +1352,21 @@ longitude VARCHAR(17)
CREATE INDEX areaprefix on vicidial_nanpa_prefix_codes (areacode,prefix);
CREATE TABLE vicidial_cpd_log (
cpd_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100) NOT NULL,
uniqueid VARCHAR(20),
callerid VARCHAR(20),
server_ip VARCHAR(15) NOT NULL,
lead_id INT(9) UNSIGNED,
event_date DATETIME,
result VARCHAR(20),
status ENUM('NEW','PROCESSED') default 'NEW',
cpd_seconds DECIMAL(7,2) default '0',
index(uniqueid),
index(callerid),
index(lead_id)
);
ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP;
@@ -1437,7 +1455,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1127';
UPDATE system_settings SET db_schema_version='1128';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+23
View File
@@ -659,3 +659,26 @@ longitude VARCHAR(17)
CREATE INDEX areaprefix on vicidial_nanpa_prefix_codes (areacode,prefix);
UPDATE system_settings SET db_schema_version='1127';
ALTER TABLE system_settings ADD qc_features_active ENUM('1','0') default '0';
ALTER TABLE system_settings ADD outbound_autodial_active ENUM('1','0') default '1';
CREATE TABLE vicidial_cpd_log (
cpd_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100) NOT NULL,
uniqueid VARCHAR(20),
callerid VARCHAR(20),
server_ip VARCHAR(15) NOT NULL,
lead_id INT(9) UNSIGNED,
event_date DATETIME,
result VARCHAR(20),
status ENUM('NEW','PROCESSED') default 'NEW',
cpd_seconds DECIMAL(7,2) default '0',
index(uniqueid),
index(callerid),
index(lead_id)
);
ALTER TABLE vicidial_campaigns ADD cpd_amd_action ENUM('DISABLED','DISPO','MESSAGE') default 'DISABLED';
UPDATE system_settings SET db_schema_version='1128';
@@ -0,0 +1,32 @@
--- ./channels/chan_sip.c 2008-12-23 11:33:09.000000000 -0500
+++ ./channels/chan_sip.c 2009-02-02 03:43:48.000000000 -0500
@@ -6964,6 +6964,7 @@
char tmp2[SIPBUFSIZE/2];
const char *l = NULL, *n = NULL;
const char *urioptions = "";
+ const char *paraxipcpd = ";cpd=on"; /* string used to enable ParaXip's CPD */
if (ast_test_flag(&p->flags[0], SIP_USEREQPHONE)) {
const char *s = p->username; /* being a string field, cannot be NULL */
@@ -7050,6 +7051,9 @@
if (p->options && !ast_strlen_zero(p->options->uri_options))
ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
+ /* Tell ParaXip to enable CPD */
+ ast_build_string(&invite, &invite_max, "%s", paraxipcpd);
+
ast_string_field_set(p, uri, invite_buf);
if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
@@ -12214,6 +12218,11 @@
ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
}
+ /* See what ParaXip had to say */
+ char cpd_result[SIPBUFSIZE];
+ ast_copy_string(cpd_result, get_header(req, "CPD-Result"), sizeof(cpd_result));
+ manager_event(EVENT_FLAG_SYSTEM, "CPD-Result", "ChannelDriver: SIP\r\nChannel: %s\r\nCallerIDName: %s\r\nUniqueid: %s\r\nResult: %s\r\n", p->owner->name, p->owner->cid.cid_name, p->owner->uniqueid, cpd_result);
+
/* Parse contact header for continued conversation */
/* When we get 200 OK, we know which device (and IP) to contact for this call */
/* This is important when we have a SIP proxy between us and the phone */
@@ -377,6 +377,16 @@ Vtiger Screen Login -<\/B> If Vtiger integration is enabled in the system settin
Vtiger Screen Login:||
Alert Enabled -<\/B> This field shows whether the agent has web browser alerts enabled for when calls come into their vicidial.php session. Default is 0 for NO||
Alert Enabled:||
QC Features Active -<\/B> This option allows you to enable or disable the QC or Quality Control features. Default is 0 for inactive||
Outbound Auto-Dial Active -<\/B> This option allows you to enable or disable outbound auto-dialing within VICIDIAL, setting this field to 0 will remove the LISTS and FILTERS sections and many fields from the Campaign Modification screens. Manual entry dialing will still be allowable from within the agent screen, but no list dialing will be possible. Default is 1 for active||
QC Features Active:||
Outbound Auto-Dial Active:||
Close Panel||
Choose Report Display Options||
To select more than 1 campaign, hold down the Ctrl key and click||
CPD AMD Action -<\/B> If you are using the Sangoma ParaXip Call Progress Detection software then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED||
CPD AMD Action:||
############################################################ CLIENT
+17 -5
View File
@@ -216,10 +216,11 @@
# 90120-1719 - Added API pause/resume and number dial functionality
# 90126-2302 - Added Vtiger login option and agent alert option
# 90128-0230 - Added vendor_lead_code to API dial and manuald dial with lookup
# 90202-0148 - Added option to disable BLENDED checkbox
#
$version = '2.0.5-195';
$build = '90128-0230';
$version = '2.0.5-196';
$build = '90202-0148';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=53;
$one_mysql_log=0;
@@ -294,7 +295,7 @@ $random = (rand(1000000, 9999999) + 10000000);
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration FROM system_settings;";
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -311,6 +312,7 @@ while ($i < $qm_conf_ct)
$timeclock_end_of_day = $row[5];
$vtiger_url = $row[6];
$enable_vtiger_integration = $row[7];
$outbound_autodial_active = $row[8];
$i++;
}
@@ -346,6 +348,7 @@ $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent log
$PhoneSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT DIAL by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -964,7 +967,7 @@ $VDloginDISPLAY=0;
}
if ($display_queue_count=='N')
{$callholdstatus='0';}
if ($dial_method == 'INBOUND_MAN')
if ( ($dial_method == 'INBOUND_MAN') or ($outbound_autodial_active < 1) )
{$VU_closer_default_blended=0;}
$closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns);
@@ -7935,7 +7938,14 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<table border=1 bgcolor="#CCFFCC" width=<?=$CAwidth ?> height=460><TR><TD align=center VALIGN=top> CLOSER INBOUND GROUP SELECTION <BR>
<span id="CloserSelectContent"> Closer Inbound Group Selection </span>
<input type=hidden name=CloserSelectList><BR>
<input type=checkbox name=CloserSelectBlended size=1 value="0"> BLENDED CALLING(outbound activated) <BR>
<?
if ( ($outbound_autodial_active > 0) and ($disable_blended_checkbox < 1) )
{
?>
<input type=checkbox name=CloserSelectBlended size=1 value="0"> BLENDED CALLING(outbound activated) <BR>
<?
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">RESET</a> |
<a href="#" onclick="CloserSelect_submit();return false;">SUBMIT</a>
<BR><BR><BR><BR> &nbsp;
@@ -7949,6 +7959,8 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<?
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> MY CALLBACK ONLY <BR>";}
if ( ($outbound_autodial_active < 1) or ($disable_blended_checkbox > 0) )
{echo "<input type=checkbox name=CloserSelectBlended size=1 value=\"0\"> BLENDED CALLING<BR>";}
?>
</span>
@@ -8,7 +8,7 @@
# STOP=4000, SLOW=40, GO=4 seconds refresh interval
#
# CHANGELOG:
# 50406-0920 - Added Paused agents < 1 min (Chris Doyle)
# 50406-0920 - Added Paused agents < 1 min
# 51130-1218 - Modified layout and info to show all servers in a vicidial system
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60511-1343 - Added leads and drop info at the top of the screen
@@ -43,8 +43,12 @@
# 81029-1706 - Added pause code display if enabled per campaign
# 81108-2337 - Added inbound-only section
# 90105-1153 - Changed monitor links to use 0 prefix instead of 6
# 90202-0108 - Changed options to pop-out frame, added outbound_autodial_active option
#
$version = '2.0.5-35';
$build = '90202-0108';
header ("Content-type: text/html; charset=utf-8");
require("dbconnect.php");
@@ -95,7 +99,7 @@ if (isset($_GET["with_inbound"])) {$with_inbound=$_GET["with_inbound"];}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin FROM system_settings;";
$stmt = "SELECT use_non_latin,outbound_autodial_active FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -104,6 +108,7 @@ while ($i < $qm_conf_ct)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
$outbound_autodial_active = $row[1];
$i++;
}
##### END SETTINGS LOOKUP #####
@@ -119,8 +124,14 @@ if (!isset($SERVdisplay)) {$SERVdisplay=1;} # 0=no, 1=yes
if (!isset($CALLSdisplay)) {$CALLSdisplay=1;} # 0=no, 1=yes
if (!isset($PHONEdisplay)) {$PHONEdisplay=0;} # 0=no, 1=yes
if (!isset($CUSTPHONEdisplay)) {$CUSTPHONEdisplay=0;} # 0=no, 1=yes
if (!isset($with_inbound)) {$with_inbound='N';} # N=no, Y=yes, O=only
if (!isset($PAUSEcodes)) {$PAUSEcodes='N';} # 0=no, 1=yes
if (!isset($with_inbound))
{
if ($outbound_autodial_active > 0)
{$with_inbound='N';} # N=no, Y=yes, O=only
else
{$with_inbound='O';} # N=no, Y=yes, O=only
}
$ingroup_detail='';
if (strlen($group)>1) {$groups[0] = $group; $RR=40;}
@@ -229,8 +240,8 @@ else
# $group_SQL = "group_id IN($group_SQL)";
}
if ( (eregi('ALL-ACTIVE',$group_string)) and ($with_inbound=='O') )
{$with_inbound='N';}
#if ( (eregi('ALL-ACTIVE',$group_string)) and ($with_inbound=='O') and ($outbound_autodial_active > 0) )
# {$with_inbound='N';}
$stmt="select * from vicidial_user_groups;";
$rslt=mysql_query($stmt, $link);
@@ -251,7 +262,7 @@ $NFB = '<b><font size=6 face="courier">';
$NFE = '</font></b>';
$F=''; $FG=''; $B=''; $BG='';
$select_list = "<TABLE WIDTH=200 CELLPADDING=5 BGCOLOR=\"#FFFF99\"><TR><TD>Select Campaigns:<BR>";
$select_list = "<TABLE WIDTH=200 CELLPADDING=5 BGCOLOR=\"#FFFF99\"><TR><TD>Select Campaigns: <BR>";
$select_list .= "<SELECT SIZE=10 NAME=groups[] multiple>";
$o=0;
while ($groups_to_print > $o)
@@ -263,11 +274,13 @@ $select_list .= "<SELECT SIZE=10 NAME=groups[] multiple>";
$o++;
}
$select_list .= "</SELECT>";
$select_list .= "<BR><a href=\"#\" onclick=\"closeDiv(\'campaign_select_list\');\">CLOSE PANEL</a>";
$select_list .= "</TD><TD>";
$select_list .= "<BR><font size=1>(To select more than 1 campaign, hold down the Ctrl key and click)<font>";
$select_list .= "</TD><TD VALIGN=TOP ALIGN=CENTER>";
$select_list .= "<a href=\"#\" onclick=\"closeDiv(\'campaign_select_list\');\">Close Panel</a><BR><BR>";
if ($UGdisplay > 0)
{
$select_list .= "Select User Group:<BR>";
$select_list .= "<SELECT SIZE=1 NAME=usergroup>";
$select_list .= "<option value=\"\">ALL USER GROUPS</option>";
$o=0;
@@ -279,24 +292,29 @@ if ($UGdisplay > 0)
}
$select_list .= "</SELECT><BR><BR>";
}
if (!eregi('ALL-ACTIVE',$group_string))
{
$select_list .= " &nbsp; Inbound: <SELECT SIZE=1 NAME=with_inbound>";
$select_list .= "<option value=\"N\"";
if ($with_inbound=='N') {$select_list .= " selected";}
$select_list .= ">No</option>";
$select_list .= "<option value=\"Y\"";
if ($with_inbound=='Y') {$select_list .= " selected";}
$select_list .= ">Yes</option>";
$select_list .= "<option value=\"O\"";
if ($with_inbound=='O') {$select_list .= " selected";}
$select_list .= ">Only</option>";
$select_list .= "</SELECT><BR><BR>";
}
$select_list .= " &nbsp; Inbound: <SELECT SIZE=1 NAME=with_inbound>";
$select_list .= "<option value=\"N\"";
if ($with_inbound=='N') {$select_list .= " selected";}
$select_list .= ">No</option>";
$select_list .= "<option value=\"Y\"";
if ($with_inbound=='Y') {$select_list .= " selected";}
$select_list .= ">Yes</option>";
$select_list .= "<option value=\"O\"";
if ($with_inbound=='O') {$select_list .= " selected";}
$select_list .= ">Only</option>";
$select_list .= "</SELECT><BR><BR>";
$select_list .= "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> &nbsp; &nbsp; &nbsp; &nbsp; ";
$select_list .= "</TD></TR>";
$select_list .= "<TR><TD ALIGN=CENTER>";
$select_list .= "<font size=1> &nbsp; </font>";
$select_list .= "</TD>";
$select_list .= "<TD NOWRAP>";
$select_list .= "<font size=1>VERSION: $version &nbsp; BUILD: $build</font>";
$select_list .= "</TD></TR></TABLE>";
$open_list = "<TABLE WIDTH=335 CELLPADDING=1 BGCOLOR=\"#FFFF99\"><TR><TD ALIGN=CENTER><a href=\"#\" onclick=\"openDiv(\'campaign_select_list\');\">Choose Real-Time Display Options</a></TD></TR></TABLE>";
$open_list = "<TABLE WIDTH=250 CELLPADDING=1 BGCOLOR=\"#FFFF99\"><TR><TD ALIGN=CENTER><a href=\"#\" onclick=\"openDiv(\'campaign_select_list\');\">Choose Report Display Options</a></TD></TR></TABLE>";
?>
@@ -385,10 +403,10 @@ echo "<INPUT TYPE=HIDDEN NAME=SERVdisplay VALUE=\"$SERVdisplay\">\n";
echo "<INPUT TYPE=HIDDEN NAME=CALLSdisplay VALUE=\"$CALLSdisplay\">\n";
echo "<INPUT TYPE=HIDDEN NAME=PHONEdisplay VALUE=\"$PHONEdisplay\">\n";
echo "<INPUT TYPE=HIDDEN NAME=CUSTPHONEdisplay VALUE=\"$CUSTPHONEdisplay\">\n";
echo "VICIDIAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n";
echo "<span style=\"position:absolute;left:80px;top:4px;z-index:19;\" id=campaign_select_list>\n";
echo "<TABLE WIDTH=400 CELLPADDING=1 BGCOLOR=\"#FFFF99\"><TR><TD ALIGN=CENTER>\n";
echo "<a href=\"#\" onclick=\"openDiv('campaign_select_list');\">Choose Real-Time Display Options</a>";
echo "VICIDIAL Real-Time&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n";
echo "<span style=\"position:absolute;left:160px;top:3px;z-index:19;\" id=campaign_select_list>\n";
echo "<TABLE WIDTH=250 CELLPADDING=1 BGCOLOR=\"#FFFF99\"><TR><TD ALIGN=CENTER>\n";
echo "<a href=\"#\" onclick=\"openDiv('campaign_select_list');\">Choose Report Display Options</a>";
echo "</TD></TR></TABLE>\n";
echo "</span>\n";
echo "<a href=\"$PHP_SELF?RR=4000$groupQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&with_inbound=$with_inbound\">STOP</a> | ";
@@ -548,6 +566,11 @@ if (ereg('O',$with_inbound))
$stmtB="select sum(calls_today),sum(drops_today),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4),sum(hold_sec_stat_one),sum(hold_sec_stat_two),sum(hold_sec_answer_calls),sum(hold_sec_drop_calls),sum(hold_sec_queue_calls) from vicidial_campaign_stats where campaign_id IN ($closer_campaignsSQL);";
if (eregi('ALL-ACTIVE',$group_string))
{
$stmtB="select sum(calls_today),sum(drops_today),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4),sum(hold_sec_stat_one),sum(hold_sec_stat_two),sum(hold_sec_answer_calls),sum(hold_sec_drop_calls),sum(hold_sec_queue_calls) from vicidial_campaign_stats;";
}
$stmtC="select agent_non_pause_sec from vicidial_campaign_stats where campaign_id IN($group_SQL);";
@@ -700,9 +723,9 @@ else
}
else
{
$stmt="select avg(auto_dial_level),dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,max(hopper_level),dial_method,max(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),available_only_ratio_tally,max(adaptive_latest_server_time),local_call_time,max(dial_timeout),dial_statuses,agent_pause_codes_active from vicidial_campaigns where campaign_id IN($group_SQL);";
$stmt="select avg(auto_dial_level),max(dial_status_a),max(dial_status_b),max(dial_status_c),max(dial_status_d),max(dial_status_e),max(lead_order),max(lead_filter_id),max(hopper_level),max(dial_method),max(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),max(available_only_ratio_tally),max(adaptive_latest_server_time),max(local_call_time),max(dial_timeout),max(dial_statuses),max(agent_pause_codes_active) from vicidial_campaigns where campaign_id IN($group_SQL);";
$stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),status_category_1,sum(status_category_count_1),status_category_2,sum(status_category_count_2),status_category_3,sum(status_category_count_3),status_category_4,sum(status_category_count_4) from vicidial_campaign_stats where campaign_id IN($group_SQL);";
$stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats where campaign_id IN($group_SQL);";
}
}
if ($DB > 0) {echo "\n|$stmt|$stmtB|\n";}
File diff suppressed because it is too large Load Diff