diff --git a/UPGRADE b/UPGRADE index 85faebc8..b608b35e 100644 --- a/UPGRADE +++ b/UPGRADE @@ -772,6 +772,17 @@ OTHER CHANGES: modify the User Code field on the User Modify page, and it will change the User Code field to a pulldown menu. +217. Added "Show Confetti" campaign setting, allowing for confetti to be shown + to agents when they disposition a call as a SALE and/or a CALLBACK + flagged status. + +218. Added "Abandon Check Queue" feature, to catch dropped Call Menu calls that + are tagged with a Lead ID. For more information, see the bottom of the + INBOUND_CALLBACK_QUEUE.txt document. + +219. Added "Asterisk Restart URL" to the Modify Servers page, this can send a + URL request any time Asterisk is auto-restarted on that server. + diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index f18e4e39..f11c1aab 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -251,6 +251,7 @@ # 211106-1523 - Added in_queue_nanque options # 221116-1050 - Fix for long in-group dialstring extensions # 230204-0015 - Fix for vicidial_log_extended entries for multiple in-group calls in succession +# 230309-0950 - Added abandon_check_queue feature # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -271,6 +272,7 @@ $areacode_filter_run=0; $no_agent_no_queue_checked=0; +$now_date_epoch = time(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year = ($year + 1900); $mon++; @@ -283,7 +285,26 @@ if ($sec < 10) {$sec = "0$sec";} $hm = "$hour$min"; $hm = ($hm + 0); -$now_date_epoch = time(); +$epochFOURhoursAGO = ($now_date_epoch - 14400); +($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($epochFOURhoursAGO); +$Smon++; $Syear = ($Syear + 1900); +if ($Smon < 10) {$Smon = "0$Smon";} +if ($Smday < 10) {$Smday = "0$Smday";} +if ($Shour < 10) {$Shour = "0$Shour";} +if ($Smin < 10) {$Smin = "0$Smin";} +if ($Ssec < 10) {$Ssec = "0$Ssec";} +$timeFOURhoursAGO = "$Syear-$Smon-$Smday $Shour:$Smin:$Ssec"; + +$epochTWENTYFOURhoursAGO = ($now_date_epoch - 86400); +($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($epochTWENTYFOURhoursAGO); +$Smon++; $Syear = ($Syear + 1900); +if ($Smon < 10) {$Smon = "0$Smon";} +if ($Smday < 10) {$Smday = "0$Smday";} +if ($Shour < 10) {$Shour = "0$Shour";} +if ($Smin < 10) {$Smin = "0$Smin";} +if ($Ssec < 10) {$Ssec = "0$Ssec";} +$timeTWENTYFOURhoursAGO = "$Syear-$Smon-$Smday $Shour:$Smin:$Ssec"; + $start_epoch = $now_date_epoch; $now_date = "$year-$mon-$mday $hour:$min:$sec"; $CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec"; @@ -390,7 +411,7 @@ $sthA->finish(); ############################################# ##### START SYSTEM SETTINGS LOOKUP ##### -$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method FROM system_settings;"; +$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method,abandon_check_queue FROM system_settings;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -419,6 +440,7 @@ if ($sthArows > 0) $enable_drop_lists = $aryA[18]; $inbound_answer_config = $aryA[19]; $SSagent_search_method = $aryA[20]; + $SSabandon_check_queue = $aryA[21]; } $sthA->finish(); ##### END SYSTEM SETTINGS LOOKUP ##### @@ -2290,15 +2312,6 @@ if ($call_handle_method =~ /CLOSER|DIGITID$/) { ### find uniqueid of originating call ### $front_uniqueid=''; - $epochFOURhoursAGO = ($now_date_epoch - 14400); - ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($epochFOURhoursAGO); - $Smon++; $Syear = ($Syear + 1900); - if ($Smon < 10) {$Smon = "0$Smon";} - if ($Smday < 10) {$Smday = "0$Smday";} - if ($Shour < 10) {$Shour = "0$Shour";} - if ($Smin < 10) {$Smin = "0$Smin";} - if ($Ssec < 10) {$Ssec = "0$Ssec";} - $timeFOURhoursAGO = "$Syear-$Smon-$Smday $Shour:$Smin:$Ssec"; $stmtA = "SELECT uniqueid FROM vicidial_log_extended where call_date <= \"$SQLdate\" and call_date > \"$timeFOURhoursAGO\" and lead_id='$insert_lead_id' order by call_date desc limit 1;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; @@ -3865,6 +3878,24 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override $AGI->stream_file('sip-silence'); } + if ($SSabandon_check_queue > 0) + { + ### check for ACTIVE vicidial_abandon_check_queue records and set to CONNECTED if they exist + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id = '$insert_lead_id' and check_status IN('NEW','QUEUE','PROCESSING') and abandon_time > \"$timeTWENTYFOURhoursAGO\" order by abandon_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; + if ($AGILOG) {$agi_string = "-- VACQ connected 1: |$insert_lead_id|$affected_rows|$stmtA"; &agi_output;} + + if ($affected_rows < 1) + { + ### check for INACTIVE vicidial_abandon_check_queue records and set to CONNECTED if they exist + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id = '$insert_lead_id' and check_status IN('COMPLETE','REJECT','CONNECTED') and abandon_time > \"$timeTWENTYFOURhoursAGO\" order by abandon_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; + if ($AGILOG) {$agi_string = "-- VACQ connected 2: |$insert_lead_id|$affected_rows|$stmtA"; &agi_output;} + } + } + ### gather user details for max calls and filtered settings $max_inbound_calls=0; $stmtA = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$VDADuser';"; diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi index 07dba1df..b2d8aecb 100644 --- a/agi/agi-VDAD_ALL_outbound.agi +++ b/agi/agi-VDAD_ALL_outbound.agi @@ -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) 2022 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # changes: # 80218-2027 - First Build @@ -127,6 +127,7 @@ # 200915-2218 - Fixes for surveys with hash-star # 210907-1254 - Added KHOMP code (install JSON::PP Perl module and remove '#UC#' in the code to enable) # 220524-1746 - Changed SHARED_ campaign in-group transfers to use 'SRDROP' log status instead of 'DROP' +# 230309-0952 - Added abandon_check_queue feature # $script = 'agi-VDAD_ALL_outbound.agi'; @@ -168,6 +169,7 @@ $US='_'; $wav='.wav'; # get date/time +$now_date_epoch = time(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year = ($year + 1900); $Tyear = ($year - 2000); @@ -178,7 +180,16 @@ if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} -$now_date_epoch = time(); +$epochTWENTYFOURhoursAGO = ($now_date_epoch - 86400); +($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($epochTWENTYFOURhoursAGO); +$Smon++; $Syear = ($Syear + 1900); +if ($Smon < 10) {$Smon = "0$Smon";} +if ($Smday < 10) {$Smday = "0$Smday";} +if ($Shour < 10) {$Shour = "0$Shour";} +if ($Smin < 10) {$Smin = "0$Smin";} +if ($Ssec < 10) {$Ssec = "0$Ssec";} +$timeTWENTYFOURhoursAGO = "$Syear-$Smon-$Smday $Shour:$Smin:$Ssec"; + $now_date = "$year-$mon-$mday $hour:$min:$sec"; $CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec"; $start_time_epoch = $now_date_epoch; @@ -269,7 +280,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA ############################################# ##### Gather system_settings ##### -$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,agent_search_method FROM system_settings;"; +$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,agent_search_method,abandon_check_queue FROM system_settings;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -279,6 +290,7 @@ if ($sthArows > 0) $SSsip_event_logging = $aryA[0]; $SScall_quota_lead_ranking = $aryA[1]; $SSagent_search_method = $aryA[2]; + $SSabandon_check_queue = $aryA[3]; } $sthA->finish(); ########################################### @@ -3314,6 +3326,24 @@ while ($drop_timer <= $DROP_TIME) $dbhP=$dbhA; $mysql_count='01038'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; if ($AGILOG) {$agi_string = "-- VDAD XFER : |$affected_rows|update of vac table: $callerid\n|$stmtA|"; &agi_output;} + if ($SSabandon_check_queue > 0) + { + ### check for ACTIVE vicidial_abandon_check_queue records and set to CONNECTED if they exist + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id = '$CIDlead_id' and check_status IN('NEW','QUEUE','PROCESSING') and abandon_time > \"$timeTWENTYFOURhoursAGO\" order by abandon_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; + if ($AGILOG) {$agi_string = "-- VACQ connected 1: |$CIDlead_id|$affected_rows|$stmtA"; &agi_output;} + + if ($affected_rows < 1) + { + ### check for INACTIVE vicidial_abandon_check_queue records and set to CONNECTED if they exist + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id = '$CIDlead_id' and check_status IN('COMPLETE','REJECT','CONNECTED') and abandon_time > \"$timeTWENTYFOURhoursAGO\" order by abandon_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + $dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; + if ($AGILOG) {$agi_string = "-- VACQ connected 2: |$CIDlead_id|$affected_rows|$stmtA"; &agi_output;} + } + } + if ($enable_queuemetrics_logging > 0) { $dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass") diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl index 840c372d..1778ec39 100644 --- a/bin/ADMIN_keepalive_ALL.pl +++ b/bin/ADMIN_keepalive_ALL.pl @@ -159,9 +159,10 @@ # 220921-1255 - Added vicidial_user_logins_daily TEOD population # 221116-1157 - Added vicidial_long_extensions TEOD truncating # 230118-1623 - Added Playback audio then hangup extension +# 230309-0926 - Added ara_url for server asterisk reboots, daily rolling of vicidial_abandon_check_queue table # -$build = '230118-1623'; +$build = '230309-0926'; $DB=0; # Debug flag $teodDB=0; # flag to log Timeclock End of Day processes to log file @@ -1678,6 +1679,33 @@ if ($timeclock_end_of_day_NOW > 0) } + # roll of vicidial_abandon_check_queue records, keep only 1 day of records in active table + if (!$Q) {print "\nProcessing vicidial_abandon_check_queue table...\n";} + $stmtA = "INSERT IGNORE INTO vicidial_abandon_check_queue_archive SELECT * from vicidial_abandon_check_queue;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + $event_string = "$sthArows rows inserted into vicidial_abandon_check_queue_archive table"; + if (!$Q) {print "$event_string \n";} + if ($teodDB) {&teod_logger;} + + $rv = $sthA->err(); + if (!$rv) + { + $stmtA = "DELETE FROM vicidial_abandon_check_queue WHERE abandon_time < \"$RMSQLdate\";"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + $event_string = "$sthArows rows deleted from vicidial_abandon_check_queue table"; + if (!$Q) {print "$event_string \n";} + if ($teodDB) {&teod_logger;} + + $stmtA = "optimize table vicidial_abandon_check_queue;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + } + + # reset in-group closing_time_now_trigger trigger flag $stmtA = "UPDATE vicidial_inbound_groups SET closing_time_now_trigger='N' WHERE closing_time_now_trigger='Y';"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; @@ -4957,6 +4985,33 @@ if ($active_asterisk_server =~ /Y/) `$PATHhome/start_asterisk_boot.pl`; } + + ##### Get the ara_url for this server's server_ip ##### + $stmtA = "SELECT ara_url where server_ip='$server_ip';"; + if ($DB) {print "$stmtA\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $ara_url = $aryA[0]; + } + $sthA->finish(); + + # Call the ara_url + if ($ara_url ne '') + { + $ara_url =~ s/ /+/gi; + $ara_url =~ s/&/\\&/gi; + $launch = $PATHhome . "/AST_send_URL.pl"; + $launch .= " --SYSLOG" if ($SYSLOG); + $launch .= " --lead_id=0"; + $launch .= " --function=QM_SOCKET_SEND"; + $launch .= " --compat_url=" . $ara_url; + + system($launch . ' &'); + } } } ################################################################################ diff --git a/bin/AST_VDadapt.pl b/bin/AST_VDadapt.pl index 19d6ffc2..3d7a7410 100644 --- a/bin/AST_VDadapt.pl +++ b/bin/AST_VDadapt.pl @@ -6,7 +6,7 @@ # adjusts the auto_dial_level for vicidial adaptive-predictive campaigns. # gather call stats for campaigns and in-groups # -# Copyright (C) 2021 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # CHANGELOG # 60823-1302 - First build from AST_VDhopper.pl @@ -59,9 +59,10 @@ # 211022-1638 - Added incall_tally_threshold_seconds campaign feature # 212207-2207 - Added IQNANQ to drop SQL calculation queries # 211122-1457 - Fix for logging bug and modification to drop percentage calculation +# 230309-1009 - Added abandon_check_queue feature # -$build='212207-2207'; +$build='230309-1009'; # constants $DB=0; # Debug flag, set to 0 for no debug messages, On an active system this will generate lots of lines of output per minute $US='__'; @@ -318,7 +319,7 @@ $dbhB = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA if ($DBX) {print "CONNECTED TO DATABASE: $VARDB_server|$VARDB_database\n";} ##### gather relevent system settings -$stmtA = "SELECT cache_carrier_stats_realtime,ofcom_uk_drop_calc,call_quota_lead_ranking,use_non_latin,allow_shared_dial from system_settings;"; +$stmtA = "SELECT cache_carrier_stats_realtime,ofcom_uk_drop_calc,call_quota_lead_ranking,use_non_latin,allow_shared_dial,abandon_check_queue from system_settings;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -330,6 +331,7 @@ if ($sthArows > 0) $SScall_quota_lead_ranking = $aryA[2]; $non_latin = $aryA[3]; $SSallow_shared_dial = $aryA[4]; + $SSabandon_check_queue = $aryA[5]; } $sthA->finish(); @@ -358,6 +360,16 @@ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->finish(); +$stmtA = "INSERT IGNORE into vicidial_campaign_stats_debug SET campaign_id='--CALLBACK-QUEUE--',server_ip='ADAPT';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthA->finish(); + +$stmtA = "INSERT IGNORE into vicidial_campaign_stats_debug SET campaign_id='--ABANDON-QUEUE--',server_ip='ADAPT';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthA->finish(); + $stmtA = "INSERT IGNORE into vicidial_campaign_stats_debug (campaign_id,server_ip) select campaign_id,'SHARED' from vicidial_campaigns;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -1274,6 +1286,7 @@ while ($master_loop < $CLIloops) $sthA->finish(); if ($DB) {print "\nActive Inbound Callback Queue Entries: |$ICBQcountA|$stmtA|\n";} + $callback_debug = "\nActive Inbound Callback Queue Entries: |$ICBQcountA|\n"; if ($ICBQcountA > 0) { @@ -1640,6 +1653,8 @@ while ($master_loop < $CLIloops) $sthA->finish(); if ($DB) {print "\nOrphan SENDING Inbound Callback Queue Entries: |$ICBQcountS|$stmtA|\n";} + $callback_send_debug = "\nOrphan SENDING Inbound Callback Queue Entries: |$ICBQcountS|\n"; + $callback_debug = "$callback_debug$callback_send_debug"; if ($ICBQcountS > 0) { @@ -1649,6 +1664,8 @@ while ($master_loop < $CLIloops) if ($DBX) {$agi_string = "$ICBQaffected_rowsORPHAN|$stmtC|"; print "$agi_string\n";} } + $callback_debug_flag='--CALLBACK-QUEUE--'; + &callback_logger; } ########################################################## ##### END check for stuck SENDING inbound callback queue records ##### @@ -2074,6 +2091,378 @@ while ($master_loop < $CLIloops) ########################################################## + + + + ############################################################# + ##### BEGIN check for abandon_check_queue calls ##### + ############################################################# + if ( ( ($stat_count =~ /30$|80$/) || ($stat_count==1) ) && ($SSabandon_check_queue > 0) ) + { + $acq_rejected=0; + $acq_check_dead=0; + $acq_complete_dead=0; + $acq_active_call=0; + $hopper_insert_sent=0; + + $now_date_epoch = time(); + $epochTWENTYFOURhoursAGO = ($now_date_epoch - 86400); + ($Ssec,$Smin,$Shour,$Smday,$Smon,$Syear,$Swday,$Syday,$Sisdst) = localtime($epochTWENTYFOURhoursAGO); + $Smon++; $Syear = ($Syear + 1900); + if ($Smon < 10) {$Smon = "0$Smon";} + if ($Smday < 10) {$Smday = "0$Smday";} + if ($Shour < 10) {$Shour = "0$Shour";} + if ($Smin < 10) {$Smin = "0$Smin";} + if ($Ssec < 10) {$Ssec = "0$Ssec";} + $timeTWENTYFOURhoursAGO = "$Syear-$Smon-$Smday $Shour:$Smin:$Ssec"; + + $stmtA = "SELECT abandon_check_id,call_id,lead_id,abandon_time,reject_reason,check_status,UNIX_TIMESTAMP(abandon_time),phone_number,source from vicidial_abandon_check_queue where abandon_time > \"$timeTWENTYFOURhoursAGO\" and check_status IN('NEW','PROCESSING');"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQ=$sthA->rows; + $acq=0; + while ($sthArowsACQ > $acq) + { + @aryA = $sthA->fetchrow_array; + $Aabandon_check_id[$acq] = $aryA[0]; + $Acall_id[$acq] = $aryA[1]; + $Alead_id[$acq] = $aryA[2]; + $Aabandon_time[$acq] = $aryA[3]; + $Areject_reason[$acq] = $aryA[4]; + $Acheck_status[$acq] = $aryA[5]; + $Aabandon_timeEPOCH[$acq] = $aryA[6]; + $Aphone_number[$acq] = $aryA[7]; + $Asource[$acq] = $aryA[8]; + $acq++; + } + $sthA->finish(); + + if ($DB) {print "\nTotal abandon check queue calls: |$acq|$stmtA|\n";} + $callback_debug = "\nTotal abandon check queue calls: |$acq|\n"; + + if ($acq > 0) + { + $acq=0; + while ($sthArowsACQ > $acq) + { + ### see if lead is in the hopper right now + $VHcount=''; + $stmtA = "SELECT count(*) from vicidial_hopper where lead_id='$Alead_id[$acq]';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQh=$sthA->rows; + if ($sthArowsACQh > 0) + { + @aryA = $sthA->fetchrow_array; + $VHcount = $aryA[0]; + } + $sthA->finish(); + + if ($VHcount > 0) + { + # Update vicidial_abandon_check_queue record with REJECT status + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='REJECT', reject_reason='Lead already in hopper, process' where abandon_check_id='$Aabandon_check_id[$acq]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue UPDATED: $affected_rows|$stmtA|\n";} + $acq_rejected = ($acq_rejected + $affected_rows); + $callback_debug .= " Abandon Already in hopper REJECT: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + else + { + ### see if lead is in a call with an agent right now + $VLAcount=''; + $stmtA = "SELECT count(*) from vicidial_live_agents where lead_id='$Alead_id[$acq]';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQa=$sthA->rows; + if ($sthArowsACQa > 0) + { + @aryA = $sthA->fetchrow_array; + $VLAcount = $aryA[0]; + } + $sthA->finish(); + + if ($VLAcount > 0) + { + # Update vicidial_abandon_check_queue record with REJECT status + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='REJECT', reject_reason='Lead in agent call, process' where abandon_check_id='$Aabandon_check_id[$acq]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue UPDATED: $affected_rows|$stmtA|\n";} + $acq_rejected = ($acq_rejected + $affected_rows); + $callback_debug .= " Abandon AGENT CALL REJECT: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + else + { + ### see if lead is an active call right now + $VACcount=''; + $stmtA = "SELECT count(*) from vicidial_auto_calls where lead_id='$Alead_id[$acq]';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQc=$sthA->rows; + if ($sthArowsACQc > 0) + { + @aryA = $sthA->fetchrow_array; + $VACcount = $aryA[0]; + } + $sthA->finish(); + + if ($VACcount > 0) + { + if ($DBX) {print "vicidial_abandon_check ACTIVE CALL: $Alead_id[$acq]|$Aabandon_check_id[$acq]|$Acall_id[$acq]|$Aabandon_time[$acq]|\n";} + $acq_active_call++; + } + else + { + ### see if lead was handled by an agent after abandon + $VALcount=''; + $stmtA = "SELECT count(*) from vicidial_agent_log where lead_id='$Alead_id[$acq]' and event_time > \"$VDL_eighteen\" and talk_epoch > $Aabandon_timeEPOCH[$acq];"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQv=$sthA->rows; + if ($sthArowsACQv > 0) + { + @aryA = $sthA->fetchrow_array; + $VALcount = $aryA[0]; + } + $sthA->finish(); + + if ($VALcount > 0) + { + # Update vicidial_abandon_check_queue record with REJECT status + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='REJECT', reject_reason='Lead handled by agent, process' where abandon_check_id='$Aabandon_check_id[$acq]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue UPDATED agent: $affected_rows|$stmtA|\n";} + $acq_rejected = ($acq_rejected + $affected_rows); + $callback_debug .= " Abandon UPDATED, Agent REJECT: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + else + { + ### see if lead was recently in the live_inboud_log table (Y2281224360000140002) + $Alive_channel=0; + $Achannel=''; $Aserver_ip=''; $Acaller_id=''; $Astart_time=''; $Acomment_d=''; + $stmtA = "SELECT channel,server_ip,caller_id,start_time,comment_d from live_inbound_log where start_time > \"$VDL_hour\" and caller_id LIKE \"%$Alead_id[$acq]\" order by start_time desc limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQc=$sthA->rows; + if ($sthArowsACQc > 0) + { + @aryA = $sthA->fetchrow_array; + $Achannel = $aryA[0]; + $Aserver_ip = $aryA[1]; + $Acaller_id = $aryA[2]; + $Astart_time = $aryA[3]; + $Acomment_d = $aryA[4]; + } + $sthA->finish(); + + if ($sthArowsACQc > 0) + { + $stmtA = "SELECT count(*) from live_channels where server_ip='$Aserver_ip' and channel='$Achannel';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsACQlc=$sthA->rows; + if ($sthArowsACQlc > 0) + { + @aryA = $sthA->fetchrow_array; + $Alive_channel = $aryA[0]; + } + $sthA->finish(); + } + + if ($Alive_channel > 0) + { + if ($DBX) {print "vicidial_abandon_check ACTIVE CHANNEL: $Alead_id[$acq]|$Aabandon_check_id[$acq]|$Acall_id[$acq]|$Aabandon_time[$acq]|$Aserver_ip|$Achannel|\n";} + $acq_active_call++; + $callback_debug .= " Abandon ACTIVE CHANNEL: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + else + { + if ( ($Areject_reason[$acq] =~ /DeadCheck/) && ($Acheck_status[$acq] =~ /PROCESSING/) ) + { + ### call is dead, 2nd check, time to insert lead into hopper through the Non-Agent API update_lead function + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='COMPLETE', reject_reason='DEAD: |$now_date|$Aserver_ip|$Achannel' where abandon_check_id='$Aabandon_check_id[$acq]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue UPDATED, Complete: $affected_rows|$stmtA|\n";} + $acq_complete_dead = ($acq_complete_dead + $affected_rows); + $callback_debug .= " Abandon UPDATED, Complete DEAD: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + + ### find wget binary + $exit_no_wget=0; + $wgetbin = ''; + if ( -e ('/bin/wget')) {$wgetbin = '/bin/wget';} + else + { + if ( -e ('/usr/bin/wget')) {$wgetbin = '/usr/bin/wget';} + else + { + if ( -e ('/usr/local/bin/wget')) {$wgetbin = '/usr/local/bin/wget';} + else + { + if ($AGILOG) {$agi_string = "Can't find wget binary! Exiting..."; &agi_output;} + $exit_no_wget=1; + } + } + } + if ($exit_no_wget > 0) + { + if ($DB) {print "vicidial_abandon_check_queue ERROR, wget not found!\n";} + $callback_debug .= " Abandon ERROR: wget not found!\n"; + } + else + { + $abandon_hopper_url=''; + $stmtA= "SELECT container_entry from vicidial_settings_containers where container_id='ABANDON_HOPPER_URL';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsAHU=$sthA->rows; + if ($sthArowsAHU > 0) + { + @aryA = $sthA->fetchrow_array; + $abandon_hopper_url = $aryA[0]; + } + $sthA->finish(); + + if (length($abandon_hopper_url) < 5) + { + if ($DB) {print "vicidial_abandon_check_queue ERROR, ABANDON_HOPPER_URL not valid! |$abandon_hopper_url|\n";} + $callback_debug .= " Abandon ERROR: URL not valid! |$abandon_hopper_url|\n"; + } + else + { + $temp_lead_id = $Alead_id[$acq]; + $temp_phone_number = $Aphone_number[$acq]; + $temp_source = $Asource[$acq]; + $temp_call_id = $Acall_id[$acq]; + $temp_abandon_time = $Aabandon_time[$acq]; + $temp_reject_reason = $Areject_reason[$acq]; + $temp_check_status = $Acheck_status[$acq]; + $abandon_hopper_url =~ s/--A--lead_id--B--/$temp_lead_id/gi; + $abandon_hopper_url =~ s/--A--phone_number--B--/$temp_phone_number/gi; + $abandon_hopper_url =~ s/--A--source--B--/$temp_source/gi; + $abandon_hopper_url =~ s/--A--call_id--B--/$temp_call_id/gi; + $abandon_hopper_url =~ s/--A--abandon_time--B--/$temp_abandon_time/gi; + $abandon_hopper_url =~ s/--A--reject_reason--B--/$temp_reject_reason/gi; + $abandon_hopper_url =~ s/--A--check_status--B--/$temp_check_status/gi; + $abandon_hopper_url =~ s/ /+/gi; + $abandon_hopper_url =~ s/&/\\&/gi; + + ### insert a new url log entry + $SQL_log = "$abandon_hopper_url"; + $SQL_log =~ s/;|\||\\//gi; + $stmtA = "INSERT INTO vicidial_url_log SET uniqueid='$uniqueid',url_date='$now_date',url_type='abandonchk',url='$SQL_log',url_response='';"; + $affected_rows = $dbhA->do($stmtA); + $stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;"; + $sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $url_id = $aryA[0]; + } + $sthA->finish(); + + $url = $abandon_hopper_url; + $url =~ s/'/\\'/gi; + $url =~ s/"/\\"/gi; + + $secW = time(); + + `$wgetbin --no-check-certificate --output-document=/tmp/ASUBtmpD$US$url_id$US$secX --output-file=/tmp/ASUBtmpF$US$url_id$US$secX $url `; + + $secY = time(); + $response_sec = ($secY - $secW); + + open(Wdoc, "/tmp/ASUBtmpD$US$url_id$US$secX") || die "can't open /tmp/ASUBtmpD$US$url_id$US$secX: $!\n"; + @Wdoc = ; + close(Wdoc); + $i=0; + $Wdocline_cat=''; + foreach(@Wdoc) + { + $Wdocline = $Wdoc[$i]; + $Wdocline =~ s/\n|\r//gi; + $Wdocline =~ s/\t|\`|\"//gi; + $Wdocline_cat .= "$Wdocline"; + $i++; + } + if (length($Wdocline_cat) < 1) + { + $Wdocline_cat=''; + } + + open(Wfile, "/tmp/ASUBtmpF$US$url_id$US$secX") || die "can't open /tmp/ASUBtmpF$US$url_id$US$secX: $!\n"; + @Wfile = ; + close(Wfile); + $i=0; + $Wfileline_cat=''; + foreach(@Wfile) + { + $Wfileline = $Wfile[$i]; + $Wfileline =~ s/\n|\r/!/gi; + $Wfileline =~ s/\"|\`/'/gi; + $Wfileline =~ s/ |\t|\`//gi; + $Wfileline_cat .= "$Wfileline"; + $i++; + } + if (length($Wfileline_cat)<1) + {$Wfileline_cat='
';} + + ### update url log entry + $stmtA = "UPDATE vicidial_url_log SET url_response=\"$Wdocline_cat|$Wfileline_cat\",response_sec='$response_sec' where url_log_id='$url_id';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue SENT, vicidial_url_log: $url_id|$response_sec|\n";} + $hopper_insert_sent++; + $callback_debug .= " Abandon SENT: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + } + } + else + { + ### call is dead, 1st check, flag record + $stmtA = "UPDATE vicidial_abandon_check_queue SET check_status='PROCESSING', reject_reason='DeadCheck $now_date' where abandon_check_id='$Aabandon_check_id[$acq]';"; + $affected_rows = $dbhA->do($stmtA); + if ($DBX) {print "vicidial_abandon_check_queue UPDATED, Dead Check: $affected_rows|$stmtA|\n";} + $acq_check_dead = ($acq_check_dead + $affected_rows); + $callback_debug .= " Abandon UPDATED, Dead Check: $affected_rows|$acq|$Aabandon_check_id[$acq]|$Alead_id[$acq]\n"; + } + } + } + } + } + } + + $acq++; + if ($DB) + { + if ($acq =~ /10$/i) {print STDERR "0 $acq / $sthArowsACQ \r";} + if ($acq =~ /20$/i) {print STDERR "+ $acq / $sthArowsACQ \r";} + if ($acq =~ /30$/i) {print STDERR "| $acq / $sthArowsACQ \r";} + if ($acq =~ /40$/i) {print STDERR "\\ $acq / $sthArowsACQ \r";} + if ($acq =~ /50$/i) {print STDERR "- $acq / $sthArowsACQ \r";} + if ($acq =~ /60$/i) {print STDERR "/ $acq / $sthArowsACQ \r";} + if ($acq =~ /70$/i) {print STDERR "| $acq / $sthArowsACQ \r";} + if ($acq =~ /80$/i) {print STDERR "+ $acq / $sthArowsACQ \r";} + if ($acq =~ /90$/i) {print STDERR "0 $acq / $sthArowsACQ \r";} + if ($acq =~ /00$/i) + { + print "$acq / $sthArowsACQ ($acq_rejected|$acq_check_dead|$acq_complete_dead|$acq_active_call|$hopper_insert_sent| |$Alead_id[$acq]|$Aabandon_check_id[$acq]|$Acall_id[$acq]|$Aabandon_time[$acq]| \n"; + } + } + } + } + if ($DB) {print "Abandon check queue finished - calls: $acq rejected: $acq_rejected ($acq_check_dead|$acq_complete_dead|$acq_active_call|$hopper_insert_sent) \n";} + $callback_debug .= "\nAbandon check queue finished - calls: $acq rejected: $acq_rejected ($acq_check_dead|$acq_complete_dead|$acq_active_call|$hopper_insert_sent)\n"; + + $callback_debug_flag='--ABANDON-QUEUE--'; + &callback_logger; + } + ########################################################## + ##### END check for abandon_check_queue calls ##### + ########################################################## + + + usleep($CLIdelay*1000*1000); $stat_count++; @@ -2134,6 +2523,27 @@ sub adaptive_logger $adaptive_string=''; } + +sub callback_logger + { + if ($SYSLOG) + { + $VDHCLOGfile = "$PATHlogs/VDadaptive-$callback_debug_flag.$file_date"; + + ### open the log file for writing ### + open(Aout, ">>$VDHCLOGfile") + || die "Can't open $VDHCLOGfile: $!\n"; + print Aout "$now_date$adaptive_string\n"; + close(Aout); + } + + $stmtA = "UPDATE vicidial_campaign_stats_debug SET entry_time='$now_date',adapt_output='$callback_debug' where campaign_id='$callback_debug_flag' and server_ip='ADAPT';"; + $affected_rows = $dbhA->do($stmtA); + + $adaptive_string=''; + } + + sub get_time_now { $secX = time(); @@ -2189,6 +2599,15 @@ sub get_time_now if ($Vmday < 10) {$Vmday = "0$Vmday";} $VDL_one = "$Vyear-$Vmon-$Vmday $Vhour:$Vmin:$Vsec"; + ### get date-time of 18 hours ago ### + $VDL_eighteen = ($secX - (18 * 60 * 60)); + ($Vsec,$Vmin,$Vhour,$Vmday,$Vmon,$Vyear,$Vwday,$Vyday,$Visdst) = localtime($VDL_eighteen); + $Vyear = ($Vyear + 1900); + $Vmon++; + if ($Vmon < 10) {$Vmon = "0$Vmon";} + if ($Vmday < 10) {$Vmday = "0$Vmday";} + $VDL_eighteen = "$Vyear-$Vmon-$Vmday $Vhour:$Vmin:$Vsec"; + $timeclock_end_of_day_NOW=0; ### Grab system_settings values from the database $stmtA = "SELECT count(*) from system_settings where timeclock_end_of_day LIKE \"%$current_hourmin%\";"; diff --git a/docs/INBOUND_CALLBACK_QUEUE.txt b/docs/INBOUND_CALLBACK_QUEUE.txt index 982a94df..06a35c1d 100644 --- a/docs/INBOUND_CALLBACK_QUEUE.txt +++ b/docs/INBOUND_CALLBACK_QUEUE.txt @@ -60,3 +60,55 @@ Closing Time Option Transfer In-Group - If Closing Time Option is set to IN_GROU Closing Time Option Callback List ID - If Closing Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the Closing Time is reached. + + + +--------------------------------------------------------- +Somewhat related feature: vicidial_abandon_check_queue + +This separate feature, NOT part of Inbound Callback Queue, was added to svn/trunk revision 3699, and offers the ability to attempt to call back customers(through a vicidial_hopper insert) who called into an in-group but were never handled by an agent. This feature can also be used to send an email or send some other web URL instead of inserting a lead into the hopper if you want. + +To use this feature, the System Setting "Abandon Check Queue" must be enabled. + +Also, you will need to create a new Settings Container with the ID of "ABANDON_HOPPER_URL" that will contain the hopper insert URL(or other URL), something like this: +http://192.168.198.3/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=--A--lead_id--B--&add_to_hopper=Y&hopper_priority=99&flag=ACQ + +NOTE: The above URL should be local to the VICIdial cluster, and the 'user' defined in it must have permissions to update leads and have API access if you are using the API. For other options on URL variables and uses, see the "Other URL Options" section below. + + +The first step is to set up an In-Group as a first routing destination of inbound calls that come into the system from a DID. The DID settings should use some form of the CIDLOOKUP Call Handle Method so that no duplicate leads are created. This In-Group must be set as an "always closed" Call Time or it should have 0 drop time and forward calls immediately on to a Call Menu or another In-Group. This step allows for the lead_id to be determined so that leads can be checked to see if they were handled by an agent or not before hanging up. In this first In-Group, you will need to set up a "No Agent Call URL" that points to the 'agc/abandon_check_queue.php' script, like this example: +VARhttp://192.168.1.1/agc/abandon_check_queue.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=NOAGENTURL&pass=--A--call_id--B--&log_to_file=1&source=ACQ + +The above script will insert a record into the 'vicidial_abandon_check_queue' database table if there is not an active one in there already, and if there is no current record for that lead already in the vicidial_hopper table. + +Next, the AST_VDadapt.pl script will repeatedly check on the active records in the vicidial_abandon_check_queue table to see if they are still active calls and if they have been handled by an agent or inserted into the vicidial_hopper or if they have hung up. If the customer hangs up before speaking with an agent, the lead is inserted into the vicidial_hopper table and the vicidial_abandon_check_queue record is marked as 'COMPLETE'. + +This feature also impacts the agi-VDAD_ALL_inbound.agi and outbound scripts, which will disable the vicidial_abandon_check_queue record once a call is routed to an agent. + +The ADMIN_keepalive_ALL.pl script will roll the old vicidial_abandon_check_queue records into the vicidial_abandon_check_queue_archive table every night. + + +This feature was specifically created to catch calls tagged with a lead_id that drop while in a Call Menu. + +Since this feature is based on the lead_id, when sending a call from a Call Menu to an In-Group after it has been tagged with a lead_id, make sure you set the Call Handle Method to "CLOSER" so that the lead_id is preserved. + +If the Call Menu being routed to also can send calls to a Voicemail or an external extension, those calls might be flagged by this process, since they were not handled by an agent. + + + +Other URL Options - + +Instead of inserting a lead into the hopper, you can set the URL to do other functions, like send an email. + +http://192.168.1.1/agc/dispo_send_email.php?container_id=CM_DROP_EMAIL&lead_id=--A--lead_id--B--&call_id=--A--call_id--B--&dispo=DROP&user=NOAGENTURL--A--user--B--&pass=--A--call_id--B--&sale_status=ALL-STATUSES&log_to_file=1&dialed_number=--A--phone_number--B-- + + +Here is a list of the variables that you can use in an Abandon Check URL: +--A--lead_id--B-- +--A--phone_number--B-- +--A--source--B-- +--A--call_id--B-- +--A--abandon_time--B-- +--A--reject_reason--B-- +--A--check_status--B-- + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 384ac0b3..e96abff4 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -169,7 +169,8 @@ conf_qualify ENUM('Y','N') default 'Y', routing_prefix VARCHAR(10) default '13', external_web_socket_url VARCHAR(255) default '', conf_engine ENUM('MEETME','CONFBRIDGE') COLLATE utf8_unicode_ci DEFAULT 'MEETME', -conf_update_interval SMALLINT(6) NOT NULL DEFAULT '60' +conf_update_interval SMALLINT(6) NOT NULL DEFAULT '60', +ara_url TEXT ) ENGINE=MyISAM; CREATE UNIQUE INDEX server_id on servers (server_id); @@ -1102,7 +1103,8 @@ max_logged_in_agents SMALLINT(5) UNSIGNED default '0', user_group_script ENUM('DISABLED','ENABLED') default 'DISABLED', agent_hangup_route ENUM('HANGUP','MESSAGE','EXTENSION','IN_GROUP','CALLMENU') default 'HANGUP', agent_hangup_value TEXT, -agent_hangup_ig_override ENUM('Y','N') default 'N' +agent_hangup_ig_override ENUM('Y','N') default 'N', +show_confetti ENUM('DISABLED','SALES','CALLBACKS','SALES_AND_CALLBACKS') default 'DISABLED' ) ENGINE=MyISAM; CREATE TABLE vicidial_lists ( @@ -1977,7 +1979,8 @@ agent_hide_hangup ENUM('1','0','2','3','4','5','6') default '0', allow_web_debug ENUM('0','1','2','3','4','5','6') default '0', max_logged_in_agents ENUM('0','1','2','3','4','5','6','7') default '0', user_codes_admin ENUM('0','1','2','3','4','5','6','7') default '0', -login_kickall ENUM('0','1','2','3','4','5','6','7') default '0' +login_kickall ENUM('0','1','2','3','4','5','6','7') default '0', +abandon_check_queue ENUM('0','1','2','3','4','5','6','7') default '0' ) ENGINE=MyISAM; CREATE TABLE vicidial_campaigns_list_mix ( @@ -4876,6 +4879,21 @@ index (extension), index (call_date) ) ENGINE=MyISAM; +CREATE TABLE vicidial_abandon_check_queue ( +abandon_check_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18) default '', +call_id VARCHAR(40) default '', +abandon_time DATETIME, +dispo VARCHAR(6), +check_status ENUM('NEW','REJECT','QUEUE','PROCESSING','COMPLETE','CONNECTED','ARCHIVE') default 'NEW', +reject_reason VARCHAR(40) default '', +source VARCHAR(20), +index(abandon_time), +index(phone_number), +index(lead_id) +) ENGINE=MyISAM; + ALTER TABLE vicidial_email_list MODIFY message text character set utf8; @@ -5140,6 +5158,9 @@ CREATE TABLE vicidial_inbound_caller_codes_archive LIKE vicidial_inbound_caller_ CREATE TABLE vicidial_dial_cid_log_archive LIKE vicidial_dial_cid_log; CREATE UNIQUE INDEX caller_code_date on vicidial_dial_cid_log_archive (caller_code,call_date); +CREATE TABLE vicidial_abandon_check_queue_archive LIKE vicidial_abandon_check_queue; +ALTER TABLE vicidial_abandon_check_queue_archive MODIFY abandon_check_id INT(9) UNSIGNED NOT NULL; + GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; @@ -5224,6 +5245,7 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('USER_LOCATIONS_SYSTEM','User Locations List','OTHER','---ALL---',';location|description\n|default\n'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('USER_CODES_SYSTEM','User Codes List','OTHER','---ALL---',''); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('VICIPHONE_SETTINGS','VICIphone WebRTC Extra Settings','WEBPHONE_SETTINGS','---ALL---','# determines if automatic gain control is enabled\nautoGain : 0\n\n# determines if echo cancellation is enabled\nechoCan : 0\n\n# determines if noise suppression is enabled\nnoiseSup :0\n\n# determines if the reg_exten is called upon successful registration\ndialRegExten : 1\n\n# determines the regional sound to use for progress audio\nprogReg : na\n\n# English translation phrases\nlangAttempting:"Attempting"\nlangConnected:"WS Connected"\nlangDisconnected:"WS Disconnected"\nlangExten:"Extension"\nlangIncall:"Incall"\nlangInit:"Initializing..."\nlangRedirect:"Redirect"\nlangRegFailed:"Reg. Failed"\nlangRegistering:"Registering"\nlangRegistered:"Registered"\nlangReject:"Rejected"\nlangRinging:"Ringing"\nlangSend:"Send"\nlangTrying:"Trying"\nlangUnregFailed:"Unreg. Failed"\nlangUnregistered:"Unregistered"\nlangUnregistering:"Unregistering"\nlangWebrtcError:"Something went wrong with WebRTC. Either your browser does not support the necessary WebRTC functions, you did not allow your browser to access the microphone, or there is a configuration issue. Please check your browsers error console for more details. For a list of compatible browsers please vist http://webrtc.org/"'); +INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('CONFETTI_SETTINGS', 'Confetti settings for screen display', 'OTHER', '---ALL---', '; Confetti settings, to add visual interest to certain events\r\n; duration is how long the confetti animation runs, maxParticleCount is the\r\n; max number of confetti \"pieces\", and particleSpeed is how fast they float\r\nduration => 2\r\nmaxParticleCount => 2350\r\nparticleSpeed => 2\r\n'); INSERT INTO `vicidial_settings_containers` VALUES ('VERM_STATUS_NAMES_OVERRIDE','Override dialer status names in enhanced reporting','OTHER','---ALL---','; For each status name you want overridden, type the status followed by\r\n; a pipe, then the new status name\r\n; Ex:\r\n; NZ|Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupoka\r\n201214|Request To Cancel\r\n210200|No Answer-Incomplete Call\r\n210201|Contact Established\r\n210202|Provider Review - HB\r\n210203|Promise to Pay\r\n210204|Setup Payment Plan\r\n210205|Research-Inquiry\r\n210206|Voice Mail Left - HB\r\n210207|Do Not Call\r\n210208|Appeal Verification\r\n210209|Bad Phone\r\n210210|Bad Address\r\n210211|Direct Pay Verification\r\n210213|Provider Approved\r\n210215|Update Notes Only\r\n210216|Voicemail-No Status Change\r\n210217|Sent Letter Request - HB\r\n210218|Auto VoiceMail Left - HB\r\n210219|Auto VoiceMail-No Status Change\r\n210302|Provider Review - LB\r\n210306|Voice Mail Left - LB\r\n210317|Sent Letter Request - LB\r\n210318|Auto VoiceMail Left - LB\r\n211503|Provider - COVID-19\r\n211603|Transferred Call to MLA\r\n'), ('VERM_REPORT_OPTIONS','Container for customizing VERM report output','OTHER','---ALL---','; This is the report queue used if none is chosen by the user\r\n; It\'s preloaded in some forms as well\r\nVERM_default_report_queue => ALL\r\n\r\n; If there are statuses to exclude from reports, list them here\r\n; Separate with commas. Default is AFTHRS\r\nexc_addtl_statuses => AFTHRS\r\n\r\n; Set the below value to 1 (or anything non-blank/non-zero) in order to \r\n; show the agents ID in addition to their full name in the report results\r\nshow_full_agent_info => 1\r\n\r\n; Some reports count \"lost\" calls - which are defined by the below variable\r\n; listing what you define as \"lost\" dispos. Separate with commas.\r\nlost_statuses => LOST,210208,DISPO\r\n\r\n; You can create a detailed IVR survey report for ingroups by defining\r\n; \"ivr_survey_ingroups_detail\" and \"ivr_survey_ingroups_voicemails.\"\r\n; For \"details\", supply an ingroup used as a tracking group on call menus.\r\n; Then, add a pipe and after that list all call menus that use the ingroup\r\n; as the tracking group, separating each with a comma\r\n; To track whether the calls went to voicemail, list every call menu/option\r\n; combination that goes to voicemail, separating the call menu from the \r\n; option with a pipe. One callmenu/option combo per line.\r\nivr_survey_ingroups_detail => 521205|561401,561402,561403,561404,561505\r\nivr_survey_ingroups_voicemails => 561505|t\r\n\r\n; #####################################################\r\n; # ALL of the below are used in the wallboard report #\r\n; #####################################################\r\nVERM_default_outb_widget_queue => ALL_OUT\r\nVERM_default_inb_widget_queue1 => 514915v_USA_Shared\r\nVERM_default_inb_widget_queue2 => 515915v_MLA_Shared\r\n\r\n; Used specifically for the SLA widget\r\n; Uses ingroups - separate multiple ingroups by commas\r\n; Comment out or leave blank to count all ingroups\r\nSLA_LEVEL_PCT_ingroups => 514915v,515915v\r\n\r\n; This removes remote agents from the wallboard reports\r\n; Comment out to include remote agents (or set to zero)\r\nomit_remote_agents => 1\r\n\r\n\r\n; #### AUTO DOWNLOAD ####\r\n; If the "total calls" value on any report requested exceeds the below \r\n; limit, automatically download the three "DETAILS" reports instead\r\n; of attempting to display that many records on-screen\r\nauto_download_limit => 50000\r\n\r\n; #### OUTCOMES report overrides ####\r\n; Use "outcome_lagged_status_overrides" for conditions where the call \r\n; record in the vicidial_log or vicidial_closer_log table has no uniqueid\r\n; value despite having a status/outcome, which can indicate a call \r\n; affected by network lag for certain statuses. This will change the call \r\n; status to "LAGGED". Separate statuses with commas. Default is the \r\n; automatic "PU" status.\r\noutcome_lagged_status_overrides => PU\r\n\r\n; Use "unknown_network_statuses" to change call statuses to read "Network/\r\n; LAGGED" on the OUTCOMES report. Separate statuses with commas.\r\n; IMPORTANT: if you are using the outcome_lagged_status_overrides option \r\n; above, make sure "LAGGED" is one of the unknown_network_statuses here\r\n; unknown_network_statuses => LAGGED\r\n\r\n; Use "outcome_status_overrides" to change one status to another on the \r\n; OUTCOMES report. Overrides are comma-separated pairs of dispositions \r\n; where the first disposition is the disposition to change, and the second\r\n; is the disposition to change to. Separate pairs with a pipe character as\r\n; in the below example. Off by default.\r\n; outcome_status_overrides => CBHOLD,DISPO|XFER,AL'); INSERT INTO `wallboard_widgets` VALUES ('queues_widget_1','AGENTS_AND_QUEUES','queues','','TEXT',5,'N',1,'Queue Information','','',NULL,'','',NULL,2),('queues_widget_0','AGENTS_AND_QUEUES','queues','','LOGO',2,'N',1,NULL,'','',NULL,'','',NULL,1),('queues_widget_2','AGENTS_AND_QUEUES','queues','SLA Level %','SLA_LEVEL_PCT',1,'N',1,NULL,'','>60',NULL,'','',NULL,3),('queues_widget_3','AGENTS_AND_QUEUES','queues','Outbound calls','LIVE_QUEUE_INFO',1,'N',1,'','201201','','','','','yellow_alarm,|red_alarm,',4),('queues_widget_4','AGENTS_AND_QUEUES','queues','USA Ded Inbound','LIVE_QUEUE_INFO',1,'N',1,'','ALL_IN','','','','','yellow_alarm,|red_alarm,',5),('queues_widget_5','AGENTS_AND_QUEUES','queues','MLA Ded Inbound','LIVE_QUEUE_INFO',1,'N',1,'','514911','','','','','yellow_alarm,|red_alarm,',6),('queues_widget_6','AGENTS_AND_QUEUES','queues','N Waiting Calls','N_WAITING_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,7),('queues_widget_7','AGENTS_AND_QUEUES','queues','Offered Calls','OFFERED_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,8),('queues_widget_8','AGENTS_AND_QUEUES','queues','Answered Calls','ANSWERED_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,9),('queues_widget_9','AGENTS_AND_QUEUES','queues','Lost Calls','LOST_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,10),('queues_widget_10','AGENTS_AND_QUEUES','queues','Longest Wait','LONGEST_WAIT',1,'N',1,NULL,'','',NULL,'','',NULL,11),('queues_widget_11','AGENTS_AND_QUEUES','queues','Live Queues','LIVE_QUEUES',1,'Y',1,NULL,'','',NULL,'','',NULL,12),('queues_widget_12','AGENTS_AND_QUEUES','queues','Live Calls','LIVE_CALLS',1,'Y',2,NULL,'','',NULL,'','',NULL,13),('agent_widget_0','AGENTS_AND_QUEUES','agents','','LOGO',2,'N',1,NULL,'','',NULL,'','',NULL,1),('agent_widget_1','AGENTS_AND_QUEUES','agents','N Waiting Calls','N_WAITING_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,2),('agent_widget_2','AGENTS_AND_QUEUES','agents','Agents Ready','AGENTS_READY',1,'N',1,NULL,'','',NULL,'','',NULL,3),('agent_widget_3','AGENTS_AND_QUEUES','agents','Agents On Call','N_AGENTS_ON_CALL',1,'N',1,NULL,'','',NULL,'','',NULL,4),('agent_widget_4','AGENTS_AND_QUEUES','agents','N Answered Calls','N_ANSWERED_CALLS',1,'N',1,NULL,'','',NULL,'','',NULL,5),('agent_widget_5','AGENTS_AND_QUEUES','agents','Clock','CLOCK',1,'N',1,NULL,'','',NULL,'','',NULL,6),('agent_widget_6','AGENTS_AND_QUEUES','agents','Live Agents','LIVE_AGENTS',1,'Y',3,NULL,'','',NULL,'','',NULL,7); @@ -5232,4 +5254,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='1677',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1678',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/extras/upgrade_2.14.sql b/extras/upgrade_2.14.sql index b83e7f4f..281a32e4 100644 --- a/extras/upgrade_2.14.sql +++ b/extras/upgrade_2.14.sql @@ -2143,3 +2143,31 @@ UPDATE system_settings SET db_schema_version='1676',db_schema_update_date=NOW() update vicidial_settings_containers set container_entry=CONCAT(container_entry, '\r\n\r\n; #### AUTO DOWNLOAD ####\r\n; If the "total calls" value on any report requested exceeds the below \r\n; limit, automatically download the three "DETAILS" reports instead\r\n; of attempting to display that many records on-screen\r\nauto_download_limit => 50000\r\n\r\n; #### OUTCOMES report overrides ####\r\n; Use "outcome_lagged_status_overrides" for conditions where the call \r\n; record in the vicidial_log or vicidial_closer_log table has no uniqueid\r\n; value despite having a status/outcome, which can indicate a call \r\n; affected by network lag for certain statuses. This will change the call \r\n; status to "LAGGED". Separate statuses with commas. Default is the \r\n; automatic "PU" status.\r\noutcome_lagged_status_overrides => PU\r\n\r\n; Use "unknown_network_statuses" to change call statuses to read "Network/\r\n; LAGGED" on the OUTCOMES report. Separate statuses with commas.\r\n; IMPORTANT: if you are using the outcome_lagged_status_overrides option \r\n; above, make sure "LAGGED" is one of the unknown_network_statuses here\r\n; unknown_network_statuses => LAGGED\r\n\r\n; Use "outcome_status_overrides" to change one status to another on the \r\n; OUTCOMES report. Overrides are comma-separated pairs of dispositions \r\n; where the first disposition is the disposition to change, and the second\r\n; is the disposition to change to. Separate pairs with a pipe character as\r\n; in the below example. Off by default.\r\n; outcome_status_overrides => CBHOLD,DISPO|XFER,AL') WHERE container_id='VERM_REPORT_OPTIONS' and container_entry NOT LIKE "%outcome_status_overrides%"; UPDATE system_settings SET db_schema_version='1677',db_schema_update_date=NOW() where db_schema_version < 1677; + +ALTER TABLE servers ADD ara_url TEXT; + +ALTER TABLE vicidial_campaigns ADD show_confetti ENUM('DISABLED','SALES','CALLBACKS','SALES_AND_CALLBACKS') default 'DISABLED'; + +INSERT INTO vicidial_settings_containers (container_id,container_notes,container_type,user_group,container_entry) VALUES ('CONFETTI_SETTINGS', 'Confetti settings for screen display', 'OTHER', '---ALL---', '; Confetti settings, to add visual interest to certain events\r\n; duration is how long the confetti animation runs, maxParticleCount is the\r\n; max number of confetti \"pieces\", and particleSpeed is how fast they float\r\nduration => 2\r\nmaxParticleCount => 2350\r\nparticleSpeed => 2\r\n'); + +ALTER TABLE system_settings ADD abandon_check_queue ENUM('0','1','2','3','4','5','6','7') default '0'; + +CREATE TABLE vicidial_abandon_check_queue ( +abandon_check_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, +lead_id INT(9) UNSIGNED, +phone_number VARCHAR(18) default '', +call_id VARCHAR(40) default '', +abandon_time DATETIME, +dispo VARCHAR(6), +check_status ENUM('NEW','REJECT','QUEUE','PROCESSING','COMPLETE','CONNECTED','ARCHIVE') default 'NEW', +reject_reason VARCHAR(40) default '', +source VARCHAR(20), +index(abandon_time), +index(phone_number), +index(lead_id) +) ENGINE=MyISAM; + +CREATE TABLE vicidial_abandon_check_queue_archive LIKE vicidial_abandon_check_queue; +ALTER TABLE vicidial_abandon_check_queue_archive MODIFY abandon_check_id INT(9) UNSIGNED NOT NULL; + +UPDATE system_settings SET db_schema_version='1678',db_schema_update_date=NOW() where db_schema_version < 1678; diff --git a/www/agc/abandon_check_queue.php b/www/agc/abandon_check_queue.php new file mode 100644 index 00000000..b04cebf0 --- /dev/null +++ b/www/agc/abandon_check_queue.php @@ -0,0 +1,293 @@ + LICENSE: AGPLv2 +# +# This script is designed to be used as a "No Agent Call URL" option for an +# In-Group. It will take the lead_id and check to see if it is already in the +# vicidial_abandon_check_queue table or the vicidial_hopper, and if not, add it +# so that it can be processed by the AST_VDadapt.pl script. +# +# This script is part of the API group and any modifications of data are +# logged to the vicidial_api_log table. +# +# Example of what to put in a No Agent Call URL field for an In-Group: +# (IMPORTANT: user needs to be NOAGENTURL and pass needs to be set to the call_id) +# VARhttp://192.168.1.1/agc/abandon_check_queue.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=NOAGENTURL&pass=--A--call_id--B--&log_to_file=1&source=test +# +# Definable Fields: (other fields should be left as they are) +# - log_to_file - (0,1) if set to 1, will create a log file in the agc directory +# - source - 1-20 characters, the source of this request +# +# Immediate reject reasons: +# - lead is already in hopper +# - lead is already in vicidial_abandon_check_queue +# + +# +# CHANGES +# 230308-0844 - First Build +# + +$api_script = 'abandonchk'; +$php_script = 'abandon_check_queue.php'; + +require_once("dbconnect_mysqli.php"); +require_once("functions.php"); + +$filedate = date("Ymd"); +$filetime = date("H:i:s"); +$IP = getenv ("REMOTE_ADDR"); +$BR = getenv ("HTTP_USER_AGENT"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} + elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["log_to_file"])) {$log_to_file=$_GET["log_to_file"];} + elseif (isset($_POST["log_to_file"])) {$log_to_file=$_POST["log_to_file"];} +if (isset($_GET["source"])) {$source=$_GET["source"];} + elseif (isset($_POST["source"])) {$source=$_POST["source"];} + +$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); + +#$DB = '1'; # DEBUG override +$US = '_'; +$TD = '---'; +$STARTtime = date("U"); +$NOW_TIME = date("Y-m-d H:i:s"); +$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); +$original_sale_status = $sale_status; +$sale_status = "$TD$sale_status$TD"; +$search_value=''; +$match_found=0; +$primary_match_found=0; +$age_trigger=0; +$k=0; + +# filter variables +$user=preg_replace("/\'|\"|\\\\|;| /","",$user); +$pass=preg_replace("/\'|\"|\\\\|;| /","",$pass); + +# 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')) + { + require_once('options.php'); + } + +header ("Content-type: text/html; charset=utf-8"); + +############################################# +##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP ##### +$stmt = "SELECT use_non_latin,enable_languages,language_method,allow_web_debug FROM system_settings;"; +$rslt=mysql_to_mysqli($stmt, $link); +#if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysqli_num_rows($rslt); +if ($qm_conf_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $non_latin = $row[0]; + $SSenable_languages = $row[1]; + $SSlanguage_method = $row[2]; + $SSallow_web_debug = $row[3]; + } +if ($SSallow_web_debug < 1) {$DB=0;} + +$VUselected_language = ''; +$stmt="SELECT selected_language from vicidial_users where user='$user';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_to_mysqli($stmt, $link); +$sl_ct = mysqli_num_rows($rslt); +if ($sl_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $VUselected_language = $row[0]; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$lead_id = preg_replace('/[^_0-9]/', '', $lead_id); +$log_to_file = preg_replace('/[^-_0-9a-zA-Z]/', '', $log_to_file); + +if ($non_latin < 1) + { + $user=preg_replace("/[^-_0-9a-zA-Z]/","",$user); + $pass=preg_replace("/[^-\.\+\/\=_0-9a-zA-Z]/","",$pass); + $dispo = preg_replace('/[^-_0-9a-zA-Z]/', '', $dispo); + $source = preg_replace('/[^-_0-9a-zA-Z]/', '', $source); + } +else + { + $user = preg_replace('/[^-_0-9\p{L}]/u','',$user); + $pass = preg_replace('/[^-\.\+\/\=_0-9\p{L}]/u','',$pass); + $dispo = preg_replace('/[^-_0-9\p{L}]/u', '', $dispo); + $source = preg_replace('/[^-_0-9\p{L}]/u', '', $source); + } + +if ($DB>0) {echo "$lead_id|$dispo|$user|$pass|$DB|$log_to_file|$source|\n";} + +if (strlen($dispo) < 1) + { + echo _QXZ("No dispo set").": 1|$dispo|\n"; + exit; + } +else + { + if ($non_latin < 1) + { + $user=preg_replace("/[^-_0-9a-zA-Z]/","",$user); + # $pass=preg_replace("/[^-_0-9a-zA-Z]/","",$pass); + } + + if (preg_match("/NOAGENTURL/",$user)) + { + $PADlead_id = sprintf("%010s", $lead_id); + if ( (strlen($pass) > 15) and (preg_match("/$PADlead_id$/",$pass)) ) + { + $stmt="SELECT count(*) from vicidial_log_extended where caller_code='$pass' and call_date > \"$four_hours_ago\";"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $authlive=$row[0]; + $auth=$row[0]; + if ($authlive < 1) + { + echo _QXZ("Call Not Found:")." 2|$user|$pass|$authlive|\n"; + exit; + } + } + else + { + echo _QXZ("Invalid Call ID:")." 1|$user|$pass|$PADlead_id|\n"; + exit; + } + } + else + { + $auth=0; + $auth_message = user_authorization($user,$pass,'',0,0,0,0,'abandon_check_queue'); + if ($auth_message == 'GOOD') + {$auth=1;} + + $stmt="SELECT count(*) from vicidial_live_agents where user='$user';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $row=mysqli_fetch_row($rslt); + $authlive=$row[0]; + } + + if ( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) or ($authlive==0)) + { + echo _QXZ("Invalid Username/Password:")." |$user|$pass|$auth|$authlive|$auth_message|\n"; + exit; + } + + if (strlen($lead_id) > 0) + { + $search_count=0; + $stmt = "SELECT phone_number FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $search_count = mysqli_num_rows($rslt); + if ($search_count > 0) + { + $row=mysqli_fetch_row($rslt); + $phone_number = $row[0]; + } + + if ($search_count > 0) + { + $check_status='NEW'; + $reject_reason=''; + + $hopper_count=0; + $stmt = "SELECT count(*) FROM vicidial_hopper where lead_id='$lead_id';"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $hc = mysqli_num_rows($rslt); + if ($hc > 0) + { + $row=mysqli_fetch_row($rslt); + $hopper_count = $row[0]; + } + if ($hopper_count > 0) + { + $check_status='REJECT'; + $reject_reason='Lead already in hopper'; + } + + $vacq_call_count=0; + $stmt = "SELECT count(*) FROM vicidial_abandon_check_queue where call_id='$pass';"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $hc = mysqli_num_rows($rslt); + if ($hc > 0) + { + $row=mysqli_fetch_row($rslt); + $vacq_call_count = $row[0]; + } + if ($vacq_call_count > 0) + { + $check_status='REJECT'; + $reject_reason='Call already in abandon queue'; + } + + $vacq_count=0; + $stmt = "SELECT count(*) FROM vicidial_abandon_check_queue where lead_id='$lead_id' and check_status IN('NEW','QUEUE','PROCESSING') and abandon_time > \"$four_hours_ago\";"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $hc = mysqli_num_rows($rslt); + if ($hc > 0) + { + $row=mysqli_fetch_row($rslt); + $vacq_count = $row[0]; + } + if ($vacq_count > 0) + { + $check_status='REJECT'; + $reject_reason='Lead already active in abandon queue'; + } + + $stmt="INSERT INTO vicidial_abandon_check_queue SET lead_id='$lead_id',phone_number='$phone_number',call_id='$pass',abandon_time=NOW(),dispo='$dispo',check_status='$check_status',reject_reason='$reject_reason',source='$source';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_to_mysqli($stmt, $link); + $affected_rows = mysqli_affected_rows($link); + + $SQL_log = "$stmt|$affected_rows|"; + $SQL_log = preg_replace('/;/','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='abandon_check_queue',value='$lead_id',result='$affected_rows',result_reason='$check_status',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';"; + $rslt=mysql_to_mysqli($stmt, $link); + + $MESSAGE = _QXZ("DONE: %1s match found, %2s update to lead %3s",0,'',$search_count,$affected_rows,$lead_id); + echo "$MESSAGE\n"; + } + else + { + $MESSAGE = _QXZ("DONE: no match found for lead %1s",0,'',$lead_id); + echo "$MESSAGE\n"; + } + } + else + { + $MESSAGE = _QXZ("DONE: lead %1s is not populated",0,'',$lead_id); + echo "$MESSAGE\n"; + } + } + +if ($log_to_file > 0) + { + $fp = fopen ("./abandon_check_queue.txt", "w"); +# fwrite ($fp, "$NOW_TIME|$k|$lead_id|$dispo|$user|XXXX|$DB|$log_to_file|$called_count|$first_pass_vars|$original_sale_status|$exclude_status|$called_count_trigger|$MESSAGE|\n"); + fwrite ($fp, "$NOW_TIME|\n"); + fclose($fp); + } diff --git a/www/agc/confetti.php b/www/agc/confetti.php new file mode 100644 index 00000000..44c71b27 --- /dev/null +++ b/www/agc/confetti.php @@ -0,0 +1,165 @@ +0) + { + $confetti_row=mysqli_fetch_array($confetti_rslt); + $container_entry=explode("\n", $confetti_row['container_entry']); + + for ($q=0; $q\s/', $container_entry[$q])) + { + $container_setting=explode(" => ", trim($container_entry[$q])); + $setting_name=$container_setting[0]; + $setting_value=$container_setting[1]; + if ($setting_name=="duration" || $setting_name=="maxParticleCount" || $setting_name=="particleSpeed") + { + $$setting_name=$setting_value; + } + } + } + } + +?> +// confetti.js - https://github.com/mathusummut/confetti.js - MIT License +var confettiDuration = ; //set max confetti count +var maxParticleCount = ; //set max confetti count +var particleSpeed = ; //set the particle animation speed +var startConfetti; //call to start confetti animation +var stopConfetti; //call to stop adding confetti +var toggleConfetti; //call to start or stop the confetti animation depending on whether it's already running +var removeConfetti; //call to stop the confetti animation and remove all confetti immediately + +(function() { + startConfetti = startConfettiInner; + stopConfetti = stopConfettiInner; + toggleConfetti = toggleConfettiInner; + removeConfetti = removeConfettiInner; + var colors = ["DodgerBlue", "OliveDrab", "Gold", "Pink", "SlateBlue", "LightBlue", "Violet", "PaleGreen", "SteelBlue", "SandyBrown", "Chocolate", "Crimson"] + var streamingConfetti = false; + var animationTimer = null; + var particles = []; + var waveAngle = 0; + + function resetParticle(particle, width, height) { + particle.color = colors[(Math.random() * colors.length) | 0]; + particle.x = Math.random() * width; + particle.y = Math.random() * height - height; + particle.diameter = Math.random() * 10 + 5; + particle.tilt = Math.random() * 10 - 10; + particle.tiltAngleIncrement = Math.random() * 0.07 + 0.05; + particle.tiltAngle = 0; + return particle; + } + + function startConfettiInner() { + var width = window.innerWidth; + var height = window.innerHeight; + window.requestAnimFrame = (function() { + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + return window.setTimeout(callback, 16.6666667); + }; + })(); + var canvas = document.getElementById("confetti-canvas"); + if (canvas === null) { + canvas = document.createElement("canvas"); + canvas.setAttribute("id", "confetti-canvas"); + canvas.setAttribute("style", "display:block;z-index:999999;pointer-events:none;position: absolute"); + document.body.appendChild(canvas); + canvas.width = width; + canvas.height = height; + window.addEventListener("resize", function() { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + }, true); + } + var context = canvas.getContext("2d"); + while (particles.length < maxParticleCount) + particles.push(resetParticle({}, width, height)); + streamingConfetti = true; + if (animationTimer === null) { + (function runAnimation() { + context.clearRect(0, 0, window.innerWidth, window.innerHeight); + if (particles.length === 0) + animationTimer = null; + else { + updateParticles(); + drawParticles(context); + animationTimer = requestAnimFrame(runAnimation); + } + })(); + } + } + + function stopConfettiInner() { + streamingConfetti = false; + } + + function removeConfettiInner() { + stopConfetti(); + particles = []; + } + + function toggleConfettiInner() { + if (streamingConfetti) + stopConfettiInner(); + else + startConfettiInner(); + } + + function drawParticles(context) { + var particle; + var x; + for (var i = 0; i < particles.length; i++) { + particle = particles[i]; + context.beginPath(); + context.lineWidth = particle.diameter; + context.strokeStyle = particle.color; + x = particle.x + particle.tilt; + context.moveTo(x + particle.diameter / 2, particle.y); + context.lineTo(x, particle.y + particle.tilt + particle.diameter / 2); + context.stroke(); + } + } + + function updateParticles() { + var width = window.innerWidth; + var height = window.innerHeight; + var particle; + waveAngle += 0.01; + for (var i = 0; i < particles.length; i++) { + particle = particles[i]; + if (!streamingConfetti && particle.y < -15) + particle.y = height + 100; + else { + particle.tiltAngle += particle.tiltAngleIncrement; + particle.x += Math.sin(waveAngle); + particle.y += (Math.cos(waveAngle) + particle.diameter + particleSpeed) * 0.5; + particle.tilt = Math.sin(particle.tiltAngle) * 15; + } + if (particle.x > width + 20 || particle.x < -20 || particle.y > height) { + if (streamingConfetti && particles.length <= maxParticleCount) + resetParticle(particle, width, height); + else { + particles.splice(i, 1); + i--; + } + } + } + } +})(); \ No newline at end of file diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 4d154042..33a821ef 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -530,10 +530,11 @@ # 221116-1052 - Fix for long in-group dialstring extensions # 221202-1645 - Change in CIDname prefix for clearing session command to differentiate from other processes # 230204-1618 - Small fix for dispo url processed logging +# 230309-1005 - Added abandon_check_queue feature # -$version = '2.14-423'; -$build = '230204-1618'; +$version = '2.14-424'; +$build = '230309-1005'; $php_script = 'vdc_db_query.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=902; @@ -870,6 +871,7 @@ $txt = '.txt'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); +$twentyfour_hours_ago = date("Y-m-d H:i:s", mktime(date("H"),date("i"),date("s"),date("m"),date("d")-1,date("Y"))); $SQLdate = $NOW_TIME; $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); @@ -1048,7 +1050,7 @@ $sip_hangup_cause_dictionary = array( ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug FROM system_settings;"; +$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug,abandon_check_queue FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);} #if ($DB) {echo "$stmt\n";} @@ -1080,6 +1082,7 @@ if ($qm_conf_ct > 0) $SSdaily_call_count_limit = $row[21]; $SScall_limit_24hour = $row[22]; $SSallow_web_debug = $row[23]; + $SSabandon_check_queue = $row[24]; } if ($SSallow_web_debug < 1) {$DB=0; $format='text';} ##### END SETTINGS LOOKUP ##### @@ -7770,6 +7773,14 @@ if ($ACTION == 'manDiaLlookCaLL') if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00742',$user,$server_ip,$session_name,$one_mysql_log);} } + if ($SSabandon_check_queue > 0) + { + $stmt="UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id='$lead_id' and check_status IN('NEW','QUEUE','PROCESSING','COMPLETE') and abandon_time > \"$twentyfour_hours_ago\" order by abandon_time desc limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_to_mysqli($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } + $sip_event_action_output=''; ##### BEGIN SIP event logging, if enabled in the system ##### if ($SSsip_event_logging > 0) diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index ca47c997..35c7b957 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -1137,6 +1137,7 @@ echo ' + '; echo "\n"; @@ -1287,6 +1288,17 @@ if ($LogiNAJAX > 0) document.vicidial_form.JS_browser_width.value = BrowseWidth; document.vicidial_form.JS_browser_height.value = BrowseHeight; + + var canvas = document.getElementById("confetti-canvas"); + if (canvas != null) + { + canvas.width = BrowseWidth; + canvas.height = BrowseHeight; + // window.addEventListener("resize", function() { + // canvas.width = window.innerWidth; + // canvas.height = window.innerHeight; + // }, true); + } } // ################################################################################ @@ -2293,19 +2305,23 @@ else $VARSELstatuses=''; $VARSELstatuses_ct=0; $VARCBstatuses=''; + $VARSALEstatuses=''; $VARMINstatuses=''; $VARMAXstatuses=''; $VARCBstatusesLIST=''; + $VARSALEstatusesLIST=''; $cVARstatuses=''; $cVARstatusnames=''; $cVARSELstatuses=''; $cVARSELstatuses_ct=0; $cVARCBstatuses=''; + $cVARSALEstatuses=''; $cVARMINstatuses=''; $cVARMAXstatuses=''; $cVARCBstatusesLIST=''; + $cVARSALEstatusesLIST=''; ##### grab the statuses that can be used for dispositioning by an agent for all calls - $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec FROM vicidial_statuses WHERE status != 'NEW' order by status limit 500;"; + $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec,sale FROM vicidial_statuses WHERE status != 'NEW' order by status limit 500;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01010',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -2320,24 +2336,28 @@ else $SELstatuses[$i] = $row[3]; $MINsec[$i] = $row[4]; $MAXsec[$i] = $row[5]; + $SALEstatuses[$i] = $row[6]; if ($TEST_all_statuses > 0) {$SELstatuses[$i]='Y';} $VARstatuses = "$VARstatuses'$statuses[$i]',"; $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; $VARSELstatuses = "$VARSELstatuses'$SELstatuses[$i]',"; $VARCBstatuses = "$VARCBstatuses'$CBstatuses[$i]',"; + $VARSALEstatuses = "$VARSALEtatuses'$SALEstatuses[$i]',"; $VARMINstatuses = "$VARMINstatuses'$MINsec[$i]',"; $VARMAXstatuses = "$VARMAXstatuses'$MAXsec[$i]',"; if ($CBstatuses[$i] == 'Y') {$VARCBstatusesLIST .= " $statuses[$i]";} if ($SELstatuses[$i] == 'Y') {$VARSELstatuses_ct++;} + if ($SALEstatuses[$i] == 'Y') + {$VARSALEstatusesLIST .= " $statuses[$i]";} $i++; } ##### grab the additional user statuses that can be used for dispositioning by an agent for all calls if (strlen($VU_status_group_id) > 0) { - $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec FROM vicidial_campaign_statuses WHERE status != 'NEW' and campaign_id='$VU_status_group_id' order by status limit 500;"; + $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec,sale FROM vicidial_campaign_statuses WHERE status != 'NEW' and campaign_id='$VU_status_group_id' order by status limit 500;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01093',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -2352,24 +2372,28 @@ else $SELstatuses[$i] = $row[3]; $MINsec[$i] = $row[4]; $MAXsec[$i] = $row[5]; + $SALEstatuses[$i] = $row[6]; if ($TEST_all_statuses > 0) {$SELstatuses[$i]='Y';} $VARstatuses = "$VARstatuses'$statuses[$i]',"; $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; $VARSELstatuses = "$VARSELstatuses'$SELstatuses[$i]',"; $VARCBstatuses = "$VARCBstatuses'$CBstatuses[$i]',"; + $VARSALEstatuses = "$VARSALEstatuses'$SALEstatuses[$i]',"; $VARMINstatuses = "$VARMINstatuses'$MINsec[$i]',"; $VARMAXstatuses = "$VARMAXstatuses'$MAXsec[$i]',"; if ($CBstatuses[$i] == 'Y') {$VARCBstatusesLIST .= " $statuses[$i]";} if ($SELstatuses[$i] == 'Y') {$VARSELstatuses_ct++;} + if ($SALEstatuses[$i] == 'Y') + {$VARSALEstatusesLIST .= " $statuses[$i]";} $i++; $k++; } } ##### grab the campaign-specific statuses that can be used for dispositioning by an agent - $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec FROM vicidial_campaign_statuses WHERE status != 'NEW' and campaign_id='$VD_campaign' order by status limit 500;"; + $stmt="SELECT status,status_name,scheduled_callback,selectable,min_sec,max_sec,sale FROM vicidial_campaign_statuses WHERE status != 'NEW' and campaign_id='$VD_campaign' order by status limit 500;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01011',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -2384,17 +2408,21 @@ else $SELstatuses[$i] = $row[3]; $MINsec[$i] = $row[4]; $MAXsec[$i] = $row[5]; + $SALEstatuses[$i] = $row[6]; if ($TEST_all_statuses > 0) {$SELstatuses[$i]='Y';} $cVARstatuses = "$cVARstatuses'$statuses[$i]',"; $cVARstatusnames = "$cVARstatusnames'$status_names[$i]',"; $cVARSELstatuses = "$cVARSELstatuses'$SELstatuses[$i]',"; $cVARCBstatuses = "$cVARCBstatuses'$CBstatuses[$i]',"; + $cVARSALEstatuses = "$cVARSALEstatuses'$SALEstatuses[$i]',"; $cVARMINstatuses = "$cVARMINstatuses'$MINsec[$i]',"; $cVARMAXstatuses = "$cVARMAXstatuses'$MAXsec[$i]',"; if ($CBstatuses[$i] == 'Y') {$cVARCBstatusesLIST .= " $statuses[$i]";} if ($SELstatuses[$i] == 'Y') {$cVARSELstatuses_ct++;} + if ($SALEstatuses[$i] == 'Y') + {$cVARSALEstatusesLIST .= " $statuses[$i]";} $i++; $j++; } @@ -2403,17 +2431,21 @@ else $VARstatusnames = substr("$VARstatusnames", 0, -1); $VARSELstatuses = substr("$VARSELstatuses", 0, -1); $VARCBstatuses = substr("$VARCBstatuses", 0, -1); + $VARSALEstatuses = substr("$VARSALEstatuses", 0, -1); $VARMINstatuses = substr("$VARMINstatuses", 0, -1); $VARMAXstatuses = substr("$VARMAXstatuses", 0, -1); $VARCBstatusesLIST .= " "; + $VARSALEstatusesLIST .= " "; $cVARstatuses = substr("$cVARstatuses", 0, -1); $cVARstatusnames = substr("$cVARstatusnames", 0, -1); $cVARSELstatuses = substr("$cVARSELstatuses", 0, -1); $cVARCBstatuses = substr("$cVARCBstatuses", 0, -1); + $cVARSALEstatuses = substr("$cVARSALEstatuses", 0, -1); $cVARMINstatuses = substr("$cVARMINstatuses", 0, -1); $cVARMAXstatuses = substr("$cVARMAXstatuses", 0, -1); $cVARCBstatusesLIST .= " "; - + $cVARSALEstatusesLIST .= " "; + ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; $rslt=mysql_to_mysqli($stmt, $link); @@ -2446,7 +2478,7 @@ else $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -2633,6 +2665,7 @@ else $agent_hangup_route = $row[179]; $agent_hangup_value = $row[180]; $agent_hangup_ig_override = $row[181]; + $show_confetti = $row[182]; if ( (strlen($UGscript_id) > 0) and ($user_group_script == 'ENABLED') ) { @@ -5198,36 +5231,44 @@ if ( ($calls_waiting_vl_two != 'DISABLED') and (strlen($calls_waiting_vl_two) > VARstatusnames = new Array(); VARSELstatuses = new Array(); VARCBstatuses = new Array(); + VARSALEstatuses = new Array(); VARMINstatuses = new Array(); VARMAXstatuses = new Array(); var VARCBstatusesLIST = ''; + var VARSALEstatusesLIST = ''; var VD_statuses_ct = 0; var VARSELstatuses_ct = 0; gVARstatuses = new Array(); gVARstatusnames = new Array(); gVARSELstatuses = new Array(); gVARCBstatuses = new Array(); + gVARSALEstatuses = new Array(); gVARMINstatuses = new Array(); gVARMAXstatuses = new Array(); var gVARCBstatusesLIST = ''; + var gVARSALEstatusesLIST = ''; var gVD_statuses_ct = 0; var gVARSELstatuses_ct = 0; sVARstatuses = new Array(); sVARstatusnames = new Array(); sVARSELstatuses = new Array(); sVARCBstatuses = new Array(); + sVARSALEstatuses = new Array(); sVARMINstatuses = new Array(); sVARMAXstatuses = new Array(); var sVARCBstatusesLIST = ''; + var sVARSALEstatusesLIST = ''; var sVD_statuses_ct = ''; var sVARSELstatuses_ct = ''; cVARstatuses = new Array(); cVARstatusnames = new Array(); cVARSELstatuses = new Array(); cVARCBstatuses = new Array(); + cVARSALEstatuses = new Array(); cVARMINstatuses = new Array(); cVARMAXstatuses = new Array(); var cVARCBstatusesLIST = ''; + var cVARSALEstatusesLIST = ''; var cVD_statuses_ct = ''; var cVARSELstatuses_ct = ''; VARingroups = new Array(); @@ -5925,6 +5966,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var agent_hangup_route=''; var agent_hangup_value=''; var agent_hangup_ig_override=''; + var show_confetti=''; var DiaLControl_auto_HTML = "\" border=\"0\" alt=\"You are paused\" />"; var DiaLControl_auto_HTML_ready = "\" border=\"0\" alt=\"You are active\" />"; var DiaLControl_auto_HTML_OFF = "\" border=\"0\" alt=\"pause button disabled\" />"; @@ -9587,18 +9629,22 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARstatusnames = []; VARSELstatuses = []; VARCBstatuses = []; + VARSALEstatuses = []; VARMINstatuses = []; VARMAXstatuses = []; VARCBstatusesLIST = ''; + VARSALEstatusesLIST = ''; VD_statuses_ct = 0; VARSELstatuses_ct = 0; gVARstatuses = []; gVARstatusnames = []; gVARSELstatuses = []; gVARCBstatuses = []; + gVARSALEstatuses = []; gVARMINstatuses = []; gVARMAXstatuses = []; gVARCBstatusesLIST = ''; + gVARSALEstatusesLIST = ''; gVD_statuses_ct = 0; gVARSELstatuses_ct = 0; @@ -9617,8 +9663,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARCBstatuses[loop_gct] = gVARstatusesDETAILS[2]; gVARMINstatuses[loop_gct] = gVARstatusesDETAILS[3]; gVARMAXstatuses[loop_gct] = gVARstatusesDETAILS[4]; + gVARSALEstatuses[loop_gct] = gVARstatusesDETAILS[5]; if (gVARCBstatuses[loop_gct] == 'Y') {gVARCBstatusesLIST = gVARCBstatusesLIST + " " + gVARstatusesDETAILS[0];} + if (gVARSALEstatuses[loop_gct] == 'Y') + {gVARSALEstatusesLIST = gVARSALEstatusesLIST + " " + gVARstatusesDETAILS[0];} gVD_statuses_ct++; gVARSELstatuses_ct++; @@ -9631,9 +9680,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARstatusnames = cVARstatusnames; gVARSELstatuses = cVARSELstatuses; gVARCBstatuses = cVARCBstatuses; + gVARSALEstatuses = cVARSALEstatuses; gVARMINstatuses = cVARMINstatuses; gVARMAXstatuses = cVARMAXstatuses; gVARCBstatusesLIST = cVARCBstatusesLIST; + gVARSALEstatusesLIST = cVARSALEstatusesLIST; gVD_statuses_ct = cVD_statuses_ct; gVARSELstatuses_ct = cVARSELstatuses_ct; } @@ -9642,9 +9693,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARstatusnames = sVARstatusnames.concat(gVARstatusnames); VARSELstatuses = sVARSELstatuses.concat(gVARSELstatuses); VARCBstatuses = sVARCBstatuses.concat(gVARCBstatuses); + VARSALEstatuses = sVARSALEstatuses.concat(gVARSALEstatuses); VARMINstatuses = sVARMINstatuses.concat(gVARMINstatuses); VARMAXstatuses = sVARMAXstatuses.concat(gVARMAXstatuses); VARCBstatusesLIST = sVARCBstatusesLIST + ' ' + gVARCBstatusesLIST + ' '; + VARSALEstatusesLIST = sVARSALEstatusesLIST + ' ' + gVARSALEstatusesLIST + ' '; VD_statuses_ct = (Number(sVD_statuses_ct) + Number(gVD_statuses_ct)); VARSELstatuses_ct = (Number(sVARSELstatuses_ct) + Number(gVARSELstatuses_ct)); @@ -11261,18 +11314,22 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARstatusnames = []; VARSELstatuses = []; VARCBstatuses = []; + VARSALEstatuses = []; VARMINstatuses = []; VARMAXstatuses = []; VARCBstatusesLIST = ''; + VARSALEstatusesLIST = ''; VD_statuses_ct = 0; VARSELstatuses_ct = 0; gVARstatuses = []; gVARstatusnames = []; gVARSELstatuses = []; gVARCBstatuses = []; + gVARSALEstatuses = []; gVARMINstatuses = []; gVARMAXstatuses = []; gVARCBstatusesLIST = ''; + gVARSALEstatusesLIST = ''; gVD_statuses_ct = 0; gVARSELstatuses_ct = 0; @@ -11291,8 +11348,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARCBstatuses[loop_gct] = gVARstatusesDETAILS[2]; gVARMINstatuses[loop_gct] = gVARstatusesDETAILS[3]; gVARMAXstatuses[loop_gct] = gVARstatusesDETAILS[4]; + gVARSALEstatuses[loop_gct] = gVARstatusesDETAILS[5]; if (gVARCBstatuses[loop_gct] == 'Y') {gVARCBstatusesLIST = gVARCBstatusesLIST + " " + gVARstatusesDETAILS[0];} + if (gVARSALEstatuses[loop_gct] == 'Y') + {gVARSALEstatusesLIST = gVARSALEstatusesLIST + " " + gVARstatusesDETAILS[0];} gVD_statuses_ct++; gVARSELstatuses_ct++; @@ -11308,6 +11368,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARMINstatuses = cVARMINstatuses; gVARMAXstatuses = cVARMAXstatuses; gVARCBstatusesLIST = cVARCBstatusesLIST; + gVARSALEstatusesLIST = cVARSALEstatusesLIST; gVD_statuses_ct = cVD_statuses_ct; gVARSELstatuses_ct = cVARSELstatuses_ct; } @@ -11319,6 +11380,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARMINstatuses = sVARMINstatuses.concat(gVARMINstatuses); VARMAXstatuses = sVARMAXstatuses.concat(gVARMAXstatuses); VARCBstatusesLIST = sVARCBstatusesLIST + ' ' + gVARCBstatusesLIST + ' '; + VARSALEstatusesLIST = sVARSALEstatusesLIST + ' ' + gVARSALEstatusesLIST + ' '; VD_statuses_ct = (Number(sVD_statuses_ct) + Number(gVD_statuses_ct)); VARSELstatuses_ct = (Number(sVARSELstatuses_ct) + Number(gVARSELstatuses_ct)); @@ -12827,18 +12889,22 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARstatusnames = []; VARSELstatuses = []; VARCBstatuses = []; + VARSALEstatuses = []; VARMINstatuses = []; VARMAXstatuses = []; VARCBstatusesLIST = ''; + VARSALEstatusesLIST = ''; VD_statuses_ct = 0; VARSELstatuses_ct = 0; gVARstatuses = []; gVARstatusnames = []; gVARSELstatuses = []; gVARCBstatuses = []; + gVARSALEstatuses = []; gVARMINstatuses = []; gVARMAXstatuses = []; gVARCBstatusesLIST = ''; + gVARSALEstatusesLIST = ''; gVD_statuses_ct = 0; gVARSELstatuses_ct = 0; @@ -12857,8 +12923,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARCBstatuses[loop_gct] = gVARstatusesDETAILS[2]; gVARMINstatuses[loop_gct] = gVARstatusesDETAILS[3]; gVARMAXstatuses[loop_gct] = gVARstatusesDETAILS[4]; + gVARSALEstatuses[loop_gct] = gVARstatusesDETAILS[5]; if (gVARCBstatuses[loop_gct] == 'Y') {gVARCBstatusesLIST = gVARCBstatusesLIST + " " + gVARstatusesDETAILS[0];} + if (gVARSALEstatuses[loop_gct] == 'Y') + {gVARSALEstatusesLIST = gVARSALEstatusesLIST + " " + gVARstatusesDETAILS[0];} gVD_statuses_ct++; gVARSELstatuses_ct++; @@ -12874,6 +12943,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARMINstatuses = cVARMINstatuses; gVARMAXstatuses = cVARMAXstatuses; gVARCBstatusesLIST = cVARCBstatusesLIST; + gVARSALEstatusesLIST = cVARSALEstatusesLIST; gVD_statuses_ct = cVD_statuses_ct; gVARSELstatuses_ct = cVARSELstatuses_ct; } @@ -12885,6 +12955,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARMINstatuses = sVARMINstatuses.concat(gVARMINstatuses); VARMAXstatuses = sVARMAXstatuses.concat(gVARMAXstatuses); VARCBstatusesLIST = sVARCBstatusesLIST + ' ' + gVARCBstatusesLIST + ' '; + VARSALEstatusesLIST = sVARSALEstatusesLIST + ' ' + gVARSALEstatusesLIST + ' '; VD_statuses_ct = (Number(sVD_statuses_ct) + Number(gVD_statuses_ct)); VARSELstatuses_ct = (Number(sVARSELstatuses_ct) + Number(gVARSELstatuses_ct)); @@ -13653,16 +13724,20 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARCBstatuses = []; VARMINstatuses = []; VARMAXstatuses = []; + VARSALEstatuses = []; VARCBstatusesLIST = ''; + VARSALEstatusesLIST = ''; VD_statuses_ct = 0; VARSELstatuses_ct = 0; gVARstatuses = []; gVARstatusnames = []; gVARSELstatuses = []; gVARCBstatuses = []; + gVARSALEstatuses = []; gVARMINstatuses = []; gVARMAXstatuses = []; gVARCBstatusesLIST = ''; + gVARSALEstatusesLIST = ''; gVD_statuses_ct = 0; gVARSELstatuses_ct = 0; @@ -13681,8 +13756,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARCBstatuses[loop_gct] = gVARstatusesDETAILS[2]; gVARMINstatuses[loop_gct] = gVARstatusesDETAILS[3]; gVARMAXstatuses[loop_gct] = gVARstatusesDETAILS[4]; + gVARSALEstatuses[loop_gct] = gVARstatusesDETAILS[5]; if (gVARCBstatuses[loop_gct] == 'Y') {gVARCBstatusesLIST = gVARCBstatusesLIST + " " + gVARstatusesDETAILS[0];} + if (gVARSALEstatuses[loop_gct] == 'Y') + {gVARSALEstatusesLIST = gVARSALEstatusesLIST + " " + gVARstatusesDETAILS[0];} gVD_statuses_ct++; gVARSELstatuses_ct++; @@ -13698,6 +13776,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) gVARMINstatuses = cVARMINstatuses; gVARMAXstatuses = cVARMAXstatuses; gVARCBstatusesLIST = cVARCBstatusesLIST; + gVARSALEstatusesLIST = cVARSALEstatusesLIST; gVD_statuses_ct = cVD_statuses_ct; gVARSELstatuses_ct = cVARSELstatuses_ct; } @@ -13709,6 +13788,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) VARMINstatuses = sVARMINstatuses.concat(gVARMINstatuses); VARMAXstatuses = sVARMAXstatuses.concat(gVARMAXstatuses); VARCBstatusesLIST = sVARCBstatusesLIST + ' ' + gVARCBstatusesLIST + ' '; + VARSALEstatusesLIST = sVARSALEstatusesLIST + ' ' + gVARSALEstatusesLIST + ' '; VD_statuses_ct = (Number(sVD_statuses_ct) + Number(gVD_statuses_ct)); VARSELstatuses_ct = (Number(sVARSELstatuses_ct) + Number(gVARSELstatuses_ct)); @@ -15878,6 +15958,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.getElementById("CusTInfOSpaN").innerHTML = ""; document.getElementById("CusTInfOSpaN").style.background = panel_bgcolor; var regCBstatus = new RegExp(' ' + DispoChoice + ' ',"ig"); + if ( (VARCBstatusesLIST.match(regCBstatus)) && (DispoChoice.length > 0) && (scheduled_callbacks > 0) && (DispoChoice != 'CBHOLD') ) { var INTLastCallbackCount = parseInt(LastCallbackCount); @@ -16010,6 +16091,16 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } delete xmlhttp; } + + // console.log(DispoChoice+" -- "+show_confetti+" -- "+show_confetti.indexOf('CALLBACKS')+"\n\n"+VARCBstatusesLIST); + if ( (DispoChoice.length > 0) && ( (show_confetti.indexOf('CALLBACKS')>=0 && (VARCBstatusesLIST.match(regCBstatus) || DispoChoice=="CBHOLD")) || (show_confetti.indexOf('SALES')>=0 && VARSALEstatusesLIST.match(regCBstatus)) ) ) + { + // console.log(confettiDuration+" -- "+maxParticleCount+" -- "+particleSpeed); + startConfetti(); + // setTimeout( function() { FetchData(); }, 1000); + setTimeout(() => {stopConfetti();}, confettiDuration*1000) + } + // CLEAR ALL FORM VARIABLES document.vicidial_form.lead_id.value =''; document.vicidial_form.vendor_lead_code.value=''; @@ -21798,6 +21889,7 @@ $zi=2; ?> +
@@ -23622,6 +23714,6 @@ if ( ($SSbrowser_call_alerts > 0) or ($SSagent_hidden_sound_seconds > 0) ) diff --git a/www/vicidial/AST_url_log_report.php b/www/vicidial/AST_url_log_report.php index 2955e589..3157d5af 100644 --- a/www/vicidial/AST_url_log_report.php +++ b/www/vicidial/AST_url_log_report.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Joe Johnson, Matt Florell LICENSE: AGPLv2 # # CHANGES # 130620-0806 - First build @@ -14,6 +14,7 @@ # 170710-1801 - Added webform url type # 220301-1951 - Added allow_web_debug system setting # 220812-0931 - Added User Group report permissions checking +# 230310-1051 - Added more missing url types # $startMS = microtime(); @@ -270,7 +271,7 @@ while($i < $url_type_ct) $i++; } -$LISTurltypes=array("add_lead", "custom", "dispo", "na_callurl", "non-agent", "other", "qm_socket", "start", "start_ra","nva_phone","DID_FILTER","DNCcom","park_ivr_c","webform"); +$LISTurltypes=array("abandonchk","add_lead","ccc_look","custom","dead","DID_FILTER","dispo","DNCcom","enter_ig","event","na_callurl","non-agent","nva_phone","other","park_ivr_c","pause_max","qm_socket","sc_callurl","start","start_ra","TCPAlit","2FA_SMS","TILTX_SHAK","wcu_off","wcu_on","webform"); $url_types_to_print=count($LISTurltypes); $i=0; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index fcd21041..bec27ba9 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -2740,6 +2740,12 @@ if (isset($_GET["agent_hangup_value"])) {$agent_hangup_value=$_GET["agent_han elseif (isset($_POST["agent_hangup_value"])) {$agent_hangup_value=$_POST["agent_hangup_value"];} if (isset($_GET["agent_hangup_ig_override"])) {$agent_hangup_ig_override=$_GET["agent_hangup_ig_override"];} elseif (isset($_POST["agent_hangup_ig_override"])) {$agent_hangup_ig_override=$_POST["agent_hangup_ig_override"];} +if (isset($_GET["abandon_check_queue"])) {$abandon_check_queue=$_GET["abandon_check_queue"];} + elseif (isset($_POST["abandon_check_queue"])) {$abandon_check_queue=$_POST["abandon_check_queue"];} +if (isset($_GET["ara_url"])) {$ara_url=$_GET["ara_url"];} + elseif (isset($_POST["ara_url"])) {$ara_url=$_POST["ara_url"];} +if (isset($_GET["show_confetti"])) {$show_confetti=$_GET["show_confetti"];} + elseif (isset($_POST["show_confetti"])) {$show_confetti=$_POST["show_confetti"];} $DB=preg_replace("/[^0-9a-zA-Z]/","",$DB); @@ -2755,7 +2761,7 @@ if (strlen($dial_status) > 0) ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,allow_emails,level_8_disable_add,pass_key,pass_hash_enabled,disable_auto_dial,country_code_list_stats,frozen_server_call_clear,active_modules,allow_chats,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,default_language,user_hide_realtime_enabled,log_recording_access,alt_ivr_logging,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,agent_soundboards,web_loader_phone_length,agent_script,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,enable_gdpr_download_deletion,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,inbound_answer_config,enable_international_dncs,daily_call_count_limit,allow_shared_dial,agent_search_method,admin_home_url,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin FROM system_settings;"; +$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,allow_emails,level_8_disable_add,pass_key,pass_hash_enabled,disable_auto_dial,country_code_list_stats,frozen_server_call_clear,active_modules,allow_chats,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,default_language,user_hide_realtime_enabled,log_recording_access,alt_ivr_logging,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,agent_soundboards,web_loader_phone_length,agent_script,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,enable_gdpr_download_deletion,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,inbound_answer_config,enable_international_dncs,daily_call_count_limit,allow_shared_dial,agent_search_method,admin_home_url,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin,abandon_check_queue FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); #if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); @@ -2867,6 +2873,7 @@ if ($qm_conf_ct > 0) $SSallow_web_debug = $row[102]; $SSmax_logged_in_agents = $row[103]; $SSuser_codes_admin = $row[104]; + $SSabandon_check_queue = $row[105]; } if ($SSallow_web_debug < 1) {$DB=0;} ##### END SETTINGS LOOKUP ##### @@ -3459,6 +3466,7 @@ $max_logged_in_agents = preg_replace('/[^-_0-9a-zA-Z]/','',$max_logged_in_agents $user_codes_admin = preg_replace('/[^-_0-9a-zA-Z]/','',$user_codes_admin); $conf_engine = preg_replace('/[^-_0-9a-zA-Z]/','',$conf_engine); $user_group_script = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group_script); +$abandon_check_queue = preg_replace('/[^-_0-9a-zA-Z]/','',$abandon_check_queue); if ($non_latin < 1) { @@ -3886,6 +3894,7 @@ if ($non_latin < 1) $agent_script_override = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_script_override); $inbound_list_script_override = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_list_script_override); $agent_hangup_route = preg_replace('/[^-_0-9a-zA-Z]/','',$agent_hangup_route); + $show_confetti = preg_replace('/[^-_0-9a-zA-Z]/','',$show_confetti); ### ALPHA-NUMERIC and underscore $qc_statuses_id = preg_replace('/[^_0-9a-zA-Z]/','',$qc_statuses_id); @@ -4610,6 +4619,7 @@ else $inbound_list_script_override = preg_replace('/[^-_0-9\p{L}]/u','',$inbound_list_script_override); $user_group_two = preg_replace('/[^-_0-9\p{L}]/u','',$user_group_two); $agent_hangup_route = preg_replace('/[^-_0-9\p{L}]/u','',$agent_hangup_route); + $show_confetti = preg_replace('/[^-_0-9\p{L}]/u','',$show_confetti); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9\p{L}]/u','',$menu_timeout_prompt); @@ -5007,6 +5017,7 @@ $pause_max_url = preg_replace('/\'/', '',$pause_max_url); # $VICIDIAL_web_URL # $audit_comments # $chat_url +# $ara_url # filtered further down in the code # $groups @@ -5972,12 +5983,13 @@ if ($SSscript_remove_js > 0) # 230227-1150 - Updated VERM code and notices # 230306-1336 - Added 20Hz_tone browser sound, Issue #1448 # 230306-2050 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448 +# 230311-0859 - Added abandon_check_queue system setting, ara_url server option and show_confetti campaign feature # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-876a'; -$build = '230306-2050'; +$admin_version = '2.14-877a'; +$build = '230311-0859'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -12391,7 +12403,7 @@ if ($ADD==20) $rslt=mysql_to_mysqli($stmtX, $link); } - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,allow_chats,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,in_group_dial,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_to_mysqli($stmt, $link); $affected_rows = mysqli_affected_rows($link); @@ -17134,7 +17146,7 @@ if ($ADD==41) $hdrtMESSAGE='Hopper All-Drops-Run Triggered'; } - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_trim_hopper='$auto_trim_hopper', use_auto_hopper='$use_auto_hopper', auto_hopper_multi='$auto_hopper_multi', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns=$closer_campaignsSQL,use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysqli_real_escape_string($link, $crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysqli_real_escape_string($link, $start_call_url) . "',dispo_call_url='" . mysqli_real_escape_string($link, $dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysqli_real_escape_string($link, $blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats',api_manual_dial='$api_manual_dial',manual_dial_call_time_check='$manual_dial_call_time_check',lead_order_randomize='$lead_order_randomize',lead_order_secondary='$lead_order_secondary',per_call_notes='$per_call_notes',my_callback_option='$my_callback_option',agent_lead_search='$agent_lead_search',agent_lead_search_method='$agent_lead_search_method',queuemetrics_phone_environment='$queuemetrics_phone_environment',auto_pause_precall='$auto_pause_precall',auto_resume_precall='$auto_resume_precall',auto_pause_precall_code='$auto_pause_precall_code',manual_dial_cid='$manual_dial_cid',post_phone_time_diff_alert='$post_phone_time_diff_alert',custom_3way_button_transfer='$custom_3way_button_transfer',available_only_tally_threshold='$available_only_tally_threshold',available_only_tally_threshold_agents='$available_only_tally_threshold_agents',dial_level_threshold='$dial_level_threshold',dial_level_threshold_agents='$dial_level_threshold_agents',safe_harbor_audio='$safe_harbor_audio',safe_harbor_menu_id='$safe_harbor_menu_id',callback_days_limit='$callback_days_limit',dl_diff_target_method='$dl_diff_target_method',disable_dispo_screen='$disable_dispo_screen',disable_dispo_status='$disable_dispo_status',screen_labels='$screen_labels',status_display_fields='$status_display_fields',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',pllb_grouping='$pllb_grouping',pllb_grouping_limit='$pllb_grouping_limit',call_count_limit='$call_count_limit',call_count_target='$call_count_target',callback_hours_block='$callback_hours_block',callback_list_calltime='$callback_list_calltime',user_group='$user_group',hopper_vlc_dup_check='$hopper_vlc_dup_check',in_group_dial='$in_group_dial',in_group_dial_select='$in_group_dial_select',safe_harbor_audio_field='$safe_harbor_audio_field',pause_after_next_call='$pause_after_next_call',owner_populate='$owner_populate',use_other_campaign_dnc='$use_other_campaign_dnc',allow_emails='$allow_emails',allow_chats='$allow_chats',amd_inbound_group='$amd_inbound_group',amd_callmenu='$amd_callmenu',manual_dial_lead_id='$manual_dial_lead_id',dead_max='$dead_max',dispo_max='$dispo_max',pause_max='$pause_max',dead_max_dispo='$dead_max_dispo',dispo_max_dispo='$dispo_max_dispo',max_inbound_calls='$max_inbound_calls',manual_dial_search_checkbox='$manual_dial_search_checkbox',hide_call_log_info='$hide_call_log_info',timer_alt_seconds='$timer_alt_seconds',wrapup_bypass='$wrapup_bypass',wrapup_after_hotkey='$wrapup_after_hotkey',callback_active_limit='$callback_active_limit',callback_active_limit_override='$callback_active_limit_override',comments_all_tabs='$comments_all_tabs',comments_dispo_screen='$comments_dispo_screen',comments_callback_screen='$comments_callback_screen',qc_comment_history='$qc_comment_history',show_previous_callback='$show_previous_callback',clear_script='$clear_script',cpd_unknown_action='$cpd_unknown_action',manual_dial_search_filter='$manual_dial_search_filter',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',manual_dial_override_field='$manual_dial_override_field',status_display_ingroup='$status_display_ingroup',customer_gone_seconds='$customer_gone_seconds',agent_display_fields='$agent_display_fields',am_message_wildcards='$am_message_wildcards',manual_dial_timeout='$manual_dial_timeout',routing_initiated_recordings='$routing_initiated_recordings',manual_dial_hopper_check='$manual_dial_hopper_check',callback_useronly_move_minutes='$callback_useronly_move_minutes',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',manual_auto_next='$manual_auto_next',manual_auto_show='$manual_auto_show',allow_required_fields='$allow_required_fields',dead_to_dispo='$dead_to_dispo',agent_xfer_validation='$agent_xfer_validation',ready_max_logout='$ready_max_logout',callback_display_days='$callback_display_days',three_way_record_stop='$three_way_record_stop',hangup_xfer_record_start='$hangup_xfer_record_start',scheduled_callbacks_email_alert='$scheduled_callbacks_email_alert',max_inbound_calls_outcome='$max_inbound_calls_outcome',manual_auto_next_options='$manual_auto_next_options',agent_screen_time_display='$agent_screen_time_display',next_dial_my_callbacks='$next_dial_my_callbacks',inbound_no_agents_no_dial_container='$inbound_no_agents_no_dial_container',inbound_no_agents_no_dial_threshold='$inbound_no_agents_no_dial_threshold',cid_group_id='$cid_group_id',pause_max_dispo='$pause_max_dispo',script_top_dispo='$script_top_dispo',dead_trigger_seconds='$dead_trigger_seconds',dead_trigger_action='$dead_trigger_action',dead_trigger_repeat='$dead_trigger_repeat',dead_trigger_filename='$dead_trigger_filename',dead_trigger_url='" . mysqli_real_escape_string($link, $dead_trigger_url) . "',scheduled_callbacks_force_dial='$scheduled_callbacks_force_dial',scheduled_callbacks_auto_reschedule='$scheduled_callbacks_auto_reschedule',scheduled_callbacks_timezones_container='$scheduled_callbacks_timezones_container',three_way_volume_buttons='$three_way_volume_buttons',callback_dnc='$callback_dnc',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',auto_active_list_new='$auto_active_list_new',call_quota_lead_ranking='$call_quota_lead_ranking',sip_event_logging='$sip_event_logging',campaign_script_two='$campaign_script_two',leave_vm_no_dispo='$leave_vm_no_dispo',leave_vm_message_group_id='$leave_vm_message_group_id',dial_timeout_lead_container='$dial_timeout_lead_container',amd_type='$amd_type',vmm_daily_limit='$vmm_daily_limit',opensips_cid_name='$opensips_cid_name',amd_agent_route_options='$amd_agent_route_options',browser_alert_sound='$browser_alert_sound',browser_alert_volume='$browser_alert_volume',three_way_record_stop_exception='$three_way_record_stop_exception',pause_max_exceptions='$pause_max_exceptions',daily_call_count_limit='$daily_call_count_limit',daily_limit_manual='$daily_limit_manual',transfer_button_launch='$transfer_button_launch',shared_dial_rank='$shared_dial_rank',agent_search_method='$agent_search_method',clear_form='$clear_form',leave_3way_start_recording='$leave_3way_start_recording',leave_3way_start_recording_exception='$leave_3way_start_recording_exception',calls_waiting_vl_one='$calls_waiting_vl_one',calls_waiting_vl_two='$calls_waiting_vl_two',calls_inqueue_count_one='$calls_inqueue_count_one',calls_inqueue_count_two='$calls_inqueue_count_two',in_man_dial_next_ready_seconds='$in_man_dial_next_ready_seconds',in_man_dial_next_ready_seconds_override='$in_man_dial_next_ready_seconds_override',transfer_no_dispo='$transfer_no_dispo',call_limit_24hour_method='$call_limit_24hour_method',call_limit_24hour_scope='$call_limit_24hour_scope',call_limit_24hour='$call_limit_24hour',call_limit_24hour_override='$call_limit_24hour_override',cid_group_id_two='$cid_group_id_two',incall_tally_threshold_seconds='$incall_tally_threshold_seconds',auto_alt_threshold='$auto_alt_threshold',pause_max_url='$pause_max_url',agent_hide_hangup='$agent_hide_hangup',ig_xfer_list_sort='$ig_xfer_list_sort',script_tab_frame_size='$script_tab_frame_size',max_logged_in_agents='$max_logged_in_agents',user_group_script='$user_group_script',agent_hangup_route='$agent_hangup_route',agent_hangup_value='$agent_hangup_value',agent_hangup_ig_override='$agent_hangup_ig_override'$hdrtSQL where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', auto_trim_hopper='$auto_trim_hopper', use_auto_hopper='$use_auto_hopper', auto_hopper_multi='$auto_hopper_multi', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysqli_real_escape_string($link, $web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns=$closer_campaignsSQL,use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysqli_real_escape_string($link, $web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysqli_real_escape_string($link, $crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysqli_real_escape_string($link, $start_call_url) . "',dispo_call_url='" . mysqli_real_escape_string($link, $dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysqli_real_escape_string($link, $blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats',api_manual_dial='$api_manual_dial',manual_dial_call_time_check='$manual_dial_call_time_check',lead_order_randomize='$lead_order_randomize',lead_order_secondary='$lead_order_secondary',per_call_notes='$per_call_notes',my_callback_option='$my_callback_option',agent_lead_search='$agent_lead_search',agent_lead_search_method='$agent_lead_search_method',queuemetrics_phone_environment='$queuemetrics_phone_environment',auto_pause_precall='$auto_pause_precall',auto_resume_precall='$auto_resume_precall',auto_pause_precall_code='$auto_pause_precall_code',manual_dial_cid='$manual_dial_cid',post_phone_time_diff_alert='$post_phone_time_diff_alert',custom_3way_button_transfer='$custom_3way_button_transfer',available_only_tally_threshold='$available_only_tally_threshold',available_only_tally_threshold_agents='$available_only_tally_threshold_agents',dial_level_threshold='$dial_level_threshold',dial_level_threshold_agents='$dial_level_threshold_agents',safe_harbor_audio='$safe_harbor_audio',safe_harbor_menu_id='$safe_harbor_menu_id',callback_days_limit='$callback_days_limit',dl_diff_target_method='$dl_diff_target_method',disable_dispo_screen='$disable_dispo_screen',disable_dispo_status='$disable_dispo_status',screen_labels='$screen_labels',status_display_fields='$status_display_fields',na_call_url='" . mysqli_real_escape_string($link, $na_call_url) . "',pllb_grouping='$pllb_grouping',pllb_grouping_limit='$pllb_grouping_limit',call_count_limit='$call_count_limit',call_count_target='$call_count_target',callback_hours_block='$callback_hours_block',callback_list_calltime='$callback_list_calltime',user_group='$user_group',hopper_vlc_dup_check='$hopper_vlc_dup_check',in_group_dial='$in_group_dial',in_group_dial_select='$in_group_dial_select',safe_harbor_audio_field='$safe_harbor_audio_field',pause_after_next_call='$pause_after_next_call',owner_populate='$owner_populate',use_other_campaign_dnc='$use_other_campaign_dnc',allow_emails='$allow_emails',allow_chats='$allow_chats',amd_inbound_group='$amd_inbound_group',amd_callmenu='$amd_callmenu',manual_dial_lead_id='$manual_dial_lead_id',dead_max='$dead_max',dispo_max='$dispo_max',pause_max='$pause_max',dead_max_dispo='$dead_max_dispo',dispo_max_dispo='$dispo_max_dispo',max_inbound_calls='$max_inbound_calls',manual_dial_search_checkbox='$manual_dial_search_checkbox',hide_call_log_info='$hide_call_log_info',timer_alt_seconds='$timer_alt_seconds',wrapup_bypass='$wrapup_bypass',wrapup_after_hotkey='$wrapup_after_hotkey',callback_active_limit='$callback_active_limit',callback_active_limit_override='$callback_active_limit_override',comments_all_tabs='$comments_all_tabs',comments_dispo_screen='$comments_dispo_screen',comments_callback_screen='$comments_callback_screen',qc_comment_history='$qc_comment_history',show_previous_callback='$show_previous_callback',clear_script='$clear_script',cpd_unknown_action='$cpd_unknown_action',manual_dial_search_filter='$manual_dial_search_filter',web_form_address_three='" . mysqli_real_escape_string($link, $web_form_address_three) . "',manual_dial_override_field='$manual_dial_override_field',status_display_ingroup='$status_display_ingroup',customer_gone_seconds='$customer_gone_seconds',agent_display_fields='$agent_display_fields',am_message_wildcards='$am_message_wildcards',manual_dial_timeout='$manual_dial_timeout',routing_initiated_recordings='$routing_initiated_recordings',manual_dial_hopper_check='$manual_dial_hopper_check',callback_useronly_move_minutes='$callback_useronly_move_minutes',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',manual_auto_next='$manual_auto_next',manual_auto_show='$manual_auto_show',allow_required_fields='$allow_required_fields',dead_to_dispo='$dead_to_dispo',agent_xfer_validation='$agent_xfer_validation',ready_max_logout='$ready_max_logout',callback_display_days='$callback_display_days',three_way_record_stop='$three_way_record_stop',hangup_xfer_record_start='$hangup_xfer_record_start',scheduled_callbacks_email_alert='$scheduled_callbacks_email_alert',max_inbound_calls_outcome='$max_inbound_calls_outcome',manual_auto_next_options='$manual_auto_next_options',agent_screen_time_display='$agent_screen_time_display',next_dial_my_callbacks='$next_dial_my_callbacks',inbound_no_agents_no_dial_container='$inbound_no_agents_no_dial_container',inbound_no_agents_no_dial_threshold='$inbound_no_agents_no_dial_threshold',cid_group_id='$cid_group_id',pause_max_dispo='$pause_max_dispo',script_top_dispo='$script_top_dispo',dead_trigger_seconds='$dead_trigger_seconds',dead_trigger_action='$dead_trigger_action',dead_trigger_repeat='$dead_trigger_repeat',dead_trigger_filename='$dead_trigger_filename',dead_trigger_url='" . mysqli_real_escape_string($link, $dead_trigger_url) . "',scheduled_callbacks_force_dial='$scheduled_callbacks_force_dial',scheduled_callbacks_auto_reschedule='$scheduled_callbacks_auto_reschedule',scheduled_callbacks_timezones_container='$scheduled_callbacks_timezones_container',three_way_volume_buttons='$three_way_volume_buttons',callback_dnc='$callback_dnc',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',auto_active_list_new='$auto_active_list_new',call_quota_lead_ranking='$call_quota_lead_ranking',sip_event_logging='$sip_event_logging',campaign_script_two='$campaign_script_two',leave_vm_no_dispo='$leave_vm_no_dispo',leave_vm_message_group_id='$leave_vm_message_group_id',dial_timeout_lead_container='$dial_timeout_lead_container',amd_type='$amd_type',vmm_daily_limit='$vmm_daily_limit',opensips_cid_name='$opensips_cid_name',amd_agent_route_options='$amd_agent_route_options',browser_alert_sound='$browser_alert_sound',browser_alert_volume='$browser_alert_volume',three_way_record_stop_exception='$three_way_record_stop_exception',pause_max_exceptions='$pause_max_exceptions',daily_call_count_limit='$daily_call_count_limit',daily_limit_manual='$daily_limit_manual',transfer_button_launch='$transfer_button_launch',shared_dial_rank='$shared_dial_rank',agent_search_method='$agent_search_method',clear_form='$clear_form',leave_3way_start_recording='$leave_3way_start_recording',leave_3way_start_recording_exception='$leave_3way_start_recording_exception',calls_waiting_vl_one='$calls_waiting_vl_one',calls_waiting_vl_two='$calls_waiting_vl_two',calls_inqueue_count_one='$calls_inqueue_count_one',calls_inqueue_count_two='$calls_inqueue_count_two',in_man_dial_next_ready_seconds='$in_man_dial_next_ready_seconds',in_man_dial_next_ready_seconds_override='$in_man_dial_next_ready_seconds_override',transfer_no_dispo='$transfer_no_dispo',call_limit_24hour_method='$call_limit_24hour_method',call_limit_24hour_scope='$call_limit_24hour_scope',call_limit_24hour='$call_limit_24hour',call_limit_24hour_override='$call_limit_24hour_override',cid_group_id_two='$cid_group_id_two',incall_tally_threshold_seconds='$incall_tally_threshold_seconds',auto_alt_threshold='$auto_alt_threshold',pause_max_url='$pause_max_url',agent_hide_hangup='$agent_hide_hangup',ig_xfer_list_sort='$ig_xfer_list_sort',script_tab_frame_size='$script_tab_frame_size',max_logged_in_agents='$max_logged_in_agents',user_group_script='$user_group_script',agent_hangup_route='$agent_hangup_route',agent_hangup_value='$agent_hangup_value',agent_hangup_ig_override='$agent_hangup_ig_override',show_confetti='$show_confetti'$hdrtSQL where campaign_id='$campaign_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmtA, $link); @@ -19476,7 +19488,7 @@ if ($ADD==411111111111) $custom_dialplanSQL=''; if ($LOGmodify_custom_dialplans > 0) {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";} - $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active',balance_trunks_offlimits='$balance_trunks_offlimits',recording_web_link='$recording_web_link',alt_server_ip='$alt_server_ip',active_asterisk_server='$active_asterisk_server',generate_vicidial_conf='$generate_vicidial_conf',rebuild_conf_files='$rebuild_conf_files',outbound_calls_per_second='$outbound_calls_per_second',sounds_update='$sounds_update',vicidial_recording_limit='$vicidial_recording_limit',carrier_logging_active='$carrier_logging_active',vicidial_balance_rank='$vicidial_balance_rank',rebuild_music_on_hold='$rebuild_music_on_hold',active_agent_login_server='$active_agent_login_server',conf_secret='$conf_secret',external_server_ip='$external_server_ip',active_twin_server_ip='$active_twin_server_ip',user_group='$user_group',auto_restart_asterisk='$auto_restart_asterisk',asterisk_temp_no_restart='$asterisk_temp_no_restart',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',gather_asterisk_output='$gather_asterisk_output',conf_qualify='$conf_qualify',web_socket_url='" . mysqli_real_escape_string($link, $web_socket_url) . "',routing_prefix='$routing_prefix',external_web_socket_url='" . mysqli_real_escape_string($link, $external_web_socket_url) . "',conf_engine='$conf_engine',conf_update_interval='$conf_update_interval'$custom_dialplanSQL where server_id='$old_server_id';"; + $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active',balance_trunks_offlimits='$balance_trunks_offlimits',recording_web_link='$recording_web_link',alt_server_ip='$alt_server_ip',active_asterisk_server='$active_asterisk_server',generate_vicidial_conf='$generate_vicidial_conf',rebuild_conf_files='$rebuild_conf_files',outbound_calls_per_second='$outbound_calls_per_second',sounds_update='$sounds_update',vicidial_recording_limit='$vicidial_recording_limit',carrier_logging_active='$carrier_logging_active',vicidial_balance_rank='$vicidial_balance_rank',rebuild_music_on_hold='$rebuild_music_on_hold',active_agent_login_server='$active_agent_login_server',conf_secret='$conf_secret',external_server_ip='$external_server_ip',active_twin_server_ip='$active_twin_server_ip',user_group='$user_group',auto_restart_asterisk='$auto_restart_asterisk',asterisk_temp_no_restart='$asterisk_temp_no_restart',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',gather_asterisk_output='$gather_asterisk_output',conf_qualify='$conf_qualify',web_socket_url='" . mysqli_real_escape_string($link, $web_socket_url) . "',routing_prefix='$routing_prefix',external_web_socket_url='" . mysqli_real_escape_string($link, $external_web_socket_url) . "',conf_engine='$conf_engine',conf_update_interval='$conf_update_interval',ara_url='" . mysqli_real_escape_string($link, $ara_url) . "'$custom_dialplanSQL where server_id='$old_server_id';"; $rslt=mysql_to_mysqli($stmt, $link); $stmtA="UPDATE servers SET rebuild_conf_files='Y',rebuild_music_on_hold='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';"; @@ -20862,7 +20874,7 @@ if ($ADD==411111111111111) } } - $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='" . mysqli_real_escape_string($link, $queuemetrics_url) . "',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='" . mysqli_real_escape_string($link, $admin_home_url) . "',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='" . mysqli_real_escape_string($link, $vtiger_url) . "',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',label_lead_id='$label_lead_id',label_list_id='$label_list_id',label_entry_date='$label_entry_date',label_gmt_offset_now='$label_gmt_offset_now',label_source_id='$label_source_id',label_called_since_last_reset='$label_called_since_last_reset',label_status='$label_status',label_user='$label_user',label_date_of_birth='$label_date_of_birth',label_country_code='$label_country_code',label_last_local_call_time='$label_last_local_call_time',label_called_count='$label_called_count',label_rank='$label_rank',label_owner='$label_owner',label_entry_list_id='$label_entry_list_id',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='" . mysqli_real_escape_string($link, $chat_url) . "',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url',hide_inactive_lists='$hide_inactive_lists',allow_manage_active_lists='$allow_manage_active_lists',expired_lists_inactive='$expired_lists_inactive',did_system_filter='$did_system_filter',anyone_callback_inactive_lists='$anyone_callback_inactive_lists',enable_gdpr_download_deletion='$enable_gdpr_download_deletion',source_id_display='$source_id_display',agent_logout_link='$agent_logout_link',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',user_admin_redirect='$user_admin_redirect',list_status_modification_confirmation='$list_status_modification_confirmation',sip_event_logging='$sip_event_logging',call_quota_lead_ranking='$call_quota_lead_ranking',enable_second_script='$enable_second_script',enable_first_webform='$enable_first_webform',recording_buttons='$recording_buttons',opensips_cid_name='$opensips_cid_name',require_password_length='$require_password_length',user_account_emails='$user_account_emails',outbound_cid_any='$outbound_cid_any',entries_per_page='$entries_per_page',browser_call_alerts='$browser_call_alerts',queuemetrics_pausereason='$queuemetrics_pausereason',inbound_answer_config='$inbound_answer_config',enable_international_dncs='$enable_international_dncs',web_loader_phone_strip='$web_loader_phone_strip',manual_dial_phone_strip='$manual_dial_phone_strip',daily_call_count_limit='$daily_call_count_limit',allow_shared_dial='$allow_shared_dial',agent_search_method='$agent_search_method',phone_defaults_container='$phone_defaults_container',qc_claim_limit='$qc_claim_limit',qc_expire_days='$qc_expire_days',two_factor_auth_hours='$two_factor_auth_hours',two_factor_container='$two_factor_container',agent_hidden_sound='$agent_hidden_sound',agent_hidden_sound_volume='$agent_hidden_sound_volume',agent_hidden_sound_seconds='$agent_hidden_sound_seconds',agent_screen_timer='$agent_screen_timer',call_limit_24hour='$call_limit_24hour',allowed_sip_stacks='$allowed_sip_stacks',agent_hide_hangup='$agent_hide_hangup',allow_web_debug='$allow_web_debug',max_logged_in_agents='$max_logged_in_agents',user_codes_admin='$user_codes_admin',login_kickall='$login_kickall'$custom_dialplanSQL;"; + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='" . mysqli_real_escape_string($link, $queuemetrics_url) . "',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='" . mysqli_real_escape_string($link, $admin_home_url) . "',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='" . mysqli_real_escape_string($link, $vtiger_url) . "',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',label_lead_id='$label_lead_id',label_list_id='$label_list_id',label_entry_date='$label_entry_date',label_gmt_offset_now='$label_gmt_offset_now',label_source_id='$label_source_id',label_called_since_last_reset='$label_called_since_last_reset',label_status='$label_status',label_user='$label_user',label_date_of_birth='$label_date_of_birth',label_country_code='$label_country_code',label_last_local_call_time='$label_last_local_call_time',label_called_count='$label_called_count',label_rank='$label_rank',label_owner='$label_owner',label_entry_list_id='$label_entry_list_id',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='" . mysqli_real_escape_string($link, $chat_url) . "',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url',hide_inactive_lists='$hide_inactive_lists',allow_manage_active_lists='$allow_manage_active_lists',expired_lists_inactive='$expired_lists_inactive',did_system_filter='$did_system_filter',anyone_callback_inactive_lists='$anyone_callback_inactive_lists',enable_gdpr_download_deletion='$enable_gdpr_download_deletion',source_id_display='$source_id_display',agent_logout_link='$agent_logout_link',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',user_admin_redirect='$user_admin_redirect',list_status_modification_confirmation='$list_status_modification_confirmation',sip_event_logging='$sip_event_logging',call_quota_lead_ranking='$call_quota_lead_ranking',enable_second_script='$enable_second_script',enable_first_webform='$enable_first_webform',recording_buttons='$recording_buttons',opensips_cid_name='$opensips_cid_name',require_password_length='$require_password_length',user_account_emails='$user_account_emails',outbound_cid_any='$outbound_cid_any',entries_per_page='$entries_per_page',browser_call_alerts='$browser_call_alerts',queuemetrics_pausereason='$queuemetrics_pausereason',inbound_answer_config='$inbound_answer_config',enable_international_dncs='$enable_international_dncs',web_loader_phone_strip='$web_loader_phone_strip',manual_dial_phone_strip='$manual_dial_phone_strip',daily_call_count_limit='$daily_call_count_limit',allow_shared_dial='$allow_shared_dial',agent_search_method='$agent_search_method',phone_defaults_container='$phone_defaults_container',qc_claim_limit='$qc_claim_limit',qc_expire_days='$qc_expire_days',two_factor_auth_hours='$two_factor_auth_hours',two_factor_container='$two_factor_container',agent_hidden_sound='$agent_hidden_sound',agent_hidden_sound_volume='$agent_hidden_sound_volume',agent_hidden_sound_seconds='$agent_hidden_sound_seconds',agent_screen_timer='$agent_screen_timer',call_limit_24hour='$call_limit_24hour',allowed_sip_stacks='$allowed_sip_stacks',agent_hide_hangup='$agent_hide_hangup',allow_web_debug='$allow_web_debug',max_logged_in_agents='$max_logged_in_agents',user_codes_admin='$user_codes_admin',login_kickall='$login_kickall',abandon_check_queue='$abandon_check_queue'$custom_dialplanSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $update_main_rows=mysqli_affected_rows($link); if ($DB) {echo "$update_main_rows|$stmt|\n";} @@ -25811,7 +25823,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,in_group_dial,in_group_dial_select,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,allow_chats,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,call_quota_process_running,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats,use_auto_hopper,auto_hopper_multi,auto_trim_hopper,api_manual_dial,manual_dial_call_time_check,display_leads_count,lead_order_randomize,lead_order_secondary,per_call_notes,my_callback_option,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_resume_precall,auto_pause_precall_code,manual_dial_cid,post_phone_time_diff_alert,custom_3way_button_transfer,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,safe_harbor_audio,safe_harbor_menu_id,survey_menu_id,callback_days_limit,dl_diff_target_method,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,na_call_url,survey_recording,pllb_grouping,pllb_grouping_limit,call_count_limit,call_count_target,callback_hours_block,callback_list_calltime,user_group,hopper_vlc_dup_check,in_group_dial,in_group_dial_select,safe_harbor_audio_field,pause_after_next_call,owner_populate,use_other_campaign_dnc,allow_emails,amd_inbound_group,amd_callmenu,survey_wait_sec,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,allow_chats,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,cpd_unknown_action,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,am_message_wildcards,manual_dial_timeout,routing_initiated_recordings,manual_dial_hopper_check,callback_useronly_move_minutes,ofcom_uk_drop_calc,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,scheduled_callbacks_email_alert,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,next_dial_my_callbacks,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,pause_max_dispo,script_top_dispo,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,dead_trigger_url,scheduled_callbacks_force_dial,scheduled_callbacks_auto_reschedule,scheduled_callbacks_timezones_container,three_way_volume_buttons,callback_dnc,manual_dial_validation,mute_recordings,auto_active_list_new,call_quota_lead_ranking,call_quota_process_running,sip_event_logging,campaign_script_two,leave_vm_no_dispo,leave_vm_message_group_id,dial_timeout_lead_container,amd_type,vmm_daily_limit,opensips_cid_name,amd_agent_route_options,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,hopper_drop_run_trigger,daily_call_count_limit,daily_limit_manual,transfer_button_launch,shared_dial_rank,agent_search_method,qc_scorecard_id,qc_statuses_id,clear_form,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,calls_inqueue_count_one,calls_inqueue_count_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,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,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,max_logged_in_agents,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti from vicidial_campaigns where campaign_id='$campaign_id' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $campaign_name = $row[1]; @@ -26143,6 +26155,7 @@ if ($ADD==31) $agent_hangup_route=$row[327]; $agent_hangup_value=$row[328]; $agent_hangup_ig_override=$row[329]; + $show_confetti=$row[330]; if (preg_match('/DISABLED/', $list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -27431,6 +27444,14 @@ if ($ADD==31) echo "\n"; } + echo ""._QXZ("Show Confetti").": $NWB#campaigns-show_confetti$NWE"; + echo ""._QXZ("Answering Machine Message").": "._QXZ("audio chooser")." $NWB#campaigns-am_message_exten$NWE\n"; $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and am_message_exten_override != '' and active='Y' $LOGallowed_campaignsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); @@ -40078,7 +40099,7 @@ if ($ADD==311111111111) echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -42750,7 +42773,7 @@ if ($ADD==311111111111111) $ALLagent_count = $rowx[2]; } - $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format,alt_ivr_logging,default_phone_code,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,rec_prompt_count,agent_soundboards,web_loader_phone_length,agent_script,agent_chat_screen_colors,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,agent_push_events,agent_push_url,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,anyone_callback_inactive_lists,enable_gdpr_download_deletion,source_id_display,agent_logout_link,manual_dial_validation,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,queuemetrics_pausereason,inbound_answer_config,enable_international_dncs,web_loader_phone_strip,manual_dial_phone_strip,daily_call_count_limit,allow_shared_dial,agent_search_method,phone_defaults_container,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,agent_hidden_sound,agent_hidden_sound_volume,agent_hidden_sound_seconds,agent_screen_timer,label_lead_id,label_list_id,label_entry_date,label_gmt_offset_now,label_source_id,label_called_since_last_reset,label_status,label_user,label_date_of_birth,label_country_code,label_last_local_call_time,label_called_count,label_rank,label_owner,label_entry_list_id,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin,login_kickall from system_settings;"; + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform,default_webphone,default_external_server_ip,webphone_url,enable_agc_dispo_log,custom_dialplan_entry,queuemetrics_loginout,callcard_enabled,queuemetrics_callstatus,default_codecs,admin_web_directory,label_title,label_first_name,label_middle_initial,label_last_name,label_address1,label_address2,label_address3,label_city,label_state,label_province,label_postal_code,label_vendor_lead_code,label_gender,label_phone_number,label_phone_code,label_alt_phone,label_security_phrase,label_email,label_comments,custom_fields_enabled,slave_db_server,reports_use_slave_db,webphone_systemkey,first_login_trigger,default_phone_registration_password,default_phone_login_password,default_server_password,admin_modify_refresh,nocache_admin,generate_cross_server_exten,queuemetrics_addmember_enabled,queuemetrics_dispo_pause,label_hide_field_logs,queuemetrics_pe_phone_append,test_campaign_calls,agents_calls_reset,default_voicemail_timezone,default_local_gmt,noanswer_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_agent_log,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting,svn_revision,queuemetrics_socket,queuemetrics_socket_url,enhanced_disconnect_logging,allow_emails,level_8_disable_add,pass_hash_enabled,pass_key,pass_cost,disable_auto_dial,queuemetrics_record_hold,country_code_list_stats,reload_timestamp,queuemetrics_pause_type,frozen_server_call_clear,callback_time_24hour,allow_chats,chat_url,chat_timeout,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_did_entry_list_id,enable_third_webform,agent_debug_logging,default_language,agent_whisper_enabled,user_hide_realtime_enabled,usacan_phone_dialcode_fix,cache_carrier_stats_realtime,oldest_logs_date,log_recording_access,report_default_format,alt_ivr_logging,default_phone_code,admin_row_click,admin_screen_colors,ofcom_uk_drop_calc,agent_screen_colors,script_remove_js,manual_auto_next,user_new_lead_limit,agent_xfer_park_3way,rec_prompt_count,agent_soundboards,web_loader_phone_length,agent_script,agent_chat_screen_colors,enable_auto_reports,enable_pause_code_limits,enable_drop_lists,allow_ip_lists,system_ip_blacklist,agent_push_events,agent_push_url,hide_inactive_lists,allow_manage_active_lists,expired_lists_inactive,did_system_filter,anyone_callback_inactive_lists,enable_gdpr_download_deletion,source_id_display,agent_logout_link,manual_dial_validation,mute_recordings,user_admin_redirect,list_status_modification_confirmation,sip_event_logging,call_quota_lead_ranking,enable_second_script,enable_first_webform,recording_buttons,opensips_cid_name,require_password_length,user_account_emails,outbound_cid_any,entries_per_page,browser_call_alerts,queuemetrics_pausereason,inbound_answer_config,enable_international_dncs,web_loader_phone_strip,manual_dial_phone_strip,daily_call_count_limit,allow_shared_dial,agent_search_method,phone_defaults_container,qc_claim_limit,qc_expire_days,two_factor_auth_hours,two_factor_container,agent_hidden_sound,agent_hidden_sound_volume,agent_hidden_sound_seconds,agent_screen_timer,label_lead_id,label_list_id,label_entry_date,label_gmt_offset_now,label_source_id,label_called_since_last_reset,label_status,label_user,label_date_of_birth,label_country_code,label_last_local_call_time,label_called_count,label_rank,label_owner,label_entry_list_id,call_limit_24hour,allowed_sip_stacks,agent_hide_hangup,allow_web_debug,max_logged_in_agents,user_codes_admin,login_kickall,abandon_check_queue from system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $version = $row[0]; @@ -42979,6 +43002,7 @@ if ($ADD==311111111111111) $max_logged_in_agents = $row[223]; $user_codes_admin = $row[224]; $login_kickall = $row[225]; + $abandon_check_queue = $row[226]; if ($pass_hash_enabled > 0) {$pass_hash_enabled = 'ENABLED';} else {$pass_hash_enabled = 'DISABLED';} @@ -43383,6 +43407,8 @@ if ($ADD==311111111111111) echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php index b9346ca2..b7d9004b 100644 --- a/www/vicidial/admin_modify_lead.php +++ b/www/vicidial/admin_modify_lead.php @@ -114,6 +114,7 @@ # 230204-0011 - Fix for inbound Call ID display # 230205-2135 - Small fix for ignore_group_on_search issue # 230307-1326 - Small fix for closer calls DID display, Issue #1447 +# 230309-1444 - Added Inbound Call Menu Log display as part of IVR Log section # require("dbconnect_mysqli.php"); @@ -260,6 +261,7 @@ $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); $AMDcount=0; +$uniqueidLIST="'XYZ'"; $htmlconvert=1; $nonselectable_statuses=0; @@ -1985,6 +1987,7 @@ else } $campaign_id = $row[3]; + $uniqueidLIST .= ",'$row[0]'"; } ##### grab vicidial_agent_log records ##### @@ -2107,6 +2110,7 @@ else } $campaign_id = $row[3]; + $uniqueidLIST .= ",'$row[18]'"; } @@ -2213,6 +2217,7 @@ else } $campaign_id = $row[3]; + $uniqueidLIST .= ",'$row[0]'"; } ##### grab vicidial_agent_log_archive records ##### @@ -2335,6 +2340,7 @@ else } $campaign_id = $row[3]; + $uniqueidLIST .= ",'$row[18]'"; } } ########## END ARCHIVE LOG SEARCH ########## @@ -3283,6 +3289,35 @@ else echo "\n"; } + if ($CIDdisplay=="Yes") + { + $stmt="SELECT start_time,caller_id,channel,server_ip,comment_d,uniqueid from live_inbound_log where uniqueid IN($uniqueidLIST) order by start_time desc limit 500;"; + $rslt=mysql_to_mysqli($stmt, $link); + $logs_to_print = mysqli_num_rows($rslt); + if ($DB) {echo "$logs_to_print|$stmt|\n";} + + if ($logs_to_print > 0) + {echo "";} + + $u=0; + while ($logs_to_print > $u) + { + $row=mysqli_fetch_row($rslt); + if (preg_match("/1$|3$|5$|7$|9$/i", $u)) + {$bgcolor="bgcolor=\"#$SSstd_row2_background\"";} + else + {$bgcolor="bgcolor=\"#$SSstd_row1_background\"";} + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + } echo "
\n"; echo ""; - $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,local_gmt,voicemail_dump_exten,answer_transfer_agent,ext_context,sys_perf_log,vd_server_logs,agi_output,vicidial_balance_active,balance_trunks_offlimits,recording_web_link,alt_server_ip,active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,outbound_calls_per_second,sysload,channels_total,cpu_idle_percent,disk_usage,sounds_update,vicidial_recording_limit,carrier_logging_active,vicidial_balance_rank,rebuild_music_on_hold,active_agent_login_server,conf_secret,external_server_ip,custom_dialplan_entry,active_twin_server_ip,user_group,system_uptime,auto_restart_asterisk,asterisk_temp_no_restart,voicemail_dump_exten_no_inst,gather_asterisk_output,web_socket_url,conf_qualify,routing_prefix,external_web_socket_url,conf_engine,conf_update_interval from servers where ( (server_id='$server_id') or (server_ip='$server_ip') ) $LOGadmin_viewable_groupsSQL;"; + $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,local_gmt,voicemail_dump_exten,answer_transfer_agent,ext_context,sys_perf_log,vd_server_logs,agi_output,vicidial_balance_active,balance_trunks_offlimits,recording_web_link,alt_server_ip,active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,outbound_calls_per_second,sysload,channels_total,cpu_idle_percent,disk_usage,sounds_update,vicidial_recording_limit,carrier_logging_active,vicidial_balance_rank,rebuild_music_on_hold,active_agent_login_server,conf_secret,external_server_ip,custom_dialplan_entry,active_twin_server_ip,user_group,system_uptime,auto_restart_asterisk,asterisk_temp_no_restart,voicemail_dump_exten_no_inst,gather_asterisk_output,web_socket_url,conf_qualify,routing_prefix,external_web_socket_url,conf_engine,conf_update_interval,ara_url from servers where ( (server_id='$server_id') or (server_ip='$server_ip') ) $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_to_mysqli($stmt, $link); $row=mysqli_fetch_row($rslt); $server_id = $row[0]; @@ -40135,6 +40156,7 @@ if ($ADD==311111111111) $external_web_socket_url = $row[51]; $conf_engine = $row[52]; $conf_update_interval = $row[53]; + $ara_url = $row[54]; $stmt="SELECT count(*) from vicidial_live_agents where server_ip='$server_ip';"; $rslt=mysql_to_mysqli($stmt, $link); @@ -40213,6 +40235,7 @@ if ($ADD==311111111111) echo "
"._QXZ("Active Asterisk Server").": $NWB#servers-active_asterisk_server$NWE
"._QXZ("Auto-Restart Asterisk").":     $NWB#servers-auto_restart_asterisk$NWE
"._QXZ("Temp No-Restart Asterisk").":     $NWB#servers-asterisk_temp_no_restart$NWE
"._QXZ("Asterisk Restart URL").":     $NWB#servers-ara_url$NWE
"._QXZ("Active Agent Server").": $NWB#servers-active_agent_login_server$NWE
"._QXZ("Generate conf files").": $NWB#servers-generate_conf$NWE
"._QXZ("Rebuild conf files").": $NWB#servers-rebuild_conf_files$NWE
"._QXZ("Inbound Answer Configuration").": $NWB#settings-inbound_answer_config$NWE
"._QXZ("Enable Abandon Check Queue").": $NWB#settings-abandon_check_queue$NWE
"._QXZ("New Leads Per List Limit").": $NWB#settings-user_new_lead_limit$NWE
"._QXZ("Enable Daily Called Count Limits").": $NWB#settings-daily_call_count_limit$NWE
"._QXZ("Inbound Call IVR entries").":
$u $row[5] $row[0] $row[4] $row[1]  


\n"; diff --git a/www/vicidial/campaign_debug.php b/www/vicidial/campaign_debug.php index 3247dabf..14d95387 100644 --- a/www/vicidial/campaign_debug.php +++ b/www/vicidial/campaign_debug.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # CHANGES # 110514-1231 - First build @@ -19,6 +19,7 @@ # 201219-2119 - Added SHARED campaign output # 220228-2048 - Added allow_web_debug system setting # 220812-0933 - Added User Group report permissions checking +# 230312-1019 - Added --CALLBACK-QUEUE-- and --ABANDON-QUEUE-- options # $startMS = microtime(); @@ -301,6 +302,10 @@ while ($campaigns_to_print > $o) else {echo "\n";} $o++; } +if ($group == '--CALLBACK-QUEUE--') {echo "\n";} +else {echo "\n";} +if ($group == '--ABANDON-QUEUE--') {echo "\n";} +else {echo "\n";} echo "\n"; echo "\n"; echo "           "._QXZ("MODIFY")." \n"; diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt index 4f928378..831404cf 100644 --- a/www/vicidial/help_documentation.txt +++ b/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20230306204901 +# version: 20230311080601 users-user User ID 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-. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. 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. users-force_change_password Force Change Password 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. @@ -419,6 +419,7 @@ campaigns-blind_monitor_message Blind Monitor Notice This is the message th campaigns-blind_monitor_filename Blind Monitor Filename This is the audio file that will play in the agents session at the start of someone blind monitoring them. This prompt will be played for everyone in the session including the customer if any is present. Default is empty. campaigns-max_inbound_calls Max Inbound Calls If this setting is set to a number greater than 0, then it will be the maximum number of inbound calls that an agent can handle across all inbound groups in one day. If the agent reaches their maximum number of inbound calls, then they will not be able to select inbound groups to take calls from until the next day. This setting can be overridden by the User setting of the same name. Default is 0 for disabled. campaigns-max_inbound_calls_outcome Max Inbound Calls Outcome If the Max Inbound Calls setting above is enabled, this will be the outcome of what happens to the agent when the maximum number of inbound calls is reached. DEFAULT will halt all inbound call handling to the agent, and if the agent is in an INBOUND_MAN campaign, it will only allow them to manual dial, with no pausing ability. ALLOW_AGENTDIRECT will allow the agent to continue to receive AGENTDIRECT in-group calls after they have reached the max inbound calls count. ALLOW_MI_PAUSE will allow an agent in an INBOUND_MAN campaign to continue to pause after they have reached the max inbound calls count. Default is DEFAULT. +campaigns-show_confetti Show Confetti Enable this option to add a bit of visual flair to the agent interface by having the screen rain confetti whenever the agent sets a call disposition that has been flagged with a sale or callback category. Options are SALES for sale calls only, CALLBACKS for callbacks only, and SALES_AND_CALLBACKS for both categories. By default the confetti will rain for 2 seconds after the call is dispositioned, but the duration of the confetti falling, the amount of confetti, and speed at which the confetti falls can be configured via an optional settings container, CONFETTI_SETTINGS. Default is DISABLED lists-list_id List ID This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. Must be a number greater than 99. lists-list_name List Name This is the description of the list, it must be between 2 and 20 characters in length. lists-list_description List Description This is the memo field for the list, it is optional. @@ -1026,6 +1027,7 @@ servers-external_web_socket_url External Web Socket URL For systems running servers-active_asterisk_server Active Asterisk Server If Asterisk is not running on this server, or if the dialing processes should not be using this server, or if are only using this server for other scripts like the hopper loading script you would want to set this to N. Default is Y. servers-auto_restart_asterisk Auto-Restart Asterisk If Asterisk is running on this server and you want the system to make sure that it will be restarted in the event that it crashes, you might want to consider enabling this setting. If enabled, the system will check every minute to see if Asterisk is running, and if it is not it will attempt to restart it. This process will not run in the first 5 minutes after a system has been up. Default is N. servers-asterisk_temp_no_restart Temp No-Restart Asterisk If Auto-Restart Asterisk is enabled on this server, turning on this setting will prevent the auto-restart process from running until after the server is rebooted. Default is N. +servers-ara_url Asterisk Restart URL If populated, this option will send a URL request for this URL every time that the Asterisk process is auto-restarted on this server. Default is blank for disabled. servers-active_agent_login_server Active Agent Server Setting this option to N will prevent agents from being able to log in to this server through the agent screen. This is very useful when using a phone login load balanced setup. Default is Y. servers-generate_conf Generate conf files If you would like the system to auto-generate asterisk conf files based upon the phones entries, carrier entries and load balancing setup within the system then set this to Y. Default is Y. servers-rebuild_conf_files Rebuild conf files If you want to force a rebuilding of the Asterisk conf files or if any of the phones or carrier entries have changed then this should be set to Y. After the conf files have been generated and Asterisk has been reloaded then this will be changed to N. Default is Y. @@ -1132,6 +1134,7 @@ settings-callcard_enabled Enable CallCard This setting enables the CallCard settings-test_campaign_calls Enable Campaign Test Calls This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled. settings-did_system_filter DID System Filter This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled. settings-inbound_answer_config Inbound Answer Configuration If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled. +settings-abandon_check_queue Enable Abandon Check Queue If enabled, this allows you to use the Abandon Check Queue to call back customers that called in to your system but did not talk to an agent. See the details for this feature at the bottom of the INBOUND_CALLBACK_QUEUE.txt document. Default is 0 for disabled. settings-enable_international_dncs Enable Interational DNCs If enabled, this allows you to create DNC lists for individual countries and provides the option to scrub against these lists when loading lead files. settings-user_new_lead_limit New Leads Per List Limit This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled. settings-daily_call_count_limit Enable Daily Called Count Limits Enabling this setting will allow you to define a daily called count limit on a per campaign basis. Default is 0 for disabled.