Updates for agent 3-way press-1 calls feature

git-svn-id: svn://192.168.202.10@3778 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2023-11-18 21:07:19 +00:00
parent 0175a169be
commit 2b5780a985
9 changed files with 239 additions and 3 deletions
+20
View File
@@ -32,6 +32,7 @@
# 191029-1555 - Added flushing of vicidial_agent_vmm_overrides table
# 220921-1148 - Added optimize of vicidial_users table
# 230414-1622 - Added --reset-stuck-leads option
# 231118-1256 - Added clearing of old vicidial_3way_press_live records
#
$session_flush=0;
@@ -591,6 +592,25 @@ while ($sthArowsSERVERS > $aas)
$sthA->finish();
$stmtA = "DELETE from vicidial_3way_press_live where call_date < '$SQLdate_NEG_sixhour';";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - vicidial_3way_press_live flush: $affected_rows rows\n";}
$stmtA = "OPTIMIZE table vicidial_3way_press_live;";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
if (!$Q) {print " - OPTIMIZE vicidial_3way_press_live \n";}
if ($session_flush > 0)
{
$stmtA = "DELETE from vicidial_sessions_recent where call_date < '$SQLdate_NEG_1hour';";