diff --git a/UPGRADE b/UPGRADE
index 66115dbc..0d1f2eb9 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -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
+23. Changed Auto-Detected Busy and Disconnected statuses to AB and ADC to better
+ separate them from agent-defined statuses
diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi
index 63ea49d7..cee55feb 100644
--- a/agi/agi-VDAD_ALL_inbound.agi
+++ b/agi/agi-VDAD_ALL_inbound.agi
@@ -92,6 +92,7 @@
# 81105-0248 - Added MySQL error logging
# 90103-0311 - Added sip-silences before transfers to fix rare MoH issues
# 90115-0601 - Added AGENTDIRECT functionality
+# 90607-1717 - Fix for AGENTDIRECT bug under certain configurations
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -987,7 +988,10 @@ if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) )
$ADfindSQL = "and agent_only='$agent_only'";
$ADUfindSQL = "and vicidial_live_agents.user='$agent_only'";
}
-
+else
+ {
+ $ADfindSQL = "and agent_only=''";
+ }
############################################
diff --git a/bin/FastAGI_log.pl b/bin/FastAGI_log.pl
index 7d2d6ad7..5bef71f4 100644
--- a/bin/FastAGI_log.pl
+++ b/bin/FastAGI_log.pl
@@ -45,6 +45,7 @@
# 81026-1247 - Changed to allow for better remote agent calling
# 81029-0522 - Changed to disallow queue_log logging of IVR calls
# 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 ($dialstatus =~ /BUSY/) {$VDL_status = 'B'; $VDAC_status = 'BUSY';}
- if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = 'DC'; $VDAC_status = 'DISCONNECT';}
+ if ($dialstatus =~ /BUSY/) {$VDL_status = 'AB'; $VDAC_status = 'BUSY';}
+ if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = 'ADC'; $VDAC_status = 'DISCONNECT';}
$stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
diff --git a/docs/VICIDIAL_statuses.txt b/docs/VICIDIAL_statuses.txt
index 3c9ef3bb..9eb94223 100644
--- a/docs/VICIDIAL_statuses.txt
+++ b/docs/VICIDIAL_statuses.txt
@@ -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
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
-B - Busy - Carrier-received Busy signal, or agent-defined Busy if allowed
-DC - Disconnected Number - Disconnected number
+B - Busy - Agent-defined Busy signal
+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
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
diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql
index 64562976..6aece6ec 100644
--- a/extras/MySQL_AST_CREATE_tables.sql
+++ b/extras/MySQL_AST_CREATE_tables.sql
@@ -580,7 +580,7 @@ allcalls_delay SMALLINT(3) UNSIGNED default '0',
omit_phone_code ENUM('Y','N') default 'N',
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',
-adaptive_dropped_percentage SMALLINT(3) default '3',
+adaptive_dropped_percentage VARCHAR(4) default '3',
adaptive_maximum_level VARCHAR(6) default '3.0',
adaptive_latest_server_time VARCHAR(4) default '2100',
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('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();
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 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@localhost;
diff --git a/extras/first_server_install.sql b/extras/first_server_install.sql
index 50cc4e28..ada0987d 100644
--- a/extras/first_server_install.sql
+++ b/extras/first_server_install.sql
@@ -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('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('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('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('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');
diff --git a/extras/upgrade_2.2.0.sql b/extras/upgrade_2.2.0.sql
index c387fd52..d9705807 100644
--- a/extras/upgrade_2.2.0.sql
+++ b/extras/upgrade_2.2.0.sql
@@ -162,3 +162,10 @@ index (call_date)
ALTER TABLE servers ADD carrier_logging_active ENUM('Y','N') default 'N';
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';
diff --git a/www/vicidial/AST_VDADstats.php b/www/vicidial/AST_VDADstats.php
index 0d2fab4b..26bd7c59 100644
--- a/www/vicidial/AST_VDADstats.php
+++ b/www/vicidial/AST_VDADstats.php
@@ -19,6 +19,7 @@
# 90310-2034 - Admin header
# 90508-0644 - Changed to PHP long tags
# 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");
@@ -29,8 +30,12 @@ require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
-if (isset($_GET["agent_hours"])) {$agent_hours=$_GET["agent_hours"];}
- elseif (isset($_POST["agent_hours"])) {$agent_hours=$_POST["agent_hours"];}
+if (isset($_GET["carrier_stats"])) {$carrier_stats=$_GET["carrier_stats"];}
+ 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"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
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);
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 #####
@@ -57,16 +64,25 @@ $stmt = "SELECT use_non_latin FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
-$i=0;
-while ($i < $qm_conf_ct)
+if ($qm_conf_ct > 0)
{
$row=mysql_fetch_row($rslt);
$non_latin = $row[0];
- $i++;
}
##### 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';";
if ($DB) {echo "|$stmt|\n";}
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
@@ -177,6 +193,22 @@ while ($campaigns_to_print > $o)
$o++;
}
echo "\n";
+echo "
";
+if ($carrier_logging_active > 0)
+ {
+ echo "Carrier Stats: ";
+ echo "\n";
+ }
+echo " Bottom Graph: \n";
+echo " \n";
echo " | Shift: ";
echo " |