more changes to vicidial reports
git-svn-id: svn://192.168.202.10@1001 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
# FLAG FOR NO DATE DIRECTORY ON FTP
|
||||
# --NODATEDIR
|
||||
#
|
||||
# if pinging is not working, try the 'icmp' Ping command in the code instead
|
||||
#
|
||||
# make sure that the following directories exist:
|
||||
# /var/spool/asterisk/monitorDONE # where the mixed -all files are put
|
||||
#
|
||||
@@ -251,6 +253,7 @@ foreach(@FILES)
|
||||
|
||||
### BEGIN Remote file transfer
|
||||
$p = Net::Ping->new();
|
||||
# $p = Net::Ping->new("icmp");
|
||||
$ping_good = $p->ping("$VARFTP_host");
|
||||
|
||||
if ($ping_good)
|
||||
|
||||
+2
-2
@@ -1233,7 +1233,7 @@ $sthA->finish();
|
||||
if ($VCScalls_today[$p] > 0)
|
||||
{
|
||||
# TODAY ANSWERS
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE');";
|
||||
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -1289,7 +1289,7 @@ if ($VCScalls_today[$p] > 0)
|
||||
}
|
||||
|
||||
# TODAY TOTAL HOLD TIME FOR ANSWERED CALLS
|
||||
$stmtA = "SELECT sum(queue_seconds) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE');";
|
||||
$stmtA = "SELECT sum(queue_seconds) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE');";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
|
||||
@@ -481,7 +481,7 @@ PHASE 6: ADDING CRONTAB ENTRIES FOR ASTGUICLIENT/VICIDIAL SCRIPTS
|
||||
2 0 * * 0 /usr/share/astguiclient/AST_agent_week.pl
|
||||
|
||||
### remove old recordings more than 7 days old
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
|
||||
### remove old vicidial logs and asterisk logs more than 2 days old
|
||||
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
|
||||
|
||||
@@ -2962,7 +2962,7 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running
|
||||
#42 0 * * * /usr/share/astguiclient/AST_sourceID_summary_export.pl
|
||||
|
||||
### remove old recordings more than 7 days old
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
|
||||
|
||||
### remove old vicidial logs and asterisk logs more than 2 days old
|
||||
28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# 81015-0705 - Added IVR calls count
|
||||
# 81024-0037 - Added multi-select inbound-groups
|
||||
# 81105-2118 - Added Answered calls 15-minute breakdown
|
||||
# 81109-2340 - Added custom indicators section
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -307,7 +308,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE');";
|
||||
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rowy=mysql_fetch_row($rslt);
|
||||
@@ -352,6 +353,7 @@ echo "Answered Calls: $ANSWEREDcalls $ANSWEREDper
|
||||
echo "Average queue time for Answered Calls: $average_answer_seconds seconds\n";
|
||||
echo "Calls taken into the IVR for this In-Group: $IVRcalls\n";
|
||||
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
@@ -391,6 +393,47 @@ echo "Total DROP Calls: $DROPcalls $DROPpercent%
|
||||
echo "Average hold time for DROP Calls: $average_hold_seconds seconds\n";
|
||||
|
||||
|
||||
|
||||
|
||||
if (strlen($group_SQL)>3)
|
||||
{
|
||||
$stmt = "SELECT answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two from vicidial_inbound_groups where group_id IN($group_SQL) order by answer_sec_pct_rt_stat_one desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Sanswer_sec_pct_rt_stat_one = $row[0];
|
||||
$Sanswer_sec_pct_rt_stat_two = $row[1];
|
||||
|
||||
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_one;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$answer_sec_pct_rt_stat_one = $row[0];
|
||||
|
||||
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_two;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$answer_sec_pct_rt_stat_two = $row[0];
|
||||
|
||||
if ( ($ANSWEREDcalls > 0) and ($answer_sec_pct_rt_stat_one > 0) and ($answer_sec_pct_rt_stat_two > 0) )
|
||||
{
|
||||
$PCTanswer_sec_pct_rt_stat_one = (($answer_sec_pct_rt_stat_one / $ANSWEREDcalls) * 100);
|
||||
$PCTanswer_sec_pct_rt_stat_one = round($PCTanswer_sec_pct_rt_stat_one, 0);
|
||||
#$PCTanswer_sec_pct_rt_stat_one = sprintf("%10s", $PCTanswer_sec_pct_rt_stat_one);
|
||||
$PCTanswer_sec_pct_rt_stat_two = (($answer_sec_pct_rt_stat_two / $ANSWEREDcalls) * 100);
|
||||
$PCTanswer_sec_pct_rt_stat_two = round($PCTanswer_sec_pct_rt_stat_two, 0);
|
||||
#$PCTanswer_sec_pct_rt_stat_two = sprintf("%10s", $PCTanswer_sec_pct_rt_stat_two);
|
||||
}
|
||||
}
|
||||
echo "\n";
|
||||
echo "---------- CUSTOM INDICATORS\n";
|
||||
echo "GDE (Answered/Total calls taken in to this In-Group): $ANSWEREDpercent%\n";
|
||||
echo "ACR (Dropped/Answered): $DROP_ANSWEREDpercent%\n";
|
||||
echo "TMR1 (Answered within $Sanswer_sec_pct_rt_stat_one seconds/Answered): $PCTanswer_sec_pct_rt_stat_one%\n";
|
||||
echo "TMR2 (Answered within $Sanswer_sec_pct_rt_stat_two seconds/Answered): $PCTanswer_sec_pct_rt_stat_two%\n";
|
||||
|
||||
|
||||
# GET LIST OF ALL STATUSES and create SQL from human_answered statuses
|
||||
$q=0;
|
||||
$stmt = "SELECT status,status_name,human_answered,category from vicidial_statuses;";
|
||||
@@ -609,7 +652,7 @@ echo " +---------------------------------------------------------------
|
||||
echo " | 0 5 10 15 20 25 30 35 40 45 50 55 60 90 +90 | TOTAL |\n";
|
||||
echo "----------+-------------------------------------------------------------------------------------------+------------+\n";
|
||||
|
||||
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE') group by queue_seconds;";
|
||||
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE') group by queue_seconds;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$reasons_to_print = mysql_num_rows($rslt);
|
||||
@@ -1375,7 +1418,7 @@ while ($i <= 96)
|
||||
$ad_0=0; $ad_5=0; $ad10=0; $ad15=0; $ad20=0; $ad25=0; $ad30=0; $ad35=0;
|
||||
$ad40=0; $ad45=0; $ad50=0; $ad55=0; $ad60=0; $ad90=0; $ad99=0; $BDansweredCALLS=0;
|
||||
|
||||
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date $SQLtime' and call_date < '$query_date $SQLtimeEND' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE') group by queue_seconds;";
|
||||
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date $SQLtime' and call_date < '$query_date $SQLtimeEND' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE') group by queue_seconds;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$reasons_to_print = mysql_num_rows($rslt);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
# 80709-0230 - Added time stats to call statuses
|
||||
# 80717-2118 - Added calls/hour out of agent login time in status summary
|
||||
# 80722-2049 - Added Status Category stats
|
||||
# 81109-2341 - Added Productivity Rating
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -208,6 +209,7 @@ else
|
||||
echo "Total Calls placed from this Campaign: $TOTALcalls\n";
|
||||
echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
@@ -298,6 +300,46 @@ echo "Total DROP Calls: $DROPcalls $DROPpercent%\n"
|
||||
echo "Percent of DROP Calls taken out of Answers: $DROPcalls / $ANSWERcalls $DROPANSWERpercent%\n";
|
||||
echo "Average Length for DROP Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt = "select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$closer_campaigns = $row[0];
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaignsSQL = "'$closer_campaigns'";
|
||||
if ($DB > 0) {echo "\n|$closer_campaigns|$closer_campaignsSQL|$stmt|\n";}
|
||||
|
||||
$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($closer_campaignsSQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTALanswers = ($row[0] + $ANSWERcalls);
|
||||
|
||||
|
||||
$stmt = "SELECT sum(wait_sec + talk_sec + dispo_sec) from vicidial_agent_log where campaign_id='" . mysql_real_escape_string($group) . "' and event_time >= '$query_date_BEGIN' and event_time <= '$query_date_END';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$agent_non_pause_sec = $row[0];
|
||||
|
||||
if ($agent_non_pause_sec > 0)
|
||||
{
|
||||
$AVG_ANSWERagent_non_pause_sec = (($TOTALanswers / $agent_non_pause_sec) * 60);
|
||||
$AVG_ANSWERagent_non_pause_sec = round($AVG_ANSWERagent_non_pause_sec, 2);
|
||||
}
|
||||
else
|
||||
{$AVG_ANSWERagent_non_pause_sec=0;}
|
||||
$AVG_ANSWERagent_non_pause_sec = sprintf("%10s", $AVG_ANSWERagent_non_pause_sec);
|
||||
|
||||
echo "Productivity Rating: $AVG_ANSWERagent_non_pause_sec\n";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "\n";
|
||||
echo "---------- AUTO-DIAL NO ANSWERS\n";
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ if (!isset($SERVdisplay)) {$SERVdisplay=1;} # 0=no, 1=yes
|
||||
if (!isset($CALLSdisplay)) {$CALLSdisplay=1;} # 0=no, 1=yes
|
||||
if (!isset($PHONEdisplay)) {$PHONEdisplay=0;} # 0=no, 1=yes
|
||||
if (!isset($CUSTPHONEdisplay)) {$CUSTPHONEdisplay=0;} # 0=no, 1=yes
|
||||
if (!isset($with_inbound)) {$with_inbound='N';} # 0=no, 1=yes
|
||||
if (!isset($with_inbound)) {$with_inbound='N';} # N=no, Y=yes, O=only
|
||||
if (!isset($PAUSEcodes)) {$PAUSEcodes='N';} # 0=no, 1=yes
|
||||
$ingroup_detail='';
|
||||
|
||||
@@ -428,7 +428,7 @@ if (ereg('O',$with_inbound))
|
||||
$AVGhold_sec_answer_calls = round($AVGhold_sec_answer_calls, 0);
|
||||
if ($agent_non_pause_sec > 0)
|
||||
{
|
||||
$AVG_ANSWERagent_non_pause_sec = ($agent_non_pause_sec / $answersTODAY);
|
||||
$AVG_ANSWERagent_non_pause_sec = (($answersTODAY / $agent_non_pause_sec) * 60);
|
||||
$AVG_ANSWERagent_non_pause_sec = round($AVG_ANSWERagent_non_pause_sec, 2);
|
||||
$AVG_ANSWERagent_non_pause_sec = sprintf("%01.2f", $AVG_ANSWERagent_non_pause_sec);
|
||||
}
|
||||
@@ -545,7 +545,7 @@ if (ereg('O',$with_inbound))
|
||||
$AVGhold_sec_answer_calls = round($AVGhold_sec_answer_calls, 0);
|
||||
if ($agent_non_pause_sec > 0)
|
||||
{
|
||||
$AVG_ANSWERagent_non_pause_sec = ($agent_non_pause_sec / $answersTODAY);
|
||||
$AVG_ANSWERagent_non_pause_sec = (($answersTODAY / $agent_non_pause_sec) * 60);
|
||||
$AVG_ANSWERagent_non_pause_sec = round($AVG_ANSWERagent_non_pause_sec, 2);
|
||||
$AVG_ANSWERagent_non_pause_sec = sprintf("%01.2f", $AVG_ANSWERagent_non_pause_sec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user