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.
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. Added "Asterisk Restart URL" to the Modify Servers page, this can send a URL request any time Asterisk is auto-restarted on that server. Added display of inbound Call Menu calls to the Admin Modify Lead page if CallerID display option is used on page. git-svn-id: svn://192.168.202.10@3699 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -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';";
|
||||
|
||||
@@ -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 <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> 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")
|
||||
|
||||
Reference in New Issue
Block a user