Changed drop percentage limit to allow for decimal values

Changed auto-detected Disconnect and Busy statuses AB ADC
Added optional carrier stats to outbound report and made the bottom graph optional
Fixed inbound AGENTDIRECT bug on systems with certain configurations

git-svn-id: svn://192.168.202.10@1145 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-06-08 08:17:43 +00:00
parent c3fa8a760d
commit ca8f4964fd
9 changed files with 292 additions and 186 deletions
+2
View File
@@ -83,6 +83,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
22. Added DAHDI channel compatibility and carrier logging for outbound list calls 22. Added DAHDI channel compatibility and carrier logging for outbound list calls
23. Changed Auto-Detected Busy and Disconnected statuses to AB and ADC to better
separate them from agent-defined statuses
+5 -1
View File
@@ -92,6 +92,7 @@
# 81105-0248 - Added MySQL error logging # 81105-0248 - Added MySQL error logging
# 90103-0311 - Added sip-silences before transfers to fix rare MoH issues # 90103-0311 - Added sip-silences before transfers to fix rare MoH issues
# 90115-0601 - Added AGENTDIRECT functionality # 90115-0601 - Added AGENTDIRECT functionality
# 90607-1717 - Fix for AGENTDIRECT bug under certain configurations
# #
$script = 'agi-VDAD_ALL_inbound.agi'; $script = 'agi-VDAD_ALL_inbound.agi';
@@ -987,7 +988,10 @@ if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) )
$ADfindSQL = "and agent_only='$agent_only'"; $ADfindSQL = "and agent_only='$agent_only'";
$ADUfindSQL = "and vicidial_live_agents.user='$agent_only'"; $ADUfindSQL = "and vicidial_live_agents.user='$agent_only'";
} }
else
{
$ADfindSQL = "and agent_only=''";
}
############################################ ############################################
+3 -2
View File
@@ -45,6 +45,7 @@
# 81026-1247 - Changed to allow for better remote agent calling # 81026-1247 - Changed to allow for better remote agent calling
# 81029-0522 - Changed to disallow queue_log logging of IVR calls # 81029-0522 - Changed to disallow queue_log logging of IVR calls
# 90604-1044 - Fixed formatting, added DAHDI support, added carrier hangup code logging # 90604-1044 - Fixed formatting, added DAHDI support, added carrier hangup code logging
# 90608-0316 - Changed hangup code dispos B and DC to AB and ADC to separate Agent dispos from Auto
# #
@@ -634,8 +635,8 @@ sub process_request
{ {
if ( ($PRI =~ /^PRI$/) && ($callerid =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ( ($dialstatus =~ /BUSY/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^28$/) ) ) ) if ( ($PRI =~ /^PRI$/) && ($callerid =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ( ($dialstatus =~ /BUSY/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^28$/) ) ) )
{ {
if ($dialstatus =~ /BUSY/) {$VDL_status = 'B'; $VDAC_status = 'BUSY';} if ($dialstatus =~ /BUSY/) {$VDL_status = 'AB'; $VDAC_status = 'BUSY';}
if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = 'DC'; $VDAC_status = 'DISCONNECT';} if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = 'ADC'; $VDAC_status = 'DISCONNECT';}
$stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';"; $stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
+4 -2
View File
@@ -11,8 +11,10 @@ AA - Answering Machine Auto - Dialer-defined Answering Machine
AM - Answering Machine Sent to Mesg - AMD(Answering Machine Detection) call sent to a message to be played AM - Answering Machine Sent to Mesg - AMD(Answering Machine Detection) call sent to a message to be played
AL - Answering Machine Msg Played - AMD(Answering Machine Detection) call sent to a message and message has been played AL - Answering Machine Msg Played - AMD(Answering Machine Detection) call sent to a message and message has been played
AFAX - Fax Machine Auto - Dialer-defined Fax Machine AFAX - Fax Machine Auto - Dialer-defined Fax Machine
B - Busy - Carrier-received Busy signal, or agent-defined Busy if allowed B - Busy - Agent-defined Busy signal
DC - Disconnected Number - Disconnected number AB - Busy Auto - Carrier-received Busy signal
DC - Disconnected Number - Agent-Defined Disconnected number
ADC - Disconnected Number Auto - Carrier-received Disconnected number
DEC - Declined Sale - Agent-defined status DEC - Declined Sale - Agent-defined status
DNC - DO NOT CALL - If defined, lead will also go int he VICIDIAL DNC list DNC - DO NOT CALL - If defined, lead will also go int he VICIDIAL DNC list
DNCL - DO NOT CALL Hopper Match - status of a lead that matches the phone number of a lead that has been placed in the VICIDIAL DNC list DNCL - DO NOT CALL Hopper Match - status of a lead that matches the phone number of a lead that has been placed in the VICIDIAL DNC list
@@ -580,7 +580,7 @@ allcalls_delay SMALLINT(3) UNSIGNED default '0',
omit_phone_code ENUM('Y','N') default 'N', omit_phone_code ENUM('Y','N') default 'N',
dial_method ENUM('MANUAL','RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE','INBOUND_MAN') default 'MANUAL', dial_method ENUM('MANUAL','RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE','INBOUND_MAN') default 'MANUAL',
available_only_ratio_tally ENUM('Y','N') default 'N', available_only_ratio_tally ENUM('Y','N') default 'N',
adaptive_dropped_percentage SMALLINT(3) default '3', adaptive_dropped_percentage VARCHAR(4) default '3',
adaptive_maximum_level VARCHAR(6) default '3.0', adaptive_maximum_level VARCHAR(6) default '3.0',
adaptive_latest_server_time VARCHAR(4) default '2100', adaptive_latest_server_time VARCHAR(4) default '2100',
adaptive_intensity VARCHAR(6) default '0', adaptive_intensity VARCHAR(6) default '0',
@@ -1627,6 +1627,8 @@ INSERT INTO vicidial_override_ids(id_table,active,value) values('vicidial_lead_f
INSERT INTO vicidial_override_ids(id_table,active,value) values('vicidial_scripts','0','80000'); INSERT INTO vicidial_override_ids(id_table,active,value) values('vicidial_scripts','0','80000');
INSERT INTO vicidial_override_ids(id_table,active,value) values('phones','0','100'); INSERT INTO vicidial_override_ids(id_table,active,value) values('phones','0','100');
INSERT INTO vicidial_lead_filters(lead_filter_id,lead_filter_name,lead_filter_comments,lead_filter_sql) values('DROP72HOUR','UK 72 hour Drop No Call','Prevents dropped calls from being called within 72 hours of the last attempt',"( ( (status='DROP') and (last_local_call_time < CONCAT(DATE_ADD(CURDATE(), INTERVAL -3 DAY),' ',CURTIME()) ) ) or (status != 'DROP') )");
UPDATE system_settings SET qc_last_pull_time=NOW(); UPDATE system_settings SET qc_last_pull_time=NOW();
CREATE INDEX country_postal_code on vicidial_postal_codes (country_code,postal_code); CREATE INDEX country_postal_code on vicidial_postal_codes (country_code,postal_code);
@@ -1647,7 +1649,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a); CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1148'; UPDATE system_settings SET db_schema_version='1149';
GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost; GRANT RELOAD ON *.* TO cron@localhost;
@@ -329,8 +329,10 @@ INSERT INTO vicidial_statuses values('AA','Answering Machine Auto','N','N','UNDE
INSERT INTO vicidial_statuses values('AM','Answering Machine Sent to Mesg','N','N','UNDEFINED','N','N','N','N','N'); INSERT INTO vicidial_statuses values('AM','Answering Machine Sent to Mesg','N','N','UNDEFINED','N','N','N','N','N');
INSERT INTO vicidial_statuses values('AL','Answering Machine Msg Played','N','N','UNDEFINED','N','N','N','N','N'); INSERT INTO vicidial_statuses values('AL','Answering Machine Msg Played','N','N','UNDEFINED','N','N','N','N','N');
INSERT INTO vicidial_statuses values('AFAX','Fax Machine Auto','N','N','UNDEFINED','N','N','N','N','Y'); INSERT INTO vicidial_statuses values('AFAX','Fax Machine Auto','N','N','UNDEFINED','N','N','N','N','Y');
INSERT INTO vicidial_statuses values('AB','Busy Auto','N','N','UNDEFINED','N','N','N','N','N');
INSERT INTO vicidial_statuses values('B','Busy','Y','N','UNDEFINED','N','N','N','N','N'); INSERT INTO vicidial_statuses values('B','Busy','Y','N','UNDEFINED','N','N','N','N','N');
INSERT INTO vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED','N','N','N','N','Y'); INSERT INTO vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED','N','N','N','N','Y');
INSERT INTO vicidial_statuses values('ADC','Disconnected Number Auto','N','N','UNDEFINED','N','N','N','N','Y');
INSERT INTO vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED','N','N','Y','N','N'); INSERT INTO vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED','N','N','Y','N','N');
INSERT INTO vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED','N','Y','N','N','N'); INSERT INTO vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED','N','Y','N','N','N');
INSERT INTO vicidial_statuses values('DNCL','DO NOT CALL Hopper Match','N','N','UNDEFINED','N','Y','N','N','N'); INSERT INTO vicidial_statuses values('DNCL','DO NOT CALL Hopper Match','N','N','UNDEFINED','N','Y','N','N','N');
+7
View File
@@ -162,3 +162,10 @@ index (call_date)
ALTER TABLE servers ADD carrier_logging_active ENUM('Y','N') default 'N'; ALTER TABLE servers ADD carrier_logging_active ENUM('Y','N') default 'N';
UPDATE system_settings SET db_schema_version='1148'; UPDATE system_settings SET db_schema_version='1148';
ALTER TABLE vicidial_campaigns MODIFY adaptive_dropped_percentage VARCHAR(4) default '3';
INSERT INTO vicidial_statuses values('AB','Busy Auto','N','N','UNDEFINED','N','N','N','N','N');
INSERT INTO vicidial_statuses values('ADC','Disconnected Number Auto','N','N','UNDEFINED','N','N','N','N','Y');
UPDATE system_settings SET db_schema_version='1149';
+255 -173
View File
@@ -19,6 +19,7 @@
# 90310-2034 - Admin header # 90310-2034 - Admin header
# 90508-0644 - Changed to PHP long tags # 90508-0644 - Changed to PHP long tags
# 90524-2231 - Changed to use functions.php for seconds to HH:MM:SS conversion # 90524-2231 - Changed to use functions.php for seconds to HH:MM:SS conversion
# 90608-0251 - Added optional carrier codes stats, made graph at bottom optional
# #
header ("Content-type: text/html; charset=utf-8"); header ("Content-type: text/html; charset=utf-8");
@@ -29,8 +30,12 @@ require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF']; $PHP_SELF=$_SERVER['PHP_SELF'];
if (isset($_GET["agent_hours"])) {$agent_hours=$_GET["agent_hours"];} if (isset($_GET["carrier_stats"])) {$carrier_stats=$_GET["carrier_stats"];}
elseif (isset($_POST["agent_hours"])) {$agent_hours=$_POST["agent_hours"];} elseif (isset($_POST["carrier_stats"])) {$carrier_stats=$_POST["carrier_stats"];}
if (isset($_GET["bottom_graph"])) {$bottom_graph=$_GET["bottom_graph"];}
elseif (isset($_POST["bottom_graph"])) {$bottom_graph=$_POST["bottom_graph"];}
if (isset($_GET["agent_hours"])) {$agent_hours=$_GET["agent_hours"];}
elseif (isset($_POST["agent_hours"])) {$agent_hours=$_POST["agent_hours"];}
if (isset($_GET["group"])) {$group=$_GET["group"];} if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];} elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
@@ -50,6 +55,8 @@ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
if (strlen($shift)<2) {$shift='ALL';} if (strlen($shift)<2) {$shift='ALL';}
if (strlen($bottom_graph)<2) {$bottom_graph='NO';}
if (strlen($carrier_stats)<2) {$carrier_stats='NO';}
############################################# #############################################
##### START SYSTEM_SETTINGS LOOKUP ##### ##### START SYSTEM_SETTINGS LOOKUP #####
@@ -57,16 +64,25 @@ $stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt); $qm_conf_ct = mysql_num_rows($rslt);
$i=0; if ($qm_conf_ct > 0)
while ($i < $qm_conf_ct)
{ {
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
$non_latin = $row[0]; $non_latin = $row[0];
$i++;
} }
##### END SETTINGS LOOKUP ##### ##### END SETTINGS LOOKUP #####
########################################### ###########################################
##### SERVER CARRIER LOGGING LOOKUP #####
$stmt = "SELECT count(*) FROM servers where carrier_logging_active='Y' and max_vicidial_trunks > 0;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$srv_conf_ct = mysql_num_rows($rslt);
if ($srv_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$carrier_logging_active = $row[0];
}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 7 and view_reports='1';"; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level >= 7 and view_reports='1';";
if ($DB) {echo "|$stmt|\n";} if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
@@ -177,6 +193,22 @@ while ($campaigns_to_print > $o)
$o++; $o++;
} }
echo "</SELECT>\n"; echo "</SELECT>\n";
echo "</TD><TD VALIGN=TOP>";
if ($carrier_logging_active > 0)
{
echo "Carrier Stats:<BR>";
echo "<SELECT SIZE=1 NAME=carrier_stats>\n";
echo "<option selected value=\"$carrier_stats\">$carrier_stats</option>\n";
echo "<option value=\"YES\">YES</option>\n";
echo "<option value=\"NO\">NO</option>\n";
echo "</SELECT>\n";
}
echo "<BR>Bottom Graph:<BR>\n";
echo "<SELECT SIZE=1 NAME=bottom_graph>\n";
echo "<option selected value=\"$bottom_graph\">$bottom_graph</option>\n";
echo "<option value=\"YES\">YES</option>\n";
echo "<option value=\"NO\">NO</option>\n";
echo "</SELECT><BR>\n";
echo "</TD><TD VALIGN=TOP>Shift:<BR>"; echo "</TD><TD VALIGN=TOP>Shift:<BR>";
echo "<SELECT SIZE=1 NAME=shift>\n"; echo "<SELECT SIZE=1 NAME=shift>\n";
echo "<option selected value=\"$shift\">$shift</option>\n"; echo "<option selected value=\"$shift\">$shift</option>\n";
@@ -584,6 +616,47 @@ echo "+------------------------------------------------------+------------+-----
if ( ($carrier_logging_active > 0) and ($carrier_stats == 'YES') )
{
##############################
######### STATUS CATEGORY STATS
echo "\n";
echo "---------- CARRIER CALL STATUSES\n";
echo "+----------------------+------------+\n";
echo "| STATUS | CALLS |\n";
echo "+----------------------+------------+\n";
## get counts and time totals for all statuses in this campaign
$stmt="select dialstatus,count(*) from vicidial_carrier_log vcl,vicidial_log vl where vcl.uniqueid=vl.uniqueid and vcl.call_date > \"$query_date_BEGIN\" and vcl.call_date < \"$query_date_END\" and vl.call_date > \"$query_date_BEGIN\" and vl.call_date < \"$query_date_END\" $group_SQLand group by dialstatus order by dialstatus;";
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$carrierstatuses_to_print = mysql_num_rows($rslt);
$i=0;
while ($i < $carrierstatuses_to_print)
{
$row=mysql_fetch_row($rslt);
$TOTCARcalls = ($TOTCARcalls + $row[1]);
$CARstatus = sprintf("%-20s", $row[0]); while(strlen($CARstatus)>20) {$CARstatus = substr("$CARstatus", 0, -1);}
$CARcount = sprintf("%10s", $row[1]); while(strlen($CARcount)>10) {$CARcount = substr("$CARcount", 0, -1);}
echo "| $CARstatus | $CARcount |\n";
$i++;
}
$TOTCARcalls = sprintf("%10s", $TOTCARcalls); while(strlen($TOTCARcalls)>10) {$TOTCARcalls = substr("$TOTCARcalls", 0, -1);}
echo "+----------------------+------------+\n";
echo "| TOTAL | $TOTCARcalls |\n";
echo "+----------------------+------------+\n";
}
############################## ##############################
######### STATUS CATEGORY STATS ######### STATUS CATEGORY STATS
@@ -698,209 +771,218 @@ echo "+--------------------------+------------+------------+--------+\n";
echo "| Average Wait time between calls $AVGwait |\n"; echo "| Average Wait time between calls $AVGwait |\n";
echo "+-------------------------------------------------------------+\n"; echo "+-------------------------------------------------------------+\n";
##############################
######### TIME STATS
echo "\n";
echo "---------- TIME STATS\n";
echo "<FONT SIZE=0>\n";
$hi_hour_count=0;
$last_full_record=0;
$i=0;
$h=0; if ($bottom_graph == 'YES')
while ($i <= 96)
{ {
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' $group_SQLand;"; ##############################
$rslt=mysql_query($stmt, $link); ######### TIME STATS
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
echo "\n";
echo "---------- TIME STATS\n";
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' $group_SQLand;"; echo "<FONT SIZE=0>\n";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' $group_SQLand;"; $hi_hour_count=0;
$rslt=mysql_query($stmt, $link); $last_full_record=0;
if ($DB) {echo "$stmt\n";} $i=0;
$row=mysql_fetch_row($rslt); $h=0;
$hour_count[$i] = $row[0]; while ($i <= 96)
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' $group_SQLand;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$h++;
}
if ($hi_hour_count < 1)
{$hour_multiplier = 0;}
else
{
$hour_multiplier = (100 / $hi_hour_count);
#$hour_multiplier = round($hour_multiplier, 0);
}
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
$k=1;
$Mk=0;
$call_scale = '0';
while ($k <= 102)
{
if ($Mk >= 5)
{ {
$Mk=0; $stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' $group_SQLand;";
if ( ($k < 1) or ($hour_multiplier <= 0) ) $rslt=mysql_query($stmt, $link);
{$scale_num = 100;} if ($DB) {echo "$stmt\n";}
else $row=mysql_fetch_row($rslt);
{ $hour_count[$i] = $row[0];
$scale_num=($k / $hour_multiplier); if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
$scale_num = round($scale_num, 0); if ($hour_count[$i] > 0) {$last_full_record = $i;}
} $stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' $group_SQLand and status='DROP';";
$LENscale_num = (strlen($scale_num)); $rslt=mysql_query($stmt, $link);
$k = ($k + $LENscale_num); if ($DB) {echo "$stmt\n";}
$call_scale .= "$scale_num"; $row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' $group_SQLand;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' $group_SQLand;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' $group_SQLand;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$hour_count[$i] = $row[0];
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
if ($hour_count[$i] > 0) {$last_full_record = $i;}
$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' $group_SQLand and status='DROP';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$drop_count[$i] = $row[0];
$i++;
$h++;
} }
if ($hi_hour_count < 1)
{$hour_multiplier = 0;}
else else
{ {
$call_scale .= " "; $hour_multiplier = (100 / $hi_hour_count);
$k++; $Mk++; #$hour_multiplier = round($hour_multiplier, 0);
} }
}
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n"; $k=1;
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n"; $Mk=0;
echo "| HOUR |$call_scale| DROPS | TOTAL |\n"; $call_scale = '0';
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n"; while ($k <= 102)
$ZZ = '00';
$i=0;
$h=4;
$hour= -1;
$no_lines_yet=1;
while ($i <= 96)
{
$char_counter=0;
$time = ' ';
if ($h >= 4)
{ {
$hour++; if ($Mk >= 5)
$h=0;
if ($hour < 10) {$hour = "0$hour";}
$time = "+$hour$ZZ+";
}
if ($h == 1) {$time = " 15 ";}
if ($h == 2) {$time = " 30 ";}
if ($h == 3) {$time = " 45 ";}
$Ghour_count = $hour_count[$i];
if ($Ghour_count < 1)
{
if ( ($no_lines_yet) or ($i > $last_full_record) )
{ {
$do_nothing=1; $Mk=0;
if ( ($k < 1) or ($hour_multiplier <= 0) )
{$scale_num = 100;}
else
{
$scale_num=($k / $hour_multiplier);
$scale_num = round($scale_num, 0);
}
$LENscale_num = (strlen($scale_num));
$k = ($k + $LENscale_num);
$call_scale .= "$scale_num";
} }
else else
{ {
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]); $call_scale .= " ";
echo "|$time|"; $k++; $Mk++;
$k=0; while ($k <= 102) {echo " "; $k++;}
echo "| $hour_count[$i] |\n";
} }
} }
else
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
$ZZ = '00';
$i=0;
$h=4;
$hour= -1;
$no_lines_yet=1;
while ($i <= 96)
{ {
$no_lines_yet=0; $char_counter=0;
$Xhour_count = ($Ghour_count * $hour_multiplier); $time = ' ';
$Yhour_count = (99 - $Xhour_count); if ($h >= 4)
$Gdrop_count = $drop_count[$i];
if ($Gdrop_count < 1)
{ {
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]); $hour++;
$h=0;
echo "|$time|<SPAN class=\"green\">"; if ($hour < 10) {$hour = "0$hour";}
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;} $time = "+$hour$ZZ+";
echo "*X</SPAN>"; $char_counter++; }
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;} if ($h == 1) {$time = " 15 ";}
while ($char_counter <= 101) {echo " "; $char_counter++;} if ($h == 2) {$time = " 30 ";}
echo "| 0 | $hour_count[$i] |\n"; if ($h == 3) {$time = " 45 ";}
$Ghour_count = $hour_count[$i];
if ($Ghour_count < 1)
{
if ( ($no_lines_yet) or ($i > $last_full_record) )
{
$do_nothing=1;
}
else
{
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
echo "|$time|";
$k=0; while ($k <= 102) {echo " "; $k++;}
echo "| $hour_count[$i] |\n";
}
} }
else else
{ {
$Xdrop_count = ($Gdrop_count * $hour_multiplier); $no_lines_yet=0;
$Xhour_count = ($Ghour_count * $hour_multiplier);
$Yhour_count = (99 - $Xhour_count);
# if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);} $Gdrop_count = $drop_count[$i];
if ($Gdrop_count < 1)
{
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
$XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 ); echo "|$time|<SPAN class=\"green\">";
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
echo "*X</SPAN>"; $char_counter++;
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;}
while ($char_counter <= 101) {echo " "; $char_counter++;}
echo "| 0 | $hour_count[$i] |\n";
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]); }
$drop_count[$i] = sprintf("%-5s", $drop_count[$i]); else
{
$Xdrop_count = ($Gdrop_count * $hour_multiplier);
echo "|$time|<SPAN class=\"red\">"; # if ($Xdrop_count >= $Xhour_count) {$Xdrop_count = ($Xdrop_count - 1);}
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++; $XXhour_count = ( ($Xhour_count - $Xdrop_count) - 1 );
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
echo "X</SPAN>"; $char_counter++; $hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;} $drop_count[$i] = sprintf("%-5s", $drop_count[$i]);
while ($char_counter <= 102) {echo " "; $char_counter++;}
echo "| $drop_count[$i] | $hour_count[$i] |\n"; echo "|$time|<SPAN class=\"red\">";
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
echo "X</SPAN>"; $char_counter++;
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;}
while ($char_counter <= 102) {echo " "; $char_counter++;}
echo "| $drop_count[$i] | $hour_count[$i] |\n";
}
} }
$i++;
$h++;
} }
$i++; echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
$h++;
### END bottom graph
} }
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
$ENDtime = date("U"); $ENDtime = date("U");
+10 -6
View File
@@ -1074,7 +1074,6 @@ while ($i < $qm_conf_ct)
if ($non_latin < 1) if ($non_latin < 1)
{ {
### DIGITS ONLY ### ### DIGITS ONLY ###
$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage);
$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); $adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); $admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); $admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
@@ -1334,6 +1333,7 @@ if ($non_latin < 1)
$sounds_web_server = ereg_replace("[^\.0-9]","",$sounds_web_server); $sounds_web_server = ereg_replace("[^\.0-9]","",$sounds_web_server);
$active_voicemail_server = ereg_replace("[^\.0-9]","",$active_voicemail_server); $active_voicemail_server = ereg_replace("[^\.0-9]","",$active_voicemail_server);
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit); $auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
$adaptive_dropped_percentage = ereg_replace("[^\.0-9]","",$adaptive_dropped_percentage);
### ALPHA-NUMERIC and spaces and hash and star and comma ### ALPHA-NUMERIC and spaces and hash and star and comma
$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); $xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
@@ -1792,11 +1792,12 @@ else
# 90531-1802 - Added auto-generated options for users, campaigns, in-groups, etc..., added option to HIDE custphone # 90531-1802 - Added auto-generated options for users, campaigns, in-groups, etc..., added option to HIDE custphone
# 90531-2339 - Added Dynamic options for Call Menu # 90531-2339 - Added Dynamic options for Call Menu
# 90605-0248 - Added carrier_logging_active servers option # 90605-0248 - Added carrier_logging_active servers option
# 90607-1716 - Changed drop percent limit to allow for 0.1 steps under 3%
# #
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.2.0-192'; $admin_version = '2.2.0-193';
$build = '90605-0248'; $build = '90607-1716';
$STARTtime = date("U"); $STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s"); $SQLdate = date("Y-m-d H:i:s");
@@ -14830,11 +14831,14 @@ if ($ADD==31)
echo "<tr bgcolor=#BDFFBD><td align=right>Available Only Tally: </td><td align=left><select size=1 name=available_only_ratio_tally><option >Y</option><option>N</option><option SELECTED>$available_only_ratio_tally</option></select>$NWB#vicidial_campaigns-available_only_ratio_tally$NWE</td></tr>\n"; echo "<tr bgcolor=#BDFFBD><td align=right>Available Only Tally: </td><td align=left><select size=1 name=available_only_ratio_tally><option >Y</option><option>N</option><option SELECTED>$available_only_ratio_tally</option></select>$NWB#vicidial_campaigns-available_only_ratio_tally$NWE</td></tr>\n";
echo "<tr bgcolor=#BDFFBD><td align=right>Drop Percentage Limit: </td><td align=left><select size=1 name=adaptive_dropped_percentage>\n"; echo "<tr bgcolor=#BDFFBD><td align=right>Drop Percentage Limit: </td><td align=left><select size=1 name=adaptive_dropped_percentage>\n";
$n=100; $n=101;
while ($n>=1) while ($n>=0.1)
{ {
if ($n <= 3)
{$n = ($n - 0.1);}
else
{$n--;}
echo "<option>$n</option>\n"; echo "<option>$n</option>\n";
$n--;
} }
echo "<option SELECTED>$adaptive_dropped_percentage</option></select>% $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE</td></tr>\n"; echo "<option SELECTED>$adaptive_dropped_percentage</option></select>% $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE</td></tr>\n";