From cfece28d197fdaa65f1a44dc1637fe385e171e92 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 13 Apr 2007 16:58:43 +0000 Subject: [PATCH] small docs updates fixed call length error for CLOSER-type campaigns for outbound blended calls, vdc_db_query.php git-svn-id: svn://192.168.202.10@590 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/docs/BASE_INSTALL.txt | 2 +- agc_2-X/trunk/www/agc/vdc_db_query.php | 27 +++++++++++++++++--- agc_2-X/trunk/www/vicidial/AST_VDADstats.php | 2 +- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/agc_2-X/trunk/docs/BASE_INSTALL.txt b/agc_2-X/trunk/docs/BASE_INSTALL.txt index 64e47411..ab1a9da6 100644 --- a/agc_2-X/trunk/docs/BASE_INSTALL.txt +++ b/agc_2-X/trunk/docs/BASE_INSTALL.txt @@ -1,4 +1,4 @@ -Asterisk/astguiclient install from existing server. v.2.0.3 2007-02-26 +Asterisk/astguiclient install from existing server. v.2.0.3 2007-04-XX By the astGUIclient group astguiclient@eflo.net diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 801dff0d..eb5251b2 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -128,10 +128,11 @@ # 70313-1052 - Allow pound signs(hash) in comments to pass through # 70319-1544 - Added agent disable update customer data function # 70322-1545 - Added sipsak display ability +# 70413-1253 - Fixed bug for outbound call time in CLOSER-type blended campaigns # -$version = '2.0.55'; -$build = '70322-1545'; +$version = '2.0.56'; +$build = '70413-1253'; require("dbconnect.php"); @@ -881,12 +882,12 @@ if ($stage == "end") { if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation + ##### look for the start epoch in the vicidial_closer_log table $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation + ##### look for the start epoch in the vicidial_log table $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; } $rslt=mysql_query($stmt, $link); @@ -902,6 +903,24 @@ if ($stage == "end") { $length_in_sec = 0; } + if ( ($length_in_sec < 1) and (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) ) + { + ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log + $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VM_mancall_ct = mysql_num_rows($rslt); + if ($VM_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $start_epoch =$row[0]; + $length_in_sec = ($StarTtime - $start_epoch); + } + else + { + $length_in_sec = 0; + } + } } else {$length_in_sec = ($StarTtime - $start_epoch);} diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php index b26e245f..b9f50356 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +### Copyright (C) 2007 Matt Florell LICENSE: GPLv2 ### # CHANGES #