Added several small options.php settings for agent and admin screens

Added highest_lead_id collection and display in system settings
Added code for hopper_hold_inserts system and campaign settings
Fixed dead call max issue within manual alt dialing in agent screen

git-svn-id: svn://192.168.202.10@3776 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2023-11-17 13:28:42 +00:00
parent b2f19e31a8
commit fd3dae330e
20 changed files with 374 additions and 101 deletions
+23 -1
View File
@@ -488,7 +488,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
##### Get the settings from system_settings #####
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets FROM system_settings;";
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id FROM system_settings;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -518,6 +518,7 @@ if ($sthArows > 0)
$SSlog_latency_gaps = $aryA[19];
$SSdemographic_quotas = $aryA[20];
$SSweekday_resets = $aryA[21];
$SShighest_lead_id = $aryA[22];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
@@ -5253,6 +5254,27 @@ if ($active_asterisk_server =~ /Y/)
system($launch . ' &');
}
}
$highest_lead_id=999999999;
$stmtA = "SELECT lead_id from vicidial_list order by lead_id desc limit 1;";
$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;
$highest_lead_id = $aryA[0];
}
$sthA->finish();
if ($highest_lead_id > $SShighest_lead_id)
{
$stmtA = "UPDATE system_settings SET highest_lead_id='$highest_lead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
if ($DBX) {print "Highest Lead ID updated: $highest_lead_id > $SShighest_lead_id \n";}
}
}
################################################################################
##### END Confirm Asterisk is running, and if not restart it from the screen
+25 -2
View File
@@ -60,6 +60,7 @@
# 180511-2018 - Added --YearYMDdatedir option
# 180616-2248 - Added --localdatedir option
# 230131-2321 - Allowed for handling of stereo gateway recordings
# 231116-0757 - Added --ftp-active option flag for Active (non-Passive) FTP connections
#
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
@@ -86,6 +87,7 @@ $file_limit = 1000;
$list_limit = 1000;
$FTPpersistent=0;
$FTPvalidate=0;
$FTPpassive=1;
### begin parsing run-time options ###
if (length($ARGV[0])>1)
@@ -106,7 +108,6 @@ if (length($ARGV[0])>1)
print " [--test] = test\n";
print " [--transfer-limit=XXX] = number of files to transfer before exiting\n";
print " [--list-limit=XXX] = number of files to list in the directory before moving on\n";
print " [--debugX] = super debug\n";
print " [--GSM] = copy GSM files\n";
print " [--MP3] = copy MPEG-Layer-3 files\n";
print " [--OGG] = copy OGG Vorbis files\n";
@@ -118,7 +119,6 @@ if (length($ARGV[0])>1)
print " [--YearYMDdatedir] = put into Year/YYYYMMDD dated directories\n";
print " [--localdatedir] = create dated directories inside of FTP directory on local server\n";
print " [--run-check] = concurrency check, die if another instance is running\n";
print " [--max-files=x] = maximum number of files to process, defaults to 100000\n";
print " [--ftp-server=XXX] = FTP server\n";
print " [--ftp-port=XXX] = FTP server port\n";
print " [--ftp-login=XXX] = FTP server login account\n";
@@ -126,6 +126,7 @@ if (length($ARGV[0])>1)
print " [--ftp-dir=XXX] = FTP server directory\n";
print " [--ftp-persistent] = Does not log out between every file transmission\n";
print " [--ftp-validate] = Checks for a file size on the file after transmission\n";
print " [--ftp-active] = Use Active (non-Passive) FTP connection\n";
print "\n";
exit;
}
@@ -287,6 +288,12 @@ if (length($ARGV[0])>1)
if ($DB > 0)
{print "\n----- FTP VALIDATE: $FTPvalidate -----\n\n";}
}
if ($args =~ /--ftp-active/i)
{
$FTPpassive=0;
if ($DB > 0)
{print "\n----- FTP ACTIVE(non-Passive) connection: 1 ($FTPpassive) -----\n\n";}
}
}
}
else
@@ -505,9 +512,25 @@ foreach(@FILES)
}
else
{
if ($FTPpassive > 0)
{
if($DBX){print STDERR "Connecting to FTP server in passive mode...\n";}
$ftp = Net::FTP->new("$VARFTP_host", Port => $VARFTP_port, Debug => $FTPdb);
}
else
{
if($DBX){print STDERR "Connecting to FTP server in active mode...\n";}
$ftp = Net::FTP->new("$VARFTP_host", Port => $VARFTP_port, Debug => $FTPdb, Passive => 0);
}
$ftp = Net::FTP->new("$VARFTP_host", Port => $VARFTP_port, Debug => $FTPdb);
$ftp->login("$VARFTP_user","$VARFTP_pass");
$ftp->cwd("$VARFTP_dir");
if ($FTPpassive < 1)
{
if($DBX){print STDERR "Forcing FTP connection to active mode...\n";}
$ftp->passive("0");
}
}
if ($NODATEDIR < 1)
{
+1 -1
View File
@@ -561,7 +561,7 @@ while ($master_loop < $CLIloops)
$hopper_ready_count=0;
$agents_loggedin_count=0;
### Find out how many leads are in the hopper from a specific campaign
$stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status='READY';";
$stmtA = "SELECT count(*) from vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
+19 -7
View File
@@ -155,9 +155,10 @@
# 230204-2144 - Added ability to use ALT na_call_url entries
# 230215-1534 - Fix for AGENTDIRECT No-Agent Call URL calls, Issue #1396
# 230223-0826 - Fix for enhanced_disconnect_logging=3 issue
# 231116-0911 - Added hopper_hold_inserts option
#
$build='230223-0826';
$build='231116-0911';
$script='AST_VDauto_dial';
### begin parsing run-time options ###
if (length($ARGV[0])>1)
@@ -336,7 +337,7 @@ $event_string='LOGGED INTO MYSQL SERVER ON 1 CONNECTION|';
#############################################
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active,queuemetrics_loginout,queuemetrics_addmember_enabled,queuemetrics_pause_type,enable_drop_lists,call_quota_lead_ranking,timeclock_end_of_day,allow_shared_dial,call_limit_24hour FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,outbound_autodial_active,queuemetrics_loginout,queuemetrics_addmember_enabled,queuemetrics_pause_type,enable_drop_lists,call_quota_lead_ranking,timeclock_end_of_day,allow_shared_dial,call_limit_24hour,hopper_hold_inserts FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -358,6 +359,7 @@ if ($sthArows > 0)
$timeclock_end_of_day = $aryA[12];
$allow_shared_dial = $aryA[13];
$SScall_limit_24hour = $aryA[14];
$SShopper_hold_inserts = $aryA[15];
}
$sthA->finish();
##### END QUEUEMETRICS LOGGING LOOKUP #####
@@ -953,7 +955,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$user_CIPct]=0;
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid,inbound_queue_no_dial,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,adaptive_dl_diff_target,dl_diff_target_method,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,scheduled_callbacks_auto_reschedule,call_quota_lead_ranking,dial_timeout_lead_container,drop_call_seconds,drop_action,drop_inbound_group,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two,incall_tally_threshold_seconds,auto_alt_threshold FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid,inbound_queue_no_dial,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,adaptive_dl_diff_target,dl_diff_target_method,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,scheduled_callbacks_auto_reschedule,call_quota_lead_ranking,dial_timeout_lead_container,drop_call_seconds,drop_action,drop_inbound_group,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two,incall_tally_threshold_seconds,auto_alt_threshold,hopper_hold_inserts FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1003,6 +1005,8 @@ while($one_day_interval > 0)
$DBIPcid_group_id_two[$user_CIPct] = $aryA[35];
$DBIPincall_tally_threshold_seconds[$user_CIPct] = $aryA[36];
$DBIPauto_alt_threshold[$user_CIPct] = $aryA[37];
$DBIPhopper_hold_inserts[$user_CIPct] = $aryA[38];
if ($SShopper_hold_inserts < 1) {$DBIPhopper_hold_inserts[$user_CIPct] = 'DISABLED';}
# check for Dial Timeout Lead override
if ( (length($DBIPdial_timeout_lead_container[$user_CIPct]) > 1) && ($DBIPdial_timeout_lead_container[$user_CIPct] !~ /^DISABLED$/i) )
@@ -2853,7 +2857,7 @@ while($one_day_interval > 0)
$VD_auto_alt_dial = 'NONE';
$VD_auto_alt_dial_statuses='';
$VD_call_quota_lead_ranking='DISABLED';
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_quota_lead_ranking,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold FROM vicidial_campaigns where campaign_id='$CLcampaign_id';";
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_quota_lead_ranking,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold,hopper_hold_inserts FROM vicidial_campaigns where campaign_id='$CLcampaign_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -2871,6 +2875,8 @@ while($one_day_interval > 0)
$VD_call_limit_24hour = $aryA[8];
$VD_call_limit_24hour_override = $aryA[9];
$VD_auto_alt_threshold = $aryA[10];
$VD_hopper_hold_inserts = $aryA[11];
if ($SShopper_hold_inserts < 1) {$VD_hopper_hold_inserts = 'DISABLED';}
}
$sthA->finish();
@@ -3282,7 +3288,9 @@ while($one_day_interval > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25',source='A';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &event_logger;
$aad_string = "$CLlead_id|$VD_alt_phone|$CLcampaign_id|ALT|25|hopper insert|"; &aad_output;
@@ -3386,7 +3394,9 @@ while($one_day_interval > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20',source='A';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &event_logger;
$aad_string = "$CLlead_id|$VD_address3|$CLcampaign_id|ADDR3|20|hopper insert|"; &aad_output;
@@ -3536,7 +3546,9 @@ while($one_day_interval > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$CLlead_id',campaign_id='$CLcampaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15',source='A';";
$affected_rows = $dbhA->do($stmtA);
$event_string = "-- VDH record inserted: |$affected_rows| |$stmtA|X$Xlast|$VD_altdial_id|"; &event_logger;
$aad_string = "$CLlead_id|$VD_altdial_phone|$CLcampaign_id|X$Xlast|15|hopper insert|"; &aad_output;
+6 -2
View File
@@ -53,6 +53,7 @@
# 220311-1922 - Added List CID Group Override option
# 220623-1622 - Added List dial_prefix override
# 230830-1056 - Changed outbound_calls_per_second max to allow up to 1000 CPS
# 231116-0916 - Added hopper_hold_inserts option
#
### begin parsing run-time options ###
@@ -218,7 +219,7 @@ $event_string='LOGGED INTO MYSQL SERVER ON 1 CONNECTION|';
&event_logger;
### Grab system_settings values from the database
$stmtA = "SELECT use_non_latin,call_limit_24hour FROM system_settings;";
$stmtA = "SELECT use_non_latin,call_limit_24hour,hopper_hold_inserts FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -227,6 +228,7 @@ if ($sthArows > 0)
@aryA = $sthA->fetchrow_array;
$non_latin = $aryA[0];
$SScall_limit_24hour = $aryA[1];
$SShopper_hold_inserts = $aryA[2];
}
$sthA->finish();
@@ -396,7 +398,9 @@ while($one_day_interval > 0)
$DBIPcid_group_id[$camp_CIPct] = $aryA[9];
$DBIPscheduled_callbacks_auto_reschedule[$camp_CIPct] = $aryA[10];
$DBIPdial_timeout_lead_container[$camp_CIPct] = $aryA[11];
$DBIPcid_group_id_two[$camp_CIPct] =$aryA[12];
$DBIPcid_group_id_two[$camp_CIPct] = $aryA[12];
$DBIPhopper_hold_inserts[$camp_CIPct] = $aryA[13];
if ($SShopper_hold_inserts < 1) {$DBIPhopper_hold_inserts[$camp_CIPct] = 'DISABLED';}
if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;}
else {$DBIPomitcode[$camp_CIPct] = 0;}
@@ -12,10 +12,11 @@
#
# CHANGELOG
# 230427-1424 - First build
# 231116-0921 - Added hopper_hold_inserts option
#
# constants
$build = '230427-1424';
$build = '231116-0921';
$script='demo_quota';
$DB=0; # Debug flag, set to 0 for no debug messages. Can be overriden with CLI --debug flag
$US='__';
@@ -1086,7 +1087,7 @@ foreach(@campaign_id)
if ($DBX) {print "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n";}
$hopper_begin_output .= "DQ List AUTO Resets enabled, checking hopper count: $demographic_quotas_list_resets[$i] \n";
$hopper_leads=0;
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY');";
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1523,7 +1524,7 @@ foreach(@campaign_id)
if ($ranked_leads > 0)
{
$hopper_leads=0;
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY');";
$stmtA="SELECT count(*) FROM vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
+35 -17
View File
@@ -22,7 +22,7 @@
# - S = Standard hopper load
# - D = Campaign Drop-Run
#
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 50810-1613 - Added database server variable definitions lookup
@@ -107,10 +107,11 @@
# 210719-1519 - Added additional state override methods for call_limit_24hour
# 220822-0938 - Change DNC check queries to put phone_number in double-quotes instead of single-quotes
# 230428-2017 - Added demographic_quotas code
# 231116-0821 - Added hopper_hold_inserts system and campaign settings options
#
# constants
$build = '230428-2017';
$build = '231116-0821';
$script='AST_VDhopper';
$DB=0; # Debug flag, set to 0 for no debug messages. Can be overriden with CLI --debug flag
$US='__';
@@ -362,7 +363,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
### Grab system_settings values from the database
$anyone_callback_inactive_lists='default';
$stmtA = "SELECT anyone_callback_inactive_lists,enable_international_dncs,daily_call_count_limit,use_non_latin,call_limit_24hour,UNIX_TIMESTAMP(call_limit_24hour_reset),UNIX_TIMESTAMP(NOW()) FROM system_settings;";
$stmtA = "SELECT anyone_callback_inactive_lists,enable_international_dncs,daily_call_count_limit,use_non_latin,call_limit_24hour,UNIX_TIMESTAMP(call_limit_24hour_reset),UNIX_TIMESTAMP(NOW()),hopper_hold_inserts FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -376,6 +377,7 @@ if ($sthArows > 0)
$SScall_limit_24hour = $aryA[4];
$SScall_limit_24hour_reset = $aryA[5];
$SScall_limit_24hour_now = $aryA[6];
$SShopper_hold_inserts = $aryA[7];
}
$sthA->finish();
@@ -636,7 +638,7 @@ if ($CBHOLD_count > 0)
$DNCL=0;
### look up callback DNC settings for campaign
$stmtA = "SELECT callback_dnc,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override FROM vicidial_campaigns where campaign_id='$CA_campaign_id[$CAu]';";
$stmtA = "SELECT callback_dnc,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,hopper_hold_inserts FROM vicidial_campaigns where campaign_id='$CA_campaign_id[$CAu]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -651,6 +653,8 @@ if ($CBHOLD_count > 0)
$VD_call_limit_24hour_scope = $aryA[5];
$VD_call_limit_24hour = $aryA[6];
$VD_call_limit_24hour_override = $aryA[7];
$VD_hopper_hold_inserts = $aryA[8];
if ($SShopper_hold_inserts < 1) {$VD_hopper_hold_inserts = 'DISABLED';}
}
$sthA->finish();
@@ -754,7 +758,9 @@ if ($CBHOLD_count > 0)
$event_string = "|CALLBACKS LISTACT|$affected_rows|";
&event_logger;
$stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]',user='',state=\"$CA_state[$CAu]\",priority='50',source='C',vendor_lead_code=\"$CA_vendor_lead_code[$CAu]\";";
$hopper_statusSQL='';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_statusSQL = ",status='RHOLD'";}
$stmtA = "INSERT INTO $vicidial_hopper SET lead_id='$CA_lead_id[$CAu]',campaign_id='$CA_campaign_id[$CAu]',list_id='$CA_list_id[$CAu]',gmt_offset_now='$CA_gmt_offset_now[$CAu]',user='',state=\"$CA_state[$CAu]\",priority='50',source='C',vendor_lead_code=\"$CA_vendor_lead_code[$CAu]\"$hopper_statusSQL;";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {print "ANYONE Scheduled Callback Inserted into hopper: $affected_rows|$CA_lead_id[$CAu]\n";}
}
@@ -837,7 +843,7 @@ if ($hopper_dnc_count > 0)
$VD_campaign_id = $AAD_campaign_id[$aad];
$VD_lead_id = $AAD_lead_id[$aad];
### look up auto-alt-dial settings for campaign
$stmtA = "SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override FROM vicidial_campaigns where campaign_id='$AAD_campaign_id[$aad]';";
$stmtA = "SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,hopper_hold_inserts FROM vicidial_campaigns where campaign_id='$AAD_campaign_id[$aad]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -852,6 +858,8 @@ if ($hopper_dnc_count > 0)
$VD_call_limit_24hour_scope = $aryA[5];
$VD_call_limit_24hour = $aryA[6];
$VD_call_limit_24hour_override = $aryA[7];
$VD_hopper_hold_inserts = $aryA[8];
if ($SShopper_hold_inserts < 1) {$VD_hopper_hold_inserts = 'DISABLED';}
}
$sthA->finish();
@@ -947,7 +955,9 @@ if ($hopper_dnc_count > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "UPDATE $vicidial_hopper SET status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25' where hopper_id='$AAD_hopper_id[$aad]';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "UPDATE $vicidial_hopper SET status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25' where hopper_id='$AAD_hopper_id[$aad]';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {$event_string = "-- VDH record updated: |$affected_rows| |$stmtA|"; &event_logger;}
$aad_string = "$AAD_lead_id[$aad]|$VD_alt_phone|$AAD_campaign_id[$aad]|ALT|25|hopper insert|"; &aad_output;
@@ -1055,7 +1065,9 @@ if ($hopper_dnc_count > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "UPDATE $vicidial_hopper SET status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20' where hopper_id='$AAD_hopper_id[$aad]';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "UPDATE $vicidial_hopper SET status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20' where hopper_id='$AAD_hopper_id[$aad]';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {$event_string = "-- VDH record updated: |$affected_rows| |$stmtA|"; &event_logger;}
$aad_string = "$AAD_lead_id[$aad]|$VD_address3|$AAD_campaign_id[$aad]|ADDR3|20|hopper insert|"; &aad_output;
@@ -1207,7 +1219,9 @@ if ($hopper_dnc_count > 0)
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "UPDATE $vicidial_hopper SET status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15' where hopper_id='$AAD_hopper_id[$aad]';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "UPDATE $vicidial_hopper SET status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15' where hopper_id='$AAD_hopper_id[$aad]';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {$event_string = "-- VDH record updated: |$affected_rows| |$stmtA|X$Xlast|$VD_altdial_id|"; &event_logger;}
$aad_string = "$AAD_lead_id[$aad]|$VD_altdial_phone|$AAD_campaign_id[$aad]|X$Xlast|15|hopper insert|"; &aad_output;
@@ -1277,11 +1291,11 @@ $ANY_hopper_vlc_dup_check='N';
if (length($CLIcampaign)>1)
{
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary,call_count_limit,hopper_vlc_dup_check,use_other_campaign_dnc,callback_dnc,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,demographic_quotas,demographic_quotas_container from vicidial_campaigns where campaign_id IN('$CLIcampaign');";
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary,call_count_limit,hopper_vlc_dup_check,use_other_campaign_dnc,callback_dnc,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,demographic_quotas,demographic_quotas_container,hopper_hold_inserts from vicidial_campaigns where campaign_id IN('$CLIcampaign');";
}
else
{
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary,call_count_limit,hopper_vlc_dup_check,use_other_campaign_dnc,callback_dnc,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,demographic_quotas,demographic_quotas_container from vicidial_campaigns where active='Y';";
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary,call_count_limit,hopper_vlc_dup_check,use_other_campaign_dnc,callback_dnc,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,demographic_quotas,demographic_quotas_container,hopper_hold_inserts from vicidial_campaigns where active='Y';";
}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -1330,6 +1344,8 @@ while ($sthArows > $rec_count)
$demographic_quotas[$rec_count] = $aryA[34];
$demographic_quotas_container[$rec_count] = $aryA[35];
$demographic_quotasSQL[$rec_count] = '';
$hopper_hold_inserts[$rec_count] = $aryA[36];
if ($SShopper_hold_inserts < 1) {$hopper_hold_inserts[$rec_count] = 'DISABLED';}
if ( ($demographic_quotas[$rec_count] =~ /ENABLED|COMPLETE/) && ( (length($demographic_quotas_container[$rec_count]) > 0) && ($demographic_quotas_container[$rec_count] !~ /DISABLED/) ) )
{$demographic_quotasSQL[$rec_count] = "and rank!='-9999'";}
@@ -1398,7 +1414,7 @@ while ($sthArows > $rec_count)
{
if ($DB) { print "---------------Auto Trim Hopper Enabled For $campaign_id[$rec_count]---------------------\n"; }
$stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY') and source IN('S','N');";
$stmtB = "SELECT COUNT(*) FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' and status IN ('READY','RHOLD') and source IN('S','N');";
$sthB = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhA->errstr;
@aryLead = $sthB->fetchrow_array;
@@ -1414,7 +1430,7 @@ while ($sthArows > $rec_count)
if ( $camp_leads > ( 2 * $hopper_level[$rec_count] ) )
{
$num_to_delete = $camp_leads - 2 * $hopper_level[$rec_count];
$stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY') LIMIT $num_to_delete";
$stmtB = "DELETE FROM $vicidial_hopper WHERE campaign_id='$campaign_id[$rec_count]' AND source='S' AND status IN ('READY','RHOLD') LIMIT $num_to_delete";
$affected_rows = $dbhA->do($stmtB);
if ($DB)
@@ -2196,7 +2212,7 @@ foreach(@campaign_id)
### Find out how many leads are READY in the hopper from a specific campaign
$hopper_ready_count=0;
$stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status='READY';";
$stmtA = "SELECT count(*) from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('READY','RHOLD');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -3616,13 +3632,15 @@ foreach(@campaign_id)
{
if ( ($DCCLlead == '0') && ($TFHCCLlead == '0') )
{
$stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state,priority,source,vendor_lead_code) values('$leads_to_hopper[$h]','$campaign_id[$i]','READY','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]',\"$state_to_hopper[$h]\",'$hopperPRIORITY','$source_to_hopper[$h]',\"$vlc_to_hopper[$h]\");";
$hopper_status='READY';
if ($hopper_hold_inserts[$i] =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO $vicidial_hopper (lead_id,campaign_id,status,user,list_id,gmt_offset_now,state,priority,source,vendor_lead_code) values('$leads_to_hopper[$h]','$campaign_id[$i]','$hopper_status','','$lists_to_hopper[$h]','$gmt_to_hopper[$h]',\"$state_to_hopper[$h]\",'$hopperPRIORITY','$source_to_hopper[$h]',\"$vlc_to_hopper[$h]\");";
$affected_rows = $dbhA->do($stmtA);
$DBinserted = ($DBinserted + $affected_rows);
if ($DBX) {print "LEAD INSERTED: $affected_rows|$leads_to_hopper[$h]|\n";}
if ($DB_detail)
{
$detail_string = "|$campaign_id[$i]|$leads_to_hopper[$h]|$phone_to_hopper[$h]|$state_to_hopper[$h]|$gmt_to_hopper[$h]|$status_to_hopper[$h]|$modify_to_hopper[$h]|$user_to_hopper[$h]|$vlc_to_hopper[$h]|$source_to_hopper[$h]|$phone_code_to_hopper[$h]|$postal_code_to_hopper[$h]|";
$detail_string = "|$campaign_id[$i]|$leads_to_hopper[$h]|$phone_to_hopper[$h]|$state_to_hopper[$h]|$gmt_to_hopper[$h]|$status_to_hopper[$h]|$modify_to_hopper[$h]|$user_to_hopper[$h]|$vlc_to_hopper[$h]|$source_to_hopper[$h]|$phone_code_to_hopper[$h]|$postal_code_to_hopper[$h]|$hopper_status|";
&detail_logger;
}
}
@@ -3645,7 +3663,7 @@ foreach(@campaign_id)
if ($DBX) {print "LEAD INSERTED AS DNC: $affected_rows|$leads_to_hopper[$h]|\n";}
if ($DB_detail)
{
$detail_string = "|$campaign_id[$i]|$leads_to_hopper[$h]|$phone_to_hopper[$h]|$state_to_hopper[$h]|$gmt_to_hopper[$h]|$status_to_hopper[$h]|$modify_to_hopper[$h]|$user_to_hopper[$h]|$vlc_to_hopper[$h]|$source_to_hopper[$h]|$phone_code_to_hopper[$h]|$postal_code_to_hopper[$h]|";
$detail_string = "|$campaign_id[$i]|$leads_to_hopper[$h]|$phone_to_hopper[$h]|$state_to_hopper[$h]|$gmt_to_hopper[$h]|$status_to_hopper[$h]|$modify_to_hopper[$h]|$user_to_hopper[$h]|$vlc_to_hopper[$h]|$source_to_hopper[$h]|$phone_code_to_hopper[$h]|$postal_code_to_hopper[$h]|DNC|";
&detail_logger;
}
}
+14
View File
@@ -524,6 +524,20 @@ if (!$T)
if (!$Q) {print " - OPTIMIZE vicidial_users \n";}
$stmtA = "OPTIMIZE table system_settings;";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
if (!$Q) {print " - OPTIMIZE system_settings \n";}
### Gather active servers from the database
$stmtA = "SELECT server_ip,server_id FROM servers where active='Y' and active_asterisk_server='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+53 -10
View File
@@ -97,6 +97,7 @@
# 220118-2207 - Added auto_alt_threshold campaign & list settings
# 221221-2134 - Added enhanced_disconnect_logging=3 support , issue #1367
# 230120-1557 - Added CAMPDTO dialplan variable for ^DC 3-way agent screen calls
# 231116-0846 - Added hopper_hold_inserts option
#
# defaults for PreFork
@@ -883,6 +884,21 @@ sub process_request
if ($park_abandon < 1)
{
$highest_lead_id=999999999;
$highest_lead_id_test=999999999;
### Grab highest lead_id value from vicidial_list
$stmtA = "SELECT highest_lead_id 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;
$highest_lead_id = $aryA[0];
$highest_lead_id_test = ($highest_lead_id + 10000);
}
$sthA->finish();
if ($request =~ /--HVcauses--/i)
{
$HVcauses=1;
@@ -1396,11 +1412,17 @@ sub process_request
if (length($VDL_status) > 0)
{
$stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDADaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update: |$VDADaffected_rows|$CIDlead_id"; &agi_output;}
if ($CIDlead_id < $highest_lead_id_test)
{
$stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDADaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update 1: |$VDADaffected_rows|$CIDlead_id"; &agi_output;}
}
else
{
if ($AGILOG) {$agi_string = "-- VDAD highest_lead_id test failed: |$highest_lead_id|$highest_lead_id_test|$CIDlead_id"; &agi_output;}
}
$stmtA = "UPDATE vicidial_auto_calls set status='$VDAC_status' where callerid = '$callerid';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$VDACaffected_rows = $dbhA->do($stmtA);
@@ -1962,7 +1984,7 @@ sub process_request
$stmtA = "UPDATE vicidial_list set status='DROP' where lead_id = '$VD_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update: |$affected_rows|$VD_lead_id"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update 2: |$affected_rows|$VD_lead_id"; &agi_output;}
}
else
{
@@ -2063,11 +2085,24 @@ sub process_request
}
}
### Grab system_settings values from the database
$anyone_callback_inactive_lists='default';
$stmtA = "SELECT hopper_hold_inserts 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;
$SShopper_hold_inserts = $aryA[0];
}
$sthA->finish();
### check to see if campaign has alt_dial or call quotas enabled
$VD_auto_alt_dial = 'NONE';
$VD_auto_alt_dial_statuses='';
$VD_call_quota_lead_ranking='DISABLED';
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_quota_lead_ranking,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold FROM vicidial_campaigns where campaign_id='$VD_campaign_id';";
$stmtA="SELECT auto_alt_dial,auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,call_quota_lead_ranking,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold,hopper_hold_inserts FROM vicidial_campaigns where campaign_id='$VD_campaign_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -2087,6 +2122,8 @@ sub process_request
$VD_call_limit_24hour = $aryA[8];
$VD_call_limit_24hour_override = $aryA[9];
$CLauto_alt_threshold = $aryA[10];
$VD_hopper_hold_inserts = $aryA[11];
if ($SShopper_hold_inserts < 1) {$VD_hopper_hold_inserts = 'DISABLED';}
$epc_countCAMPDATA++;
}
@@ -2217,7 +2254,9 @@ sub process_request
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ALT',user='',priority='25',source='A';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
if ($AGILOG) {$aad_string = "$VD_lead_id|$VD_alt_phone|$VD_campaign_id|ALT|25|hopper insert|"; &aad_output;}
@@ -2323,7 +2362,9 @@ sub process_request
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='ADDR3',user='',priority='20',source='A';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|"; &agi_output;}
if ($AGILOG) {$aad_string = "$VD_lead_id|$VD_address3|$VD_campaign_id|ADDR3|20|hopper insert|"; &aad_output;}
@@ -2471,7 +2512,9 @@ sub process_request
}
if ($passed_24hour_call_count > 0)
{
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='READY',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15',source='A';";
$hopper_status='READY';
if ($VD_hopper_hold_inserts =~ /ENABLED/) {$hopper_status='RHOLD';}
$stmtA = "INSERT INTO vicidial_hopper SET lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',status='$hopper_status',list_id='$VD_list_id',gmt_offset_now='$VD_gmt_offset_now',state='$VD_state',alt_dial='X$Xlast',user='',priority='15',source='A';";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDH record inserted: |$affected_rows| |$stmtA|X$Xlast|$VD_altdial_id|"; &agi_output;}
if ($AGILOG) {$aad_string = "$VD_lead_id|$VD_altdial_phone|$VD_campaign_id|X$Xlast|15|hopper insert|"; &aad_output;}
@@ -379,7 +379,7 @@ CREATE TABLE vicidial_hopper (
hopper_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
lead_id INT(9) UNSIGNED NOT NULL,
campaign_id VARCHAR(8),
status ENUM('READY','QUEUE','INCALL','DONE','HOLD','DNC') default 'READY',
status ENUM('READY','QUEUE','INCALL','DONE','HOLD','DNC','RHOLD','RQUEUE') default 'READY',
user VARCHAR(20),
list_id BIGINT(14) UNSIGNED NOT NULL,
gmt_offset_now DECIMAL(4,2) DEFAULT '0.00',
@@ -1120,7 +1120,8 @@ custom_five TEXT,
dead_stop_recording ENUM('DISABLED','ALL_CALLS','OUTBOUND_ONLY','INBOUND_ONLY','AUTODIAL_ONLY','MANUAL_ONLY') default 'DISABLED',
manual_vm_status_updates ENUM('ENABLED','DISABLED') default 'ENABLED',
force_per_call_notes ENUM('DISABLED','ENABLED','5_CHARACTERS','15_CHARACTERS','30_CHARACTERS','100_CHARACTERS') default 'DISABLED',
agent_search_ingroup_list ENUM('DISABLED','ENABLED','ENABLED_OVERRIDE') default 'DISABLED'
agent_search_ingroup_list ENUM('DISABLED','ENABLED','ENABLED_OVERRIDE') default 'DISABLED',
hopper_hold_inserts ENUM('ENABLED','DISABLED') default 'DISABLED'
) ENGINE=MyISAM;
CREATE TABLE vicidial_lists (
@@ -2021,7 +2022,9 @@ demographic_quotas ENUM('0','1','2','3','4','5','6','7') default '0',
log_latency_gaps ENUM('0','1','2','3','4','5','6','7') default '1',
inbound_credits ENUM('0','1','2','3','4','5','6','7') default '0',
weekday_resets ENUM('0','1','2','3','4','5','6','7') default '0',
two_factor_auth_agent_hours SMALLINT(5) default '0'
two_factor_auth_agent_hours SMALLINT(5) default '0',
highest_lead_id VARCHAR(20) default '0',
hopper_hold_inserts ENUM('0','1','2','3','4','5','6','7') default '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -5442,4 +5445,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1698',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1699',db_schema_update_date=NOW(),reload_timestamp=NOW();
+10
View File
@@ -2431,3 +2431,13 @@ UPDATE system_settings SET db_schema_version='1697',db_schema_update_date=NOW()
ALTER TABLE system_settings ADD two_factor_auth_agent_hours SMALLINT(5) default '0';
UPDATE system_settings SET db_schema_version='1698',db_schema_update_date=NOW() where db_schema_version < 1698;
ALTER TABLE system_settings ADD highest_lead_id VARCHAR(20) default '0';
ALTER TABLE system_settings ADD hopper_hold_inserts ENUM('0','1','2','3','4','5','6','7') default '0';
ALTER TABLE vicidial_campaigns ADD hopper_hold_inserts ENUM('ENABLED','DISABLED') default 'DISABLED';
ALTER TABLE vicidial_hopper MODIFY status ENUM('READY','QUEUE','INCALL','DONE','HOLD','DNC','RHOLD','RQUEUE') default 'READY';
UPDATE system_settings SET db_schema_version='1699',db_schema_update_date=NOW() where db_schema_version < 1699;
@@ -29,6 +29,7 @@
# 230418-1548 - Added dial_override_limit option
# 230617-0815 - Added dead_logging_version option
# 231109-0830 - Changed link_to_grey_version to disabled by default
# 231115-1610 - Added allow_vlc_lookup, default_consultative
#
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
@@ -79,6 +80,8 @@ $login_submit_once = '1'; # set to 0 to remove the "disable the login submit bu
$astguiclient_disabled = '1'; # set to 0 to allow use of the astguiclient.php script
$dial_override_limit = '6'; # number of dial-override calls per minute that will lock user account, set to 0 to disable dial_override limit
$dead_logging_version = '0'; # experimental dead logging enabled, can reverse false DEAD call logging
$allow_vlc_lookup = '1'; # allow lead lookup by vendor_lead_code
$default_consultative = '0'; # set the CONSULTATIVE checkbox on the transfer panel be checked by default
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
+6 -3
View File
@@ -540,10 +540,11 @@
# 230801-0810 - More useful error output for manDiaLskip
# 230927-2037 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
# 231108-0819 - Added several fields to update_settings related to manual dial calls
# 231115-1851 - Added allow_vlc_lookup options.php setting
#
$version = '2.14-433';
$build = '231108-0819';
$version = '2.14-434';
$build = '231115-1851';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913;
@@ -867,6 +868,8 @@ $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
$user=preg_replace("/\'|\"|\\\\|;| /","",$user);
$pass=preg_replace("/\'|\"|\\\\|;| /","",$pass);
$allow_vlc_lookup = '1'; # allow lead lookup by vendor_lead_code
# if options file exists, use the override values for the above variables
# see the options-example.php file for more information
if (file_exists('options.php'))
@@ -2491,7 +2494,7 @@ if ($ACTION == 'manDiaLnextCaLL')
if (strlen($Scamp_lists)<2) {$Scamp_lists="''";}
$manual_dial_search_filterSQL = "and list_id IN($Scamp_lists)";
}
if (strlen($vendor_lead_code)>0)
if ( (strlen($vendor_lead_code)>0) and ($allow_vlc_lookup > 0) )
{
$stmt="SELECT lead_id FROM vicidial_list where vendor_lead_code=\"$vendor_lead_code\" $manual_dial_search_filterSQL order by modify_date desc LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);
+11 -3
View File
@@ -727,10 +727,11 @@
# 230927-2036 - Added agent_search_ingroup_list campaign and agent_search_list ingroup options
# 231108-0820 - Added several fields to update_settings related to manual dial calls
# 231109-0827 - Added 2FA for agent screen logins
# 231115-1618 - Added default_consultative options.php setting
#
$version = '2.14-693c';
$build = '231109-0827';
$version = '2.14-694c';
$build = '231115-1618';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=103;
@@ -1026,6 +1027,7 @@ $webphone_call_seconds = '0'; # set to 1 or higher to have the agent phone(if se
$user_pass_webform = '0'; # set to 1 or 2 to return to default of including the 'user'(1) and 'pass'(2) by default in webform URLs
$phone_login_webform = '0'; # set to 1 or 2 to return to default of including the 'phone_login'(1) and 'phone_pass'(2) by default in webform URLs
$login_submit_once = '1'; # set to 0 to remove the "disable the login submit button after submitting" feature
$default_consultative = '0'; # set the CONSULTATIVE checkbox on the transfer panel be checked by default
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen, FOR DEBUG ONLY
@@ -12853,6 +12855,12 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
else
{
// JCJ - 11/16/23 Reset dead call timer if it's active
if (dead_max > 0 && CheckDEADcallON > 0)
{
CheckDEADcallON=0;
CheckDEADcallCOUNT=0;
}
UpdatESettingS();
in_lead_preview_state=0;
inOUT = 'OUT';
@@ -23719,7 +23727,7 @@ if ($agent_display_dialable_leads > 0)
<img src="./images/<?php echo _QXZ("vdc_XB_channel.gif"); ?>" border="0" alt="channel" style="vertical-align:middle" /><input type="text" size="12" name="xferchannel" id="xferchannel" maxlength="200" class="cust_form" readonly="readonly" />
</td>
<td align="left">
<span id="consultative_checkbox"><input type="checkbox" name="consultativexfer" id="consultativexfer" size="1" value="0"><font class="body_tiny"> <?php echo _QXZ("CONSULTATIVE"); ?> &nbsp;</font></span>
<span id="consultative_checkbox"><input type="checkbox" name="consultativexfer" id="consultativexfer" size="1" value="0"<?php if ($default_consultative > 0) {echo " checked";} ?>><font class="body_tiny"> <?php echo _QXZ("CONSULTATIVE"); ?> &nbsp;</font></span>
</td>
<td align="left">
<span style="background-color: <?php echo $MAIN_COLOR ?><?php echo $agent_hide_hangup_ACTIVE_style ?>" id="HangupBothLines"><a href="#" onclick="bothcall_send_hangup('YES');return false;"><img src="./images/<?php echo _QXZ("vdc_XB_hangupbothlines.gif"); ?>" border="0" alt="Hangup Both Lines" style="vertical-align:middle" /></a></span>
@@ -1,7 +1,7 @@
<?php
# AST_VICIDIAL_hopperlist.php
#
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
#
@@ -31,6 +31,7 @@
# 210514-1615 - Added owner to DB=1 output
# 220301-1627 - Added allow_web_debug system setting
# 220812-0929 - Added User Group report permissions checking
# 231116-0928 - Added option to display RHOLD status hopper entries
#
$startMS = microtime();
@@ -48,6 +49,8 @@ if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
@@ -65,7 +68,7 @@ $isdst = date("I");
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,enable_languages,language_method,source_id_display,allow_web_debug FROM system_settings;";
$stmt = "SELECT use_non_latin,enable_languages,language_method,source_id_display,allow_web_debug,hopper_hold_inserts FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -77,6 +80,7 @@ if ($qm_conf_ct > 0)
$SSlanguage_method = $row[2];
$SSsource_id_display = $row[3];
$SSallow_web_debug = $row[4];
$SShopper_hold_inserts = $row[5];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -90,12 +94,14 @@ if ($non_latin < 1)
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
$group = preg_replace('/[^-_0-9a-zA-Z]/', '', $group);
$status = preg_replace('/[^-_0-9a-zA-Z]/', '', $status);
}
else
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW);
$group = preg_replace('/[^-_0-9\p{L}]/u', '', $group);
$status = preg_replace('/[^-_0-9\p{L}]/u', '', $status);
}
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
@@ -314,9 +320,14 @@ echo "<TITLE>"._QXZ("Hopper List Report")."</TITLE></HEAD><BODY BGCOLOR=WHITE ma
require("admin_header.php");
if (strlen($status) < 1) {$status='READY';}
$statusSQL = "and vicidial_hopper.status IN('READY')";
if ($status == 'READY_and_HOLD') {$statusSQL = "and vicidial_hopper.status IN('READY','RHOLD')";}
if ($status == 'HOLD') {$statusSQL = "and vicidial_hopper.status IN('RHOLD')";}
echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
echo "<SELECT SIZE=1 NAME=group>\n";
echo _QXZ("Campaign").": <SELECT SIZE=1 NAME=group>\n";
$o=0;
while ($campaigns_to_print > $o)
{
@@ -324,14 +335,24 @@ while ($campaigns_to_print > $o)
else {echo "<option value=\"$campaign_id[$o]\">$campaign_id[$o] - $campaign_name[$o]</option>\n";}
$o++;
}
echo "</SELECT>\n";
echo "</SELECT> &nbsp; \n";
if ($SShopper_hold_inserts > 0)
{
echo _QXZ("Status").": <SELECT SIZE=1 NAME=status>\n";
echo "<option value=\"READY\">"._QXZ("READY")."</option>\n";
echo "<option value=\"HOLD\">"._QXZ("HOLD")."</option>\n";
echo "<option value=\"READY_and_HOLD\">"._QXZ("READY_and_HOLD")."</option>\n";
echo "<option selected value=\"$status\">"._QXZ("$status")."</option>\n";
echo "</SELECT> &nbsp; \n";
}
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
echo " &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href=\"./admin.php?ADD=34&campaign_id=$group\">"._QXZ("MODIFY")."</a> \n";
echo "</FORM>\n\n";
echo "<PRE><FONT SIZE=2>\n\n";
if (!$group)
{
echo "\n\n";
@@ -354,6 +375,23 @@ else
echo _QXZ("Total leads in hopper right now").": $TOTALcalls\n";
if ($status == 'READY_and_HOLD')
{
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysqli_real_escape_string($link, $group) . "' and status='READY' $LOGallowed_campaignsSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysqli_fetch_row($rslt);
$hopperREADY = sprintf("%10s", $row[0]);
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysqli_real_escape_string($link, $group) . "' and status='RHOLD' $LOGallowed_campaignsSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysqli_fetch_row($rslt);
$hopperHOLD = sprintf("%10s", $row[0]);
echo " "._QXZ("READY leads in hopper right now").": $hopperREADY \n";
echo " "._QXZ("HOLD leads in hopper right now").": $hopperHOLD \n";
}
##############################
######### LEAD STATS
@@ -366,7 +404,7 @@ else
$SIDline="| "._QXZ("SOURCE ID",20)." ";
}
echo "\n";
echo "---------- "._QXZ("LEADS IN HOPPER")."\n";
echo "---------- $status "._QXZ("LEADS IN HOPPER")."\n";
echo "+------+--------+-----------+------------+-------------+---------+-------+--------+-------+--------+--------+-------+-------+----------------------$SIDhead+----------+-----------+\n";
if ($DB)
{
@@ -378,7 +416,7 @@ else
}
echo "+------+--------+-----------+------------+-------------+---------+-------+--------+-------+--------+--------+-------+-------+----------------------$SIDhead+----------+-----------+\n";
$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority,vicidial_hopper.source,vicidial_hopper.vendor_lead_code, phone_code,UNIX_TIMESTAMP(entry_date),UNIX_TIMESTAMP(last_local_call_time),source_id,vicidial_list.rank,vicidial_list.owner from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysqli_real_escape_string($link, $group) . "' and vicidial_hopper.status='READY' and vicidial_hopper.lead_id=vicidial_list.lead_id $LOGallowed_campaignsSQL order by priority desc,hopper_id limit 5000;";
$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority,vicidial_hopper.source,vicidial_hopper.vendor_lead_code, phone_code,UNIX_TIMESTAMP(entry_date),UNIX_TIMESTAMP(last_local_call_time),source_id,vicidial_list.rank,vicidial_list.owner from vicidial_hopper,vicidial_list where vicidial_hopper.campaign_id='" . mysqli_real_escape_string($link, $group) . "' $statusSQL and vicidial_hopper.lead_id=vicidial_list.lead_id $LOGallowed_campaignsSQL order by priority desc,hopper_id limit 5000;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$users_to_print = mysqli_num_rows($rslt);
@@ -131,10 +131,11 @@
# 230421-0107 - Added AGENTlatency display
# 230421-1636 - Added RS_UGlatencyRESTRICT options.php setting
# 230811-1530 - Added realtime monitoring display information
# 231115-1656 - Added RS_no_DEAD_status and RS_hide_CUST_info options.php settings
#
$version = '2.14-116';
$build = '230811-1530';
$version = '2.14-117';
$build = '231115-1656';
$php_script='AST_timeonVDADall.php';
require("dbconnect_mysqli.php");
@@ -268,6 +269,8 @@ $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
# defaults
$RS_BargeSwap=0;
$RS_no_DEAD_status=0;
$RS_hide_CUST_info=0;
if (file_exists('options.php'))
{
@@ -3790,7 +3793,7 @@ if ($talking_to_print > 0)
$cust_source='';
while ($n < $calls_to_list)
{
if ( (preg_match("/$VAClead_ids[$n]/", $Alead_id[$j])) and (strlen($VAClead_ids[$n]) == strlen($Alead_id[$j])) and (strlen($VAClead_ids[$n] > 1)) )
if ( ( (preg_match("/$VAClead_ids[$n]/", $Alead_id[$j])) and (strlen($VAClead_ids[$n]) == strlen($Alead_id[$j])) and (strlen($VAClead_ids[$n] > 1)) ) and ($RS_hide_CUST_info < 1) )
{$custphone = $VACphones[$n];}
$n++;
}
@@ -3828,7 +3831,7 @@ if ($talking_to_print > 0)
}
}
if (($CUSTINFOdisplay>0 || ($CUSTPHONEdisplay>0 && $ShowCustPhoneCode)) && $Alead_id[$j]>0)
if ( (($CUSTINFOdisplay>0 || ($CUSTPHONEdisplay>0 && $ShowCustPhoneCode)) && $Alead_id[$j]>0) and ($RS_hide_CUST_info < 1) )
{
$custinfo_stmt="select * from vicidial_list where lead_id='".$Alead_id[$j]."' and phone_number='".$custphone."'";
$custinfo_rslt=mysql_to_mysqli($custinfo_stmt, $link);
@@ -3884,11 +3887,20 @@ if ($talking_to_print > 0)
{
if (!preg_match("/$Acallerid[$i]\|/",$callerids) && !preg_match("/EMAIL/i",$comments) && !preg_match("/CHAT/i",$comments))
{
$Acall_time[$i]=$Astate_change[$i];
if ($RS_no_DEAD_status > 0)
{
$Astatus[$i] = 'INCALL';
$Lstatus = 'INCALL';
$status = 'INCALL';
}
else
{
$Acall_time[$i]=$Astate_change[$i];
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = ' DEAD ';
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = ' DEAD ';
}
}
else
{
@@ -3929,11 +3941,20 @@ if ($talking_to_print > 0)
if ($left_chat > 0)
{
$Acall_time[$i]=$Astate_change[$i];
if ($RS_no_DEAD_status > 0)
{
$Astatus[$i] = 'CHAT';
$Lstatus = 'CHAT';
$status = 'CHAT';
}
else
{
$Acall_time[$i]=$Astate_change[$i];
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = 'DEAD C';
$Astatus[$i] = 'DEAD';
$Lstatus = 'DEAD';
$status = 'DEAD C';
}
}
}
}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
# version: 20231109083801
# version: 20231115223301
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length, unless the User Password Minimum Length system setting is enabled, which will require a longer password. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
@@ -164,6 +164,7 @@ campaigns-call_limit_24hour_override 24-Hour Called Count Limit Override <QXZ>If
campaigns-hopper_drop_run_trigger Hopper Drop-Run Trigger <QXZ>This setting, if activated, will ignore all hopper loading criteria for a single hopper run for this campaign and it will only load the DROP status leads from the active lists for the campaign into the hopper at the highest hopper priority, and once this single hopper run has happened, this setting will reset to N for this campaign and the hopper loading will go back to normal for the next minute when it runs. This process will also update any DROPs already in the hopper to the highest hopper priority if they are not already there. If the -All Drops- checkbox is checked, then any status with -DROP- in the status or status name will be selected, including all system statuses and campaign statuses whether they are for outbound or inbound calls. WARNING, when this runs it will not check to see if the lists have been reset, so you may be calling back DROP leads that were recently called. However, if the Drop Lockout Time has been enabled, that setting will be honored. Default is N, unselected, for inactive.</QXZ>
campaigns-drop_lockout_time Drop Lockout Time <QXZ>This is a number of hours that DROP abandon calls will be prevented from being dialed, to disable set to 0. This setting is very useful in countries like the UK where there are regulations preventing the attempted calling of customers within 72 hours of an Abandon, or DROP. Default is 0.</QXZ>
campaigns-force_reset_hopper Force Reset of Hopper <QXZ>This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs.</QXZ>
campaigns-hopper_hold_inserts Hopper Hold Inserts <QXZ>If enabled, this will insert leads into the hopper as a RHOLD status, so they can be activated by an outside process or utility. Default is DISABLED.</QXZ>
campaigns-dial_method Dial Method <QXZ>This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the beginning of the shift -as defined by Latest Server Time set for campaign- and gets more strict as the shift goes on, for example, if there are 10 hours or more left in the shift, the TAPERED feature will not affect the adaptive dial level at all, as the number of hours left in the shift drops below 10 hours and gets closer to 0, the dial level will be dropped closer and closer to 1.0 as time goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. INBOUND_MAN allows the agent to place manual dial calls from a campaign list while being able to take inbound calls between manual dial calls.</QXZ>
campaigns-auto_dial_level Auto Dial Level <QXZ>This is where you set how many lines the system should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise the system will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually.</QXZ>
campaigns-dial_level_threshold Auto Dial Level Threshold <QXZ>This setting only works with an ADAPT or RATIO Dial Method, and it must be set to something other than DISABLED and the number of agents setting must be above 0. This feature allows you to set a minimum number agents that predictive algorithm will work at. If the number of agents falls below the number that you have set, then the dial level will go to 1.0 until more agents log in or go into the selected state. LOGGED-IN_AGENTS will count all agents logged into the campaign, NON-PAUSED_AGENTS will only count agents that are waiting or talking, and WAITING_AGENTS will only count agents that are waiting for a call. Default is DISABLED.</QXZ>
@@ -1135,6 +1136,7 @@ settings-agent_script Agent Screen Script <QXZ>This is the PHP script page of th
settings-active_voicemail_server Active Voicemail Server <QXZ>In multi-server systems, this is the server that will handle all voicemail boxes. This server is also where the dial-in generated prompts will be uploaded from, the 8168 recordings. It is important that this server is both Active and an Active Asterisk server.</QXZ>
settings-allow_voicemail_greeting Allow Voicemail Greeting Chooser <QXZ>If this setting is enabled it will allow you to choose an audio file from the audio store to be played as the voicemail greeting to a specific voicemail box. Default is 0 for disabled.</QXZ>
settings-outbound_autodial_active Outbound Auto-Dial Active <QXZ>This option allows you to enable or disable outbound auto-dialing within the system, 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.</QXZ>
settings-hopper_hold_inserts Lead Hopper Hold Inserts Allowed <QXZ>If enabled, this setting will allow campaigns to be set to insert leads into the hopper as a RHOLD status so that they can be activated by a separate process. Default is 0 for disabled.</QXZ>
settings-allow_shared_dial Shared Agent Campaign Dialing <QXZ>This option will allow you to set SHARED campaign Dial Methods in order to share agents across multiple outbound campaigns. For more details on how to set this up properly, read the AGENT_MULTI-CAMPAIGN_DIALING.txt document. Default is 0 for disabled.</QXZ>
settings-agent_search_method Agent Search Method Override <QXZ>This option will allow you to override the agent search method that is defined in the dialplan on your dialers on a per in-group and-or per campaign basis. Setting this to -1- will enable the override for both in-groups and campaigns. -2- will enable only for in-groups. -3- will enable only for campaigns. Default is 0 for disabled. WARNING, we do not recommend enabling this setting, it can lead to greatly increased dropped calls if improperly used.</QXZ>
settings-ofcom_uk_drop_calc UK OFCOM Drop Calculation <QXZ>This option allows you to enable the new UK OFCOM Drop calculation formula for individual campaigns. As of December 2015, OFCOM in the UK changed their method for calculating the drop,or abandon, percentage for an outbound dialing campaign. The new formula includes an estimate of the number of drops that were answering machines. They do this by using the agent-answered percentage of answering machines and subtracting that percentage from the number of drops. Then that new drop number is divided by the total agent-answered human-answered calls PLUS the number of drops. This differs in several ways from the way it had been done, as well as the way the drop percentage has been calculated in the USA and Canada. This new UK drop calculation method can be activated as a system setting AND a campaign option. Both must be enabled for the campaign to use the new method. In order for agent-statused answering machines to be calculated properly, we have added an answering machine status flag that is used to gather those statuses. Default is 0 for inactive.</QXZ>
@@ -38,6 +38,7 @@
# 230421-0220 - Added RS_AGENTlatency option
# 230421-1645 - Added RS_UGlatencyRESTRICT option
# 230926-0849 - Added camp_lead_order_random option
# 231115-1642 - Added vm_view_messages_link, RS_no_DEAD_status and RS_hide_CUST_info options
#
# used by the realtime_report.php script
@@ -89,6 +90,8 @@ $RS_agentWAIT = 3; # 3 or 4
$RS_INcolumnsHIDE = 0; # 0=no, 1=yes # whether to hide the 'HOLD' & 'IN-GROUP' columns in the agent detail section
$RS_DIDdesc = 0; # 0=no, 1=yes # whether to show a 'DID DESCRIPTION' column in the agent detail section
$RS_report_default_format = ''; # 'TEXT', 'HTML' or '': If set, this will override the System Setting for this report only
$RS_no_DEAD_status = 0; # set to 1 to disable DEAD satus in the Real-Time Report
$RS_hide_CUST_info = 0; # set to 1 to hide the show CUSTPHONE and CUSTINFO options in the Real-Time Report
$RS_AGENTlatency = 0; # 0=no, 1=yes, 2=all, 3=day, 4=now
$RS_UGlatencyRESTRICT = ''; # this can restrict the "LATENCY" features to only be accessible to users in set User Groups: "ADMIN|ADMIN2"
$RS_AGENTstatusTALLY = ''; # <any valid status>: If set, will look at the number of calls statused by the agent in this status for today
@@ -154,6 +157,9 @@ $camp_lead_order_random=1;
# set to 1 to hide the timeclock link on the welcome.php page
$hide_timeclock_link = '0';
# View Message link for Voicemail modify admin page, "voicemail_id" in URL will be replaced with current voicemail ID
$vm_view_messages_link = '';
# CORS settings: (to enable, customize the variables below, and uncomment the "require_once('adminCORS.php');" line at the bottom)
# (NOTE: The first 3 variables must be set for these features to be active)
$CORS_allowed_origin = ''; # if multiple origins allowed, separate them by a pipe (also allows PHP preg syntax)
+28 -12
View File
@@ -61,12 +61,13 @@
# 230421-0106 - Added AGENTlatency display
# 230421-1625 - Added RS_UGlatencyRESTRICT options.php setting
# 230811-1530 - Added monitoring display information
# 231115-1646 - Added RS_no_DEAD_status and RS_hide_CUST_info options.php settings
#
$startMS = microtime();
$version = '2.14-47';
$build = '230811-1530';
$version = '2.14-48';
$build = '231115-1646';
header ("Content-type: text/html; charset=utf-8");
@@ -194,8 +195,9 @@ $webphone_bufh = '1';
$webphone_pad = '10';
$webphone_clpos = "<BR> &nbsp; <a href=\"#\" onclick=\"hideDiv('webphone_content');\">"._QXZ("webphone")." -</a>";
$RS_ListenBarge = 'MONITOR|BARGE|WHISPER';
$RS_ListenBarge = 'MONITOR|BARGE|WHISPER';
$RS_no_DEAD_status=0;
$RS_hide_CUST_info=0;
if (file_exists('options.php'))
{
@@ -1820,6 +1822,10 @@ function update_variables(task_option,task_choice,force_reload)
if (MONITORdisplay == '1') {MONITORdisplay='0'; document.getElementById("MONITORdisplayTXT").innerHTML = "<?php echo _QXZ("SHOW MONITORS"); ?>";}
else {MONITORdisplay='1'; document.getElementById("MONITORdisplayTXT").innerHTML = "<?php echo _QXZ("HIDE MONITORS"); ?>";}
}
<?php
if ($RS_hide_CUST_info < 1)
{
?>
if (task_option == 'CUSTPHONEdisplay')
{
if (CUSTPHONEdisplay == '1')
@@ -1850,6 +1856,10 @@ function update_variables(task_option,task_choice,force_reload)
document.getElementById("CUSTPHONEdisplayTXT").innerHTML = "<?php echo _QXZ("SHOW CUSTPHONES"); ?>";
}
}
<?php
}
?>
if (task_option == 'ALLINGROUPstats')
{
if (ALLINGROUPstats == '1') {ALLINGROUPstats='0'; document.getElementById("ALLINGROUPstatsTXT").innerHTML = "<?php echo _QXZ("SHOW IN-GROUP STATS"); ?>";}
@@ -2226,16 +2236,22 @@ if (!preg_match("/WALL|LIMITED/",$report_display_type))
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('MONITORdisplay','');\"><font class=\"top_settings_val\"><span id=MONITORdisplayTXT>"._QXZ("HIDE MONITORS")."</span></font></a>";}
else
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('MONITORdisplay','');\"><font class=\"top_settings_val\"><span id=MONITORdisplayTXT>"._QXZ("SHOW MONITORS")."</span></font></a>";}
if ($CUSTPHONEdisplay>0)
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTPHONEdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTPHONEdisplayTXT>"._QXZ("HIDE CUSTPHONES")."</span></font></a>";}
else
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTPHONEdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTPHONEdisplayTXT>"._QXZ("SHOW CUSTPHONES")."</span></font></a>";}
if ($RS_hide_CUST_info < 1)
{
if ($CUSTPHONEdisplay>0)
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTPHONEdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTPHONEdisplayTXT>"._QXZ("HIDE CUSTPHONES")."</span></font></a>";}
else
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTPHONEdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTPHONEdisplayTXT>"._QXZ("SHOW CUSTPHONES")."</span></font></a>";}
}
if ($LOGuser_level >= $CUSTINFOminUL)
{
if ($CUSTINFOdisplay>0)
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTINFOdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTINFOdisplayTXT>"._QXZ("HIDE CUST INFO")."</span></font></a>";}
else
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTINFOdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTINFOdisplayTXT>"._QXZ("SHOW CUST INFO")."</span></font></a>";}
if ($RS_hide_CUST_info < 1)
{
if ($CUSTINFOdisplay>0)
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTINFOdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTINFOdisplayTXT>"._QXZ("HIDE CUST INFO")."</span></font></a>";}
else
{echo " &nbsp; &nbsp; &nbsp; <a href=\"#\" onclick=\"update_variables('CUSTINFOdisplay','');\"><font class=\"top_settings_val\"><span id=CUSTINFOdisplayTXT>"._QXZ("SHOW CUST INFO")."</span></font></a>";}
}
}
}