added 2000 hopper level to admin.php

added new stats to VDADstats and CLOSER stats reports
fixed minor stats display bug

git-svn-id: svn://192.168.202.10@377 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-11-09 22:26:21 +00:00
parent 10717a5319
commit f2420dd718
5 changed files with 128 additions and 23 deletions
+5 -3
View File
@@ -1,5 +1,5 @@
+------------------------------------------------------------------------------+
| Asterisk GUI client - astguiclient - fourth public release 0.9.2 |
| Asterisk GUI client - astguiclient |
| Description of the Asterisk Central Queue System |
| created by Matt Florell <mattf@vicimarketing.com> <info@eflo.net> |
| project started 2003-10-06 http://sourceforge.net/projects/astguiclient/ |
@@ -12,8 +12,10 @@ work with Asterisk.
Scripts that are involved with the ACQS backend are:
- AST_SERVER_conf.pl - file where you define your variables for the server apps
+ Must be present in the /home/cron/ directory
- AST_SERVER_conf.pl - <depricated>
- /etc/astguiclient.conf - file where you define your variables for the server apps
+ Must be present and configured through the install.pl script
- AST_manager_listen.pl - listener for the Asterisk Central Queue System (ACQS)
+ Must be present in the /home/cron/ directory
@@ -23,6 +23,12 @@ DELETE SERVER VICIDIAL TRUNK RECORD||
VICIDIAL TRUNKS FOR THIS SERVER||
RESTRICTION||
TRUNKS||
Emergency VDAC Jam Clear||
VDAC NOT CLEARED FOR CAMPAIGN||
LAST VDAC RECORD CLEARED FOR CAMPAIGN||
VDAC CLEAR CONFIRMATION||
Click here to delete the oldest LIVE record in VDAC for||
############################################################ CLIENT
+49 -10
View File
@@ -197,11 +197,16 @@ echo "Average QUEUE Length across all calls: $average_total_queue_seconds
##############################
######### USER STATS
$TOTagents=0;
$TOTcalls=0;
$TOTtime=0;
$TOTavg=0;
echo "\n";
echo "---------- USER STATS\n";
echo "+--------------------------+------------+--------+--------+\n";
echo "| USER | CALLS | TIME M | AVRG M |\n";
echo "+--------------------------+------------+--------+--------+\n";
echo "---------- AGENT STATS\n";
echo "+--------------------------+------------+----------+--------+\n";
echo "| AGENT | CALLS | TIME M | AVRG M |\n";
echo "+--------------------------+------------+----------+--------+\n";
$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
$rslt=mysql_query($stmt, $link);
@@ -212,6 +217,9 @@ while ($i < $users_to_print)
{
$row=mysql_fetch_row($rslt);
$TOTcalls = ($TOTcalls + $row[2]);
$TOTtime = ($TOTtime + $row[3]);
$user = sprintf("%-6s", $row[0]);
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
$USERcalls = sprintf("%10s", $row[2]);
@@ -238,12 +246,42 @@ while ($i < $users_to_print)
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
$i++;
}
echo "+--------------------------+------------+--------+--------+\n";
$TOTavg = ($TOTtime / $TOTcalls);
$TOTavg = round($TOTavg, 0);
$TOTavg_M = ($TOTavg / 60);
$TOTavg_M = round($TOTavg_M, 2);
$TOTavg_M_int = intval("$TOTavg_M");
$TOTavg_S = ($TOTavg_M - $TOTavg_M_int);
$TOTavg_S = ($TOTavg_S * 60);
$TOTavg_S = round($TOTavg_S, 0);
if ($TOTavg_S < 10) {$TOTavg_S = "0$TOTavg_S";}
$TOTavg_MS = "$TOTavg_M_int:$TOTavg_S";
$TOTavg = sprintf("%6s", $TOTavg_MS);
$TOTtime_M = ($TOTtime / 60);
$TOTtime_M = round($TOTtime_M, 2);
$TOTtime_M_int = intval("$TOTtime_M");
$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
$TOTtime_S = ($TOTtime_S * 60);
$TOTtime_S = round($TOTtime_S, 0);
if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
$TOTtime = sprintf("%6s", $TOTtime_MS);
$TOTagents = sprintf("%10s", $i);
$TOTcalls = sprintf("%10s", $TOTcalls);
$TOTtime = sprintf("%8s", $TOTtime);
$TOTavg = sprintf("%6s", $TOTavg);
echo "+--------------------------+------------+----------+--------+\n";
echo "| TOTAL Agents: $TOTagents | $TOTcalls | $TOTtime | $TOTavg |\n";
echo "+--------------------------+------------+----------+--------+\n";
##############################
######### TIME STATS
@@ -337,7 +375,7 @@ while ($k <= 102)
if ($Mk >= 5)
{
$Mk=0;
if ( ($k < 1) or ($hour_multiplier < 1) )
if ( ($k < 1) or ($hour_multiplier <= 0) )
{$scale_num = 100;}
else
{
@@ -443,14 +481,15 @@ while ($i <= 96)
}
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n\n";
$ENDtime = date("U");
$RUNtime = ($ENDtime - $STARTtime);
echo "\nRun Time: $RUNtime seconds\n";
}
+65 -7
View File
@@ -187,11 +187,16 @@ echo "Average Call Length for NA Calls in seconds: $average_na_seconds\n";
##############################
######### USER STATS
$TOTagents=0;
$TOTcalls=0;
$TOTtime=0;
$TOTavg=0;
echo "\n";
echo "---------- USER STATS\n";
echo "+--------------------------+------------+--------+--------+\n";
echo "| USER | CALLS | TIME M | AVRG M |\n";
echo "+--------------------------+------------+--------+--------+\n";
echo "---------- AGENT STATS\n";
echo "+--------------------------+------------+----------+--------+\n";
echo "| AGENT | CALLS | TIME M | AVRG M |\n";
echo "+--------------------------+------------+----------+--------+\n";
$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
$rslt=mysql_query($stmt, $link);
@@ -202,6 +207,9 @@ while ($i < $users_to_print)
{
$row=mysql_fetch_row($rslt);
$TOTcalls = ($TOTcalls + $row[2]);
$TOTtime = ($TOTtime + $row[3]);
$user = sprintf("%-6s", $row[0]);
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
$USERcalls = sprintf("%10s", $row[2]);
@@ -228,12 +236,59 @@ while ($i < $users_to_print)
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
$i++;
}
echo "+--------------------------+------------+--------+--------+\n";
$TOTavg = ($TOTtime / $TOTcalls);
$TOTavg = round($TOTavg, 0);
$TOTavg_M = ($TOTavg / 60);
$TOTavg_M = round($TOTavg_M, 2);
$TOTavg_M_int = intval("$TOTavg_M");
$TOTavg_S = ($TOTavg_M - $TOTavg_M_int);
$TOTavg_S = ($TOTavg_S * 60);
$TOTavg_S = round($TOTavg_S, 0);
if ($TOTavg_S < 10) {$TOTavg_S = "0$TOTavg_S";}
$TOTavg_MS = "$TOTavg_M_int:$TOTavg_S";
$TOTavg = sprintf("%6s", $TOTavg_MS);
$TOTtime_M = ($TOTtime / 60);
$TOTtime_M = round($TOTtime_M, 2);
$TOTtime_M_int = intval("$TOTtime_M");
$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
$TOTtime_S = ($TOTtime_S * 60);
$TOTtime_S = round($TOTtime_S, 0);
if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
$TOTtime = sprintf("%6s", $TOTtime_MS);
$TOTagents = sprintf("%10s", $i);
$TOTcalls = sprintf("%10s", $TOTcalls);
$TOTtime = sprintf("%8s", $TOTtime);
$TOTavg = sprintf("%6s", $TOTavg);
$stmt="select avg(wait_sec) from vicidial_agent_log where event_time >= '$query_date 00:00:01' and event_time <= '$query_date 23:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$AVGwait = $row[0];
$AVGwait_M = ($AVGwait / 60);
$AVGwait_M = round($AVGwait_M, 2);
$AVGwait_M_int = intval("$AVGwait_M");
$AVGwait_S = ($AVGwait_M - $AVGwait_M_int);
$AVGwait_S = ($AVGwait_S * 60);
$AVGwait_S = round($AVGwait_S, 0);
if ($AVGwait_S < 10) {$AVGwait_S = "0$AVGwait_S";}
$AVGwait_MS = "$AVGwait_M_int:$AVGwait_S";
$AVGwait = sprintf("%6s", $AVGwait_MS);
echo "+--------------------------+------------+----------+--------+\n";
echo "| TOTAL Agents: $TOTagents | $TOTcalls | $TOTtime | $TOTavg |\n";
echo "+--------------------------+------------+----------+--------+\n";
echo "| Average Wait time between calls $AVGwait |\n";
echo "+-----------------------------------------------------------+\n";
##############################
######### TIME STATS
@@ -327,7 +382,7 @@ while ($k <= 102)
if ($Mk >= 5)
{
$Mk=0;
if ( ($k < 1) or ($hour_multiplier < 1) )
if ( ($k < 1) or ($hour_multiplier <= 0) )
{$scale_num = 100;}
else
{
@@ -440,6 +495,9 @@ echo "+------+------------------------------------------------------------------
$ENDtime = date("U");
$RUNtime = ($ENDtime - $STARTtime);
echo "\nRun Time: $RUNtime seconds\n";
}
+3 -3
View File
@@ -2761,7 +2761,7 @@ echo "<tr bgcolor=#B6D3FC><td align=right>Park Extension: </td><td align=left><i
echo "<tr bgcolor=#B6D3FC><td align=right>Park Filename: </td><td align=left><input type=text name=park_file_name size=10 maxlength=10>$NWB#vicidial_campaigns-park_file_name$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=50 maxlength=255>$NWB#vicidial_campaigns-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Allow Closers: </td><td align=left><select size=1 name=allow_closers><option>Y</option><option>N</option></select>$NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>1000</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>1000</option><option>2000</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option selected>0</option><option>1</option><option>1.1</option><option>1.2</option><option>1.3</option><option>1.4</option><option>1.5</option><option>1.6</option><option>1.7</option><option>1.8</option><option>1.9</option><option>2.0</option><option>2.2</option><option>2.5</option><option>2.7</option><option>3.0</option><option>3.5</option><option>4.0</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Local Call Time: </td><td align=left><select size=1 name=local_call_time><option>24hours</option><option>9am-9pm</option><option>9am-5pm</option><option>12pm-5pm</option><option>12pm-9pm</option><option>5pm-9pm</option></select>$NWB#vicidial_campaigns-local_call_time$NWE</td></tr>\n";
@@ -5991,7 +5991,7 @@ echo "$filters_list";
echo "<option selected value=\"$lead_filter_id\">$lead_filter_id - $filtername_list[$lead_filter_id]</option>\n";
echo "</select>$NWB#vicidial_campaigns-lead_filter_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>750</option><option>1000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>750</option><option>1000</option><option>2000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Force Reset of Hopper: </td><td align=left><select size=1 name=reset_hopper><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_campaigns-force_reset_hopper$NWE</td></tr>\n";
@@ -6444,7 +6444,7 @@ echo "$filters_list";
echo "<option selected value=\"$lead_filter_id\">$lead_filter_id - $filtername_list[$lead_filter_id]</option>\n";
echo "</select>$NWB#vicidial_campaigns-lead_filter_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>750</option><option>1000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>50</option><option>100</option><option>200</option><option>500</option><option>750</option><option>1000</option><option>2000</option><option SELECTED>$hopper_level</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Force Reset of Hopper: </td><td align=left><select size=1 name=reset_hopper><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_campaigns-force_reset_hopper$NWE</td></tr>\n";