From 86d4ff9883c24f03cd3adae25b8489f78e75e447 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 16 Feb 2007 21:18:58 +0000 Subject: [PATCH] fixed omission in doc UPGRADE fixed minor bug in ABANDON queue_log trying to debug AST_VDremote_agents.pl bug where vac records are deleted git-svn-id: svn://192.168.202.10@530 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 4 ++++ agc_2-X/trunk/bin/AST_VDremote_agents.pl | 18 ++++++++++++++++++ agc_2-X/trunk/bin/FastAGI_log.pl | 12 ++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index bf1a9101..e4997caa 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -69,6 +69,10 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 16. Added optional Asterisk-compatible queue_log logging for QueueMetrics compatibility. See the QUEUEMETRICS.txt doc for more information +17. RECOMMENDATION - If you are calling in the USA, you should add the + "--postal-code-gmt" flag to your adjust GMT script in the crontab to + more accurately assign timezones to your leads. + diff --git a/agc_2-X/trunk/bin/AST_VDremote_agents.pl b/agc_2-X/trunk/bin/AST_VDremote_agents.pl index 777a17da..67f2e649 100644 --- a/agc_2-X/trunk/bin/AST_VDremote_agents.pl +++ b/agc_2-X/trunk/bin/AST_VDremote_agents.pl @@ -540,11 +540,29 @@ while($one_day_interval > 0) @aryA = $sthA->fetchrow_array; $autocallexists[$z] = "$aryA[0]"; $rec_count++; + if ($DB) {print STDERR "$autocallexists[$z] CALL EXISTS|$VD_uniqueid[$z]|$server_ip|\n";} } $sthA->finish(); if ($autocallexists[$z] < 1) { + + + $stmtA = "SELECT uniqueid,callerid,status FROM vicidial_auto_calls where server_ip='$server_ip';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $rec_count++; + if ($DB) {print STDERR " CALLS: $rec_count|$aryA[0]|$aryA[1]|$aryA[2]|\n";} + } + $sthA->finish(); + + + if ($DELusers =~ /R\/$VD_user[$z]\|/) { $stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]',status='PAUSED', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='' where user='$VD_user[$z]' and server_ip='$server_ip';"; diff --git a/agc_2-X/trunk/bin/FastAGI_log.pl b/agc_2-X/trunk/bin/FastAGI_log.pl index 5e2376ce..8cb8de9a 100644 --- a/agc_2-X/trunk/bin/FastAGI_log.pl +++ b/agc_2-X/trunk/bin/FastAGI_log.pl @@ -645,8 +645,16 @@ sub process_request { } $sthB->finish(); - $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='$VD_callerid',queue='$VD_campaign_id',agent='$VD_agent',verb='COMPLETECALLER',data1='$VD_stage',data2='$VD_call_length',data3='1',serverid='$queuemetrics_log_id';"; - $Baffected_rows = $dbhB->do($stmtB); + if ($rec_count < 1) + { + $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='$VD_callerid',queue='$VD_campaign_id',agent='$VD_agent',verb='ABANDON',data1='1',data2='1',data3='$VD_stage',serverid='$queuemetrics_log_id';"; + $Baffected_rows = $dbhB->do($stmtB); + } + else + { + $stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$secX',call_id='$VD_callerid',queue='$VD_campaign_id',agent='$VD_agent',verb='COMPLETECALLER',data1='$VD_stage',data2='$VD_call_length',data3='1',serverid='$queuemetrics_log_id';"; + $Baffected_rows = $dbhB->do($stmtB); + } $dbhB->disconnect(); }