Added dead_stop_recording campaign option
Fix for dead call logging, added experimental dead call reversal option Added IQNANQ status to second alert NQ git-svn-id: svn://192.168.202.10@3740 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -3900,7 +3900,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$dropSQL='';
|
||||
$drop_statuses='';
|
||||
if ($second_alert_trigger =~ /TO|TIMEOUT/i) {$drop_statuses .= "TIMEOT|";}
|
||||
if ($second_alert_trigger =~ /NQ/i) {$drop_statuses .= "NANQUE|";}
|
||||
if ($second_alert_trigger =~ /NQ/i) {$drop_statuses .= "NANQUE|IQNANQ|";}
|
||||
if ($second_alert_trigger =~ /HT/i) {$drop_statuses .= "HOLDTO|";}
|
||||
if ($second_alert_trigger =~ /WT/i) {$drop_statuses .= "WAITTO|";}
|
||||
if (length($drop_statuses) > 1)
|
||||
|
||||
@@ -1116,7 +1116,8 @@ custom_one TEXT,
|
||||
custom_two TEXT,
|
||||
custom_three TEXT,
|
||||
custom_four TEXT,
|
||||
custom_five TEXT
|
||||
custom_five TEXT,
|
||||
dead_stop_recording ENUM('DISABLED','ALL_CALLS','OUTBOUND_ONLY','INBOUND_ONLY','AUTODIAL_ONLY','MANUAL_ONLY') default 'DISABLED'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -5426,4 +5427,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1689',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1690',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -2383,4 +2383,8 @@ ALTER TABLE vicidial_inbound_groups ADD second_alert_only VARCHAR(40) default 'D
|
||||
|
||||
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('EXAMPLE_VID_PROMPT_SPECIAL','Example Call Menu VID Special Container settings','CM_VIDPROMPT_SPECIAL','---ALL---','list_ingroup => 102,TEST_IN2\r\nlist_ingroup => 103,TEST_IN3\r\nlist_ingroup => 104,TEST_IN4\r\ndefault_ingroup => TEST_IN5\r\nnot_found_action => new_lead\r\nnew_lead_ingroup => TEST_IN');
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1688',db_schema_update_date=NOW() where db_schema_version < 1689;
|
||||
UPDATE system_settings SET db_schema_version='1689',db_schema_update_date=NOW() where db_schema_version < 1689;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD dead_stop_recording ENUM('DISABLED','ALL_CALLS','OUTBOUND_ONLY','INBOUND_ONLY','AUTODIAL_ONLY','MANUAL_ONLY') default 'DISABLED';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1690',db_schema_update_date=NOW() where db_schema_version < 1690;
|
||||
|
||||
+140
-41
@@ -95,10 +95,11 @@
|
||||
# 230220-1759 - Fix for In-Group manual dial issue
|
||||
# 230412-1020 - Added code for send_notification API function
|
||||
# 230420-2020 - Added latency logging
|
||||
# 230616-1810 - Added dead_count checking and 1-second delay in DEAD call logging and dead call log reversal
|
||||
#
|
||||
|
||||
$version = '2.14-69';
|
||||
$build = '230420-2020';
|
||||
$version = '2.14-70';
|
||||
$build = '230616-1810';
|
||||
$php_script = 'conf_exten_check.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=51;
|
||||
@@ -106,6 +107,7 @@ $one_mysql_log=0;
|
||||
$DB=0;
|
||||
$VD_login=0;
|
||||
$SSagent_debug_logging=0;
|
||||
$dead_logging_version=1;
|
||||
$startMS = microtime();
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
|
||||
@@ -163,6 +165,8 @@ if (isset($_GET["active_ingroup_dial"])) {$active_ingroup_dial=$_GET["active_i
|
||||
elseif (isset($_POST["active_ingroup_dial"])) {$active_ingroup_dial=$_POST["active_ingroup_dial"];}
|
||||
if (isset($_GET["latency"])) {$latency=$_GET["latency"];}
|
||||
elseif (isset($_POST["latency"])) {$latency=$_POST["latency"];}
|
||||
if (isset($_GET["dead_count"])) {$dead_count=$_GET["dead_count"];}
|
||||
elseif (isset($_POST["dead_count"])) {$dead_count=$_POST["dead_count"];}
|
||||
|
||||
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
|
||||
|
||||
@@ -239,6 +243,7 @@ $campagentstdisp = preg_replace("/[^-_0-9a-zA-Z]/","",$campagentstdisp);
|
||||
$phone_number = preg_replace("/[^-_0-9a-zA-Z]/","",$phone_number);
|
||||
$xferchannel = preg_replace("/\'|\"|\\\\|;/","",$xferchannel);
|
||||
$latency = preg_replace("/[^-_0-9a-zA-Z]/","",$latency);
|
||||
$dead_count = preg_replace("/[^-_0-9a-zA-Z]/","",$dead_count);
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
@@ -891,29 +896,76 @@ if ($ACTION == 'refresh')
|
||||
|
||||
if ( ($AcalleridCOUNT < 1) and (preg_match("/INCALL/i",$Astatus)) and (strlen($Aagent_log_id) > 0) )
|
||||
{
|
||||
$DEADcustomer++;
|
||||
$DEADlog = "| DEAD:$Acallerid|$Alead_id|$AcalleridCOUNT";
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
if ($Aagent_log_idCOUNT < 1)
|
||||
if ($dead_count > 0)
|
||||
{
|
||||
$NEWdead_epoch = date("U");
|
||||
$deadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$DEADcustomer++;
|
||||
$DEADlog = "| DEAD:$Acallerid|$Alead_id|$AcalleridCOUNT";
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03020',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03019',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
if ($Aagent_log_idCOUNT < 1)
|
||||
{
|
||||
$NEWdead_epoch = date("U");
|
||||
$deadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03020',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "DEAD call logged A|$dead_count|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "DEAD call first detect A|$dead_count|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
}
|
||||
$dead_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dead_count > 0)
|
||||
{
|
||||
$unDEADaffected_rows=0;
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) ) and (dispo_epoch IS NULL);";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03021',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
### if dead logged already on this call, but call is no longer dead, reverse thee dead logging
|
||||
if ( ($Aagent_log_idCOUNT > 0) and ($dead_logging_version >= 2) )
|
||||
{
|
||||
$undeadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch=NULL where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$unDEADaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$undeadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "UNDEAD call reversal A: |$Aagent_log_idCOUNT|$dead_count|$unDEADaffected_rows|$dead_logging_version|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
$dead_count=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -970,29 +1022,76 @@ if ($ACTION == 'refresh')
|
||||
|
||||
if ( ($AcalleridCOUNT < 1) and (preg_match("/INCALL/i",$Astatus)) and (strlen($Aagent_log_id) > 0) )
|
||||
{
|
||||
$DEADcustomer++;
|
||||
$DEADlog = "| DEAD:$Acallerid|$Alead_id|$AcalleridCOUNT";
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
if ($Aagent_log_idCOUNT < 1)
|
||||
if ($dead_count > 0)
|
||||
{
|
||||
$NEWdead_epoch = date("U");
|
||||
$deadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$DEADcustomer++;
|
||||
$DEADlog = "| DEAD:$Acallerid|$Alead_id|$AcalleridCOUNT";
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
if ($Aagent_log_idCOUNT < 1)
|
||||
{
|
||||
$NEWdead_epoch = date("U");
|
||||
$deadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "DEAD call logged B|$dead_count|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "DEAD call first detect B|$dead_count|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
}
|
||||
$dead_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dead_count > 0)
|
||||
{
|
||||
$unDEADaffected_rows=0;
|
||||
### find whether the agent log record has already logged DEAD
|
||||
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) ) and (dispo_epoch IS NULL);";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$Aagent_log_idCOUNT=$row[0];
|
||||
|
||||
### if dead logged already on this call, but call is no longer dead, reverse thee dead logging
|
||||
if ( ($Aagent_log_idCOUNT > 0) and ($dead_logging_version >= 2) )
|
||||
{
|
||||
$undeadNOW_TIME = date("Y-m-d H:i:s");
|
||||
$stmt="UPDATE vicidial_agent_log set dead_epoch=NULL where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$unDEADaffected_rows = mysqli_affected_rows($link);
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set last_state_change='$undeadNOW_TIME' where agent_log_id='$Aagent_log_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
$tempACTION = 'dead_log';
|
||||
$TEMPstage = "UNDEAD call reversal B: |$Aagent_log_idCOUNT|$dead_count|$unDEADaffected_rows|$dead_logging_version|";
|
||||
vicidial_ajax_log($NOW_TIME,$startMS,$link,$tempACTION,$php_script,$user,$TEMPstage,$lead_id,$session_name,$stmt);
|
||||
$dead_count=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1452,7 +1551,7 @@ if ($ACTION == 'refresh')
|
||||
|
||||
|
||||
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . '|APIManualDialQueue: ' . $MDQ_count . '|APIRecording: ' . $external_recording . '|APIPaUseCodE: ' . $external_pause_code . '|WaitinGChats: ' . $WaitinGChats . '|WaitinGEmails: ' . $WaitinGEmails . '|LivEAgentCommentS: ' . $live_agents_comments . '|LeadIDSwitch: ' . $external_lead_id .'|DEADxfer: '.$DEADxfer .'|CHANanswer: '.$CHANanswer .'|Alogin_notes: '.$Alogin_notes. "\n";
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . ',' . $dead_count . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . '|APIManualDialQueue: ' . $MDQ_count . '|APIRecording: ' . $external_recording . '|APIPaUseCodE: ' . $external_pause_code . '|WaitinGChats: ' . $WaitinGChats . '|WaitinGEmails: ' . $WaitinGEmails . '|LivEAgentCommentS: ' . $live_agents_comments . '|LeadIDSwitch: ' . $external_lead_id .'|DEADxfer: '.$DEADxfer .'|CHANanswer: '.$CHANanswer .'|Alogin_notes: '.$Alogin_notes. "\n";
|
||||
|
||||
if (strlen($timer_action) > 3)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
# 221206-1458 - Added login_submit_once option
|
||||
# 230418-1008 - Added astguiclient_disabled option
|
||||
# 230418-1548 - Added dial_override_limit option
|
||||
# 230617-0815 - Added dead_logging_version option
|
||||
#
|
||||
|
||||
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
|
||||
@@ -76,6 +77,7 @@ $allow_sendmail_bypass = ''; # some setups require bypassing PHP's mail() functi
|
||||
$login_submit_once = '1'; # set to 0 to remove the "disable the login submit button after submitting" feature
|
||||
$astguiclient_disabled = '1'; # set to 0 to allow use of the astguiclient.php script
|
||||
$dial_override_limit = '6'; # number of dial-override calls per minute that will lock user account, set to 0 to disable dial_override limit
|
||||
$dead_logging_version = '0'; # experimental dead logging enabled, can reverse false DEAD call logging
|
||||
|
||||
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
|
||||
|
||||
|
||||
+56
-5
@@ -722,10 +722,11 @@
|
||||
# 230513-2010 - Fix for manual dial call error handling
|
||||
# 230518-0912 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use, chat fixes
|
||||
# 230523-0826 - Added User inbound_credits feature
|
||||
# 230615-0842 - Added dead_stop_recording feature
|
||||
#
|
||||
|
||||
$version = '2.14-689c';
|
||||
$build = '230523-0826';
|
||||
$version = '2.14-690c';
|
||||
$build = '230615-0842';
|
||||
$php_script = 'vicidial.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=103;
|
||||
@@ -2506,7 +2507,7 @@ else
|
||||
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
||||
|
||||
##### grab the campaign settings
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti,custom_one,custom_two,custom_three,custom_four,custom_five,allow_chats FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename,scheduled_callbacks_force_dial,callback_hours_block,callback_display_days,scheduled_callbacks_timezones_container,three_way_volume_buttons,manual_dial_validation,mute_recordings,leave_vm_no_dispo,leave_vm_message_group_id,campaign_script_two,browser_alert_sound,browser_alert_volume,three_way_record_stop_exception,pause_max_exceptions,transfer_button_launch,leave_3way_start_recording,leave_3way_start_recording_exception,calls_waiting_vl_one,calls_waiting_vl_two,in_man_dial_next_ready_seconds,in_man_dial_next_ready_seconds_override,transfer_no_dispo,local_call_time,pause_max_url,agent_hide_hangup,ig_xfer_list_sort,script_tab_frame_size,user_group_script,agent_hangup_route,agent_hangup_value,agent_hangup_ig_override,show_confetti,custom_one,custom_two,custom_three,custom_four,custom_five,allow_chats,dead_stop_recording FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -2700,6 +2701,7 @@ else
|
||||
$camp_custom_four = $row[186];
|
||||
$camp_custom_five = $row[187];
|
||||
$campaign_chat_enabled = $row[188];
|
||||
$dead_stop_recording = $row[189];
|
||||
|
||||
if ( (strlen($UGscript_id) > 0) and ($user_group_script == 'ENABLED') )
|
||||
{
|
||||
@@ -5974,6 +5976,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var MD_dial_timed_out=0;
|
||||
var routing_initiated_recording='<?php echo $routing_initiated_recording ?>';
|
||||
var dead_trigger_count=0;
|
||||
var dead_recording_triggered=0;
|
||||
var dead_trigger_first_ran=0;
|
||||
var dead_trigger_seconds='<?php echo $dead_trigger_seconds ?>';
|
||||
var dead_trigger_action='<?php echo $dead_trigger_action ?>';
|
||||
@@ -6044,6 +6047,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var camp_custom_three='<?php echo $camp_custom_three ?>';
|
||||
var camp_custom_four='<?php echo $camp_custom_four ?>';
|
||||
var camp_custom_five='<?php echo $camp_custom_five ?>';
|
||||
var dead_stop_recording='<?php echo $dead_stop_recording ?>';
|
||||
var dead_count=0;
|
||||
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
||||
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
||||
@@ -7214,7 +7219,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
if (xmlhttprequestcheckconf)
|
||||
{
|
||||
checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS + "&active_ingroup_dial=" + active_ingroup_dial + "&xferchannel=" + document.vicidial_form.xferchannel.value + "&check_for_answer=" + MDcheck_for_answer + "&MDnextCID=" + MDnextCID + "&campaign=" + campaign + "&phone_number=" + dialed_number + "&visibility=" + visibility_log + "&latency=" + latency + "&clicks=" + button_click_log;
|
||||
checkconf_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&client=vdc&conf_exten=" + taskconfnum + "&auto_dial_level=" + auto_dial_level + "&campagentstdisp=" + campagentstdisp + "&customer_chat_id=" + document.vicidial_form.customer_chat_id.value + "&live_call_seconds=" + VD_live_call_secondS + "&active_ingroup_dial=" + active_ingroup_dial + "&xferchannel=" + document.vicidial_form.xferchannel.value + "&check_for_answer=" + MDcheck_for_answer + "&MDnextCID=" + MDnextCID + "&campaign=" + campaign + "&phone_number=" + dialed_number + "&visibility=" + visibility_log + "&latency=" + latency + "&dead_count=" + dead_count + "&clicks=" + button_click_log;
|
||||
button_click_log='';
|
||||
visibility_log='';
|
||||
xmlhttprequestcheckconf.open('POST', 'conf_exten_check.php');
|
||||
@@ -7346,7 +7351,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
var APIManualDialQueue_array = check_time_array[24].split("APIManualDialQueue: ");
|
||||
APIManualDialQueue = APIManualDialQueue_array[1];
|
||||
var CheckDEADcall_array = check_time_array[10].split("DEADcall: ");
|
||||
CheckDEADcall = CheckDEADcall_array[1];
|
||||
var CheckDEADcallNUM_array = CheckDEADcall_array[1].split(",");
|
||||
CheckDEADcall = CheckDEADcallNUM_array[0];
|
||||
if (VD_live_customer_call==1)
|
||||
{dead_count = CheckDEADcallNUM_array[1];}
|
||||
var InGroupChange_array = check_time_array[11].split("InGroupChange: ");
|
||||
var InGroupChange = InGroupChange_array[1];
|
||||
var InGroupChangeBlend = check_time_array[12];
|
||||
@@ -12119,6 +12127,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
inbound_post_call_survey='';
|
||||
inbound_survey_participate='';
|
||||
dead_trigger_first_ran=0;
|
||||
dead_count=0;
|
||||
dead_recording_triggered=0;
|
||||
manual_cancel_skip=0;
|
||||
trigger_manual_validation=0;
|
||||
manual_entry_dial=0;
|
||||
@@ -15078,6 +15088,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
VD_live_customer_call = 0;
|
||||
VD_live_call_secondS = 0;
|
||||
MD_ring_secondS = 0;
|
||||
dead_count=0;
|
||||
dead_recording_triggered=0;
|
||||
CalLCID = '';
|
||||
MDnextCID = '';
|
||||
cid_lock=0;
|
||||
@@ -15360,6 +15372,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
xfer_agent_selected=0;
|
||||
MD_dial_timed_out=0;
|
||||
transfer_no_dispoTEMP=0;
|
||||
dead_count=0;
|
||||
if (manual_dial_preview < 1)
|
||||
{
|
||||
document.vicidial_form.LeadPreview.checked=false;
|
||||
@@ -16119,6 +16132,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
CheckDEADcallON=0;
|
||||
CheckDEADcallCOUNT=0;
|
||||
dead_trigger_count=0;
|
||||
dead_count=0;
|
||||
dead_recording_triggered=0;
|
||||
var last_customer_sec = customer_sec;
|
||||
customer_sec=0;
|
||||
currently_in_email_or_chat=0;
|
||||
@@ -16479,6 +16494,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
inbound_post_call_survey='';
|
||||
inbound_survey_participate='';
|
||||
dead_trigger_first_ran=0;
|
||||
dead_count=0;
|
||||
dead_recording_triggered=0;
|
||||
manual_cancel_skip=0;
|
||||
trigger_manual_validation=0;
|
||||
manual_entry_dial=0;
|
||||
@@ -20902,6 +20919,40 @@ function phone_number_format(formatphone) {
|
||||
dead_trigger_count++;
|
||||
// document.getElementById("debugbottomspan").innerHTML = "DEAD CALL SECONDS " + CheckDEADcallCOUNT + " " + dead_trigger_count;
|
||||
|
||||
if ( (dead_stop_recording != 'DISABLED') && (recording_active > 0) && (dead_recording_triggered < 1) )
|
||||
{
|
||||
if (inOUT == 'IN')
|
||||
{
|
||||
if ( (dead_stop_recording == 'ALL_CALLS') || (dead_stop_recording == 'INBOUND_ONLY') )
|
||||
{
|
||||
conf_send_recording('StopMonitorConf', session_id, recording_filename,'','','');
|
||||
dead_recording_triggered++;
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----RecordingDeadCallStop---" + dead_stop_recording + " " + inOUT + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var regAUTO = new RegExp("^V","g");
|
||||
if (LasTCID.match(regAUTO))
|
||||
{
|
||||
if ( (dead_stop_recording == 'ALL_CALLS') || (dead_stop_recording == 'OUTBOUND_ONLY') || (dead_stop_recording == 'AUTODIAL_ONLY') )
|
||||
{
|
||||
conf_send_recording('StopMonitorConf', session_id, recording_filename,'','','');
|
||||
dead_recording_triggered++;
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----RecordingDeadCallStop---" + dead_stop_recording + " " + inOUT + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (dead_stop_recording == 'ALL_CALLS') || (dead_stop_recording == 'OUTBOUND_ONLY') || (dead_stop_recording == 'MANUAL_ONLY') )
|
||||
{
|
||||
conf_send_recording('StopMonitorConf', session_id, recording_filename,'','','');
|
||||
dead_recording_triggered++;
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----RecordingDeadCallStop---" + dead_stop_recording + " " + inOUT + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( (dead_trigger_seconds > 0) && (dead_trigger_count >= dead_trigger_seconds) && (dead_trigger_action != 'DISABLED') )
|
||||
{
|
||||
dead_trigger_first_ran++;
|
||||
|
||||
+20
-5
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# version: 20230614161401
|
||||
# version: 20230615085301
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
||||
@@ -339,6 +339,7 @@ campaigns-dead_trigger_url Dead Call Trigger URL <QXZ>If the Dead Call Trigger A
|
||||
campaigns-dead_max Dead Call Max Seconds <QXZ>If this is set to greater than 0, after a customer hangs up and the agent has not clicked on the Hangup Customer button in this number of seconds, the call will automatically be hung up, the status below will be set and the agent will be paused. Default is 0 for disabled.</QXZ>
|
||||
campaigns-dead_max_dispo Dead Call Max Status <QXZ>If Dead Call Max Seconds is enabled, this is the status set for the call when the agent dead call is not hung up past the number of seconds set above. Default is DCMX.</QXZ>
|
||||
campaigns-dead_to_dispo Dead Call to Dispo Only <QXZ>If Dead Call Max Seconds is set greater than 0, this option can be enabled if you want to send the agent to the dispo screen after a dead call without automatically dispositioning it. Default is DISABLED.</QXZ>
|
||||
campaigns-dead_stop_recording Dead Call Stop Recording <QXZ>If this option is enabled, then if a call is being recorded and the customer hangs up, the recording will be automatically stopped. This feature can override an ALLFORCE call recording setting to stop a recording. If the OUTBOUND_ONLY option is used, it will only effect outbound auto-dial and manual calls. If the INBOUND_ONLY option is used, it will only effect inbound calls. If the AUTODIAL_ONLY option is used it will only effect auto-dialed calls. If the MANUAL_ONLY option is used it will only affect manual outbound calls. Note, If your agents have frequent connection issues, that can result in false hangup detection problems, so in those cases we do not recommend using this feature. Default is DISABLED.</QXZ>
|
||||
campaigns-dispo_max Dispo Call Max Seconds <QXZ>If this is set to greater than 0, and the agent has not selected a disposition status in this number of seconds, the call will automatically be set to the status below and the agent will be paused. Default is 0 for disabled.</QXZ>
|
||||
campaigns-dispo_max_dispo Dispo Call Max Status <QXZ>If Dispo Call Max Seconds is enabled, this is the status set for the call when the agent has not selected a status past the number of seconds set above. Default is DISMX.</QXZ>
|
||||
campaigns-pause_max Agent Pause Max Seconds <QXZ>If this is set to greater than 0, and the agent has not gone out of PAUSED status in this number of seconds, the agent will automatically be logged out of the agent screen. Default is 0 for disabled.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user