Added names to select list on the outbound report

Added longest wait time as next agent call option
Added option to the Outbound(VDAD) report to calculate stats including the overflow drop in-group stats with the outbound campaign stats
Changed Real-time Report screen agent time display to be based upon a change in "state"(INCALL, READY, PAUSED, etc...) instead of being based upon the time of the last call they handled
Fixed manual dial calls_today bug in vicidial.php
Several small bug fixes

git-svn-id: svn://192.168.202.10@1199 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-08-08 07:33:46 +00:00
parent 9e8c67dace
commit 8124e3f74f
15 changed files with 2276 additions and 1953 deletions
+6 -5
View File
@@ -37,6 +37,7 @@
# 80128-0105 - Fixed calls_today bug
# 81007-1746 - Added debugX output for count statements and changed to if from while
# 81026-1246 - Added better logging of calls and fixed the DROP bug
# 90808-0247 - Added agent last_state_change field
#
### begin parsing run-time options ###
@@ -284,7 +285,7 @@ while($one_day_interval > 0)
$w=0;
while ($vla_qh_ct > $w)
{
$stmtA = "UPDATE vicidial_live_agents set status='INCALL', last_call_time='$SQLdate',comments='REMOTE',calls_today='$calls_today' where live_agent_id='$QHlive_agent_id[$w]';";
$stmtA = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$SQLdate',comments='REMOTE',calls_today='$calls_today',last_state_change='$SQLdate' where live_agent_id='$QHlive_agent_id[$w]';";
$Aaffected_rows = $dbhA->do($stmtA);
$stmtB = "UPDATE vicidial_list set status='XFER',user='$QHuser[$w]' where lead_id='$QHlead_id[$w]';";
@@ -475,7 +476,7 @@ while($one_day_interval > 0)
if ($loginexistsALL[$h] > 0)
{
$stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]', status='READY' where user='$DBremote_user[$h]' and server_ip='$server_ip';";
$stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]', status='READY',last_state_change='$SQLdate' where user='$DBremote_user[$h]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] ALL UPDATE: $affected_rows\n";}
# if ($affected_rows>0)
@@ -513,7 +514,7 @@ while($one_day_interval > 0)
}
$sthA->finish();
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE');";
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments,last_state_change) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE','$SQLdate');";
$affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";}
if ($TESTrun > 0)
@@ -618,7 +619,7 @@ while($one_day_interval > 0)
{
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';";
$stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]',status='PAUSED', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='',last_state_change='$SQLdate' where user='$VD_user[$z]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|PAUSED|$VD_uniqueid[$z]|$VD_user[$z]|\n";}
if ($affected_rows>0)
@@ -660,7 +661,7 @@ while($one_day_interval > 0)
}
else
{
$stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='' where user='$VD_user[$z]' and server_ip='$server_ip';";
$stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='',last_state_change='$SQLdate' where user='$VD_user[$z]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA);
if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|READY|$VD_uniqueid[$z]|$VD_user[$z]|\n";}