Added code for recording_dtmf_muting, fix for Stereo Call Recording on multi-server clusters

git-svn-id: svn://192.168.202.10@3949 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2025-10-21 13:16:28 +00:00
parent df21c54c24
commit 1e4b06b7fa
24 changed files with 3029 additions and 274 deletions
+4
View File
@@ -886,6 +886,10 @@ OTHER CHANGES:
to be sent out from the Agent Screen while the agent is talking to the
customer, based on the number of seconds they have been talking.
253. Added Recording DTMF Muting, allowing for the muting of call recordings
for X seconds if any DTMF signal is detected on the call. Configurable
in Campaigns, In-Groups and system-wide.
+40 -10
View File
@@ -71,15 +71,17 @@
# 230726-0932 - Added manual_vm_status_updates campaign option
# 240906-2228 - Added AMD minimum length handling to increase short call durations
# 250924-2152 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0903 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
#
$script = 'VD_amd.agi';
$build = '250924-2152';
$build = '251006-0903';
$A = 1; # set to 1 for AMD output messages mode
$AMD_LOG = 3; # set to 1 for logfile and 2 forDB log, 3 for both
$wav='.wav';
$US='_';
$recording_dtmf_muting=0;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
@@ -148,7 +150,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
#############################################
##### Gather system_settings #####
$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking FROM system_settings;";
$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,recording_dtmf_muting,recording_dtmf_detection FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -157,6 +159,8 @@ if ($sthArows > 0)
@aryA = $sthA->fetchrow_array;
$SSsip_event_logging = $aryA[0];
$SScall_quota_lead_ranking = $aryA[1];
$SSrecording_dtmf_muting = $aryA[2];
$SSrecording_dtmf_detection = $aryA[3];
}
$sthA->finish();
###########################################
@@ -534,7 +538,7 @@ else
$selected_campaign='';
### Grab vmail forward message values from the database
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards,call_quota_lead_ranking,vmm_daily_limit,manual_vm_status_updates FROM vicidial_campaigns where campaign_id = '$VD_campaign_id' limit 1;";
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards,call_quota_lead_ranking,vmm_daily_limit,manual_vm_status_updates,recording_dtmf_muting FROM vicidial_campaigns where campaign_id = '$VD_campaign_id' limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -556,6 +560,7 @@ else
$VD_call_quota_lead_ranking = $aryA[11];
$vmm_daily_limit = $aryA[12];
$manual_vm_status_updates = $aryA[13];
$recording_dtmf_muting = $aryA[14];
$sthA->finish();
}
else
@@ -563,7 +568,7 @@ else
$sthA->finish();
### Grab vmail forward message values from the database
$SQL_group_id=$VD_campaign_id; $SQL_group_id =~ s/_/\\_/gi;
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards,vmm_daily_limit,manual_vm_status_updates FROM vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" order by active,campaign_id limit 1;";
$stmtA = "SELECT am_message_exten,amd_send_to_vmx,waitforsilence_options,survey_recording,campaign_rec_filename,cpd_amd_action,amd_inbound_group,amd_callmenu,cpd_unknown_action,campaign_id,am_message_wildcards,vmm_daily_limit,manual_vm_status_updates,recording_dtmf_muting FROM vicidial_campaigns where closer_campaigns LIKE \"% $SQL_group_id %\" order by active,campaign_id limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -585,6 +590,7 @@ else
$VD_call_quota_lead_ranking = 'DISABLED';
$vmm_daily_limit = $aryA[12];
$manual_vm_status_updates = $aryA[13];
$recording_dtmf_muting = $aryA[14];
$sthA->finish();
if ($AGILOG) {$agi_string = "-- Inbound call, settings gathered from: |$selected_campaign|$DB_am_message_exten|$DB_amd_send_to_vmx|$waitforsilence_options"; &agi_output;}
}
@@ -710,25 +716,49 @@ else
%ast_ver_str = parse_asterisk_version($asterisk_version);
if (( $ast_ver_str{major} = 1 ) && ($ast_ver_str{minor} < 6))
{
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_filename");
$AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/AMD$campaign_rec_filename");
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/AMD$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/AMD$campaign_rec_filename-out.wav)");
}
else
{
$AGI->exec("Monitor","wav,/var/spool/asterisk/monitor/MIX/$campaign_rec_filename");
$AGI->exec("Monitor","wav,/var/spool/asterisk/monitor/MIX/AMD$campaign_rec_filename");
}
}
### insert record into recording_log table ###
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,length_in_sec,filename,lead_id,user,location,vicidial_id) values('$channel','$VARserver_ip','$VD_phone_number','$now_date','$now_date_epoch','0','$campaign_rec_filename','$VD_lead_id','VDAD','$campaign_rec_filename','$uniqueid');";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,length_in_sec,filename,lead_id,user,location,vicidial_id) values('$channel','$VARserver_ip','$VD_phone_number','$now_date','$now_date_epoch','0','AMD$campaign_rec_filename','$VD_lead_id','VDAD','AMD$campaign_rec_filename','$uniqueid');";
$SRaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- AMD RECORDING STARTED : |$SRaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($SSrecording_dtmf_muting > 1)
{
$recording_dtmf_muting = $SSrecording_dtmf_muting;
}
}
### insert record into recording_live table ###
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_AMD','$VARserver_ip','$now_date','$channel','AMD$campaign_rec_filename','$VD_lead_id','VDAD','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
if ($AGILOG) {$agi_string = "-- AMD RECORDING STARTED : |$SRaffected_rows|$rLIVEaffected_rows|$recording_id|AMD$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
+19 -3
View File
@@ -52,6 +52,7 @@
# 230124-1228 - Added logging of VICIrecGatewayID channel variable, and vicidial_did_gateway_log table
# 241208-1748 - Changed DID filter_phone_group_id & pre_filter_phone_group_id to multi-selects
# 250924-2156 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0905 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
#
@@ -154,7 +155,7 @@ $sthA->finish();
#############################################
##### START SYSTEM SETTINGS LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_system_filter,inbound_answer_config FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_system_filter,inbound_answer_config,recording_dtmf_muting,recording_dtmf_detection FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -176,6 +177,8 @@ if ($sthArows > 0)
$tables_use_alt_log_db = $aryA[12];
$SSdid_system_filter = $aryA[13];
$SSinbound_answer_config = $aryA[14];
$SSrecording_dtmf_muting = $aryA[15];
$SSrecording_dtmf_detection = $aryA[16];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -880,7 +883,7 @@ if ($record_call =~ /Y/)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$filename-in.wav)t($PATHmonitor/MIX/$filename-out.wav)");
@@ -908,7 +911,20 @@ if ($record_call =~ /Y/)
$sthA->finish();
}
if ($AGILOG) {$did_string = "-- RECORDING LOG : |$affected_rowsR|$insert_recording_id|$stmtA|"; &did_output;}
$recording_dtmf_muting=0;
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($SSrecording_dtmf_muting > 1)
{
$recording_dtmf_muting = $SSrecording_dtmf_muting;
}
}
### insert record into recording_live table ###
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$insert_recording_id','MONO_LEGACY_DID','$VARserver_ip','$now_date','$channel','$filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
if ($AGILOG) {$did_string = "-- RECORDING LOG : |$affected_rowsR|$rLIVEaffected_rows|$insert_recording_id|$stmtA|"; &did_output;}
}
### Grab Server values from the database
+29 -1
View File
@@ -54,6 +54,7 @@
# 120430-2214 - Converted call to Monitor app to be asterisk 1.8 compatible
# 130108-1816 - Changes for Asterisk 1.8 compatibility
# 250924-2158 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0901 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
#
&get_time_now;
@@ -119,6 +120,21 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
or die "Couldn't connect to database: " . DBI->errstr;
#############################################
##### Gather system_settings #####
$stmtA = "SELECT recording_dtmf_muting,recording_dtmf_detection FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$SSrecording_dtmf_muting = $aryA[0];
$SSrecording_dtmf_detection = $aryA[1];
}
$sthA->finish();
###########################################
### Grab Server values from the database
$stmtA = "SELECT agi_output,ext_context,asterisk_version FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -387,7 +403,7 @@ if ($record_call =~ /Y/)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$filename-in.wav)t($PATHmonitor/MIX/$filename-out.wav)");
@@ -418,6 +434,18 @@ if ($record_call =~ /Y/)
if ($AGILOG) {$agi_string = "RECORDING- $recording_id $ivr_id START filename: $filename"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
$recording_dtmf_muting=0;
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($SSrecording_dtmf_muting > 1)
{
$recording_dtmf_muting = $SSrecording_dtmf_muting;
}
}
### insert record into recording_live table ###
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_VERIF','$server_ip','$now_date','$channel','$filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
}
+68 -1
View File
@@ -61,6 +61,7 @@
# 151214-2148 - Added more variables to be used by nva url feature
# 151220-1521 - Added phone NVA List ID option for not found phone numbers
# 250924-2137 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0904 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
#
&get_time_now;
@@ -82,6 +83,7 @@ $now_date = "$year-$mon-$mday $hour:$min:$sec";
$filedate = "$year$mon$mday$hour$min$sec";
$US='_';
$VLAcampaign='';
# default path to astguiclient configuration file:
@@ -126,6 +128,21 @@ $AGI = new Asterisk::AGI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
#############################################
##### Gather system_settings #####
$stmtA = "SELECT recording_dtmf_muting,recording_dtmf_detection FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$SSrecording_dtmf_muting = $aryA[0];
$SSrecording_dtmf_detection = $aryA[1];
}
$sthA->finish();
###########################################
### Grab Server values from the database
$stmtA = "SELECT agi_output,ext_context,asterisk_version FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -405,7 +422,7 @@ if ($record_call =~ /Y/)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r(/var/spool/asterisk/monitor/MIX/$filename-in.wav)t(/var/spool/asterisk/monitor/MIX/$filename-out.wav)");
@@ -415,6 +432,56 @@ if ($record_call =~ /Y/)
$AGI->exec("Monitor","wav,/var/spool/asterisk/monitor/MIX/$filename");
}
}
### get campaign settings for DTMF muting, if enabled on this system
$recording_dtmf_muting=0;
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($SSrecording_dtmf_muting > 1)
{
$recording_dtmf_muting = $SSrecording_dtmf_muting;
}
else
{
if (length($VLAcampaign) < 1)
{
$stmtA = "SELECT list_id FROM vicidial_list where lead_id='$lead_id' limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VLAlist_id = $aryA[0];
$stmtA = "SELECT campaign_id FROM vicidial_lists where list_id='$VLAlist_id' limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VLAcampaign = $aryA[0];
}
}
}
$stmtA = "SELECT recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$VLAcampaign' limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_dtmf_muting = $aryA[0];
}
}
if ($AGILOG) {$agi_string = "DTMF Muting check: $recording_dtmf_muting|$SSrecording_dtmf_muting|$VLAcampaign($lead_id)"; &agi_output;}
}
### insert record into recording_live table ###
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_NVA','$VARserver_ip','$now_date','$channel','$filename','$lead_id','$accountcode','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
}
if ( ($phone_url =~ /Y/) && (length($nva_call_url) > 8) )
+84 -43
View File
@@ -268,6 +268,7 @@
# 250825-1824 - Added stereo_recording code
# 250924-2147 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251001-1836 - Fix for rare Stereo recording filename issue
# 251020-0836 - Added code for recording_dtmf_muting, fix for stereo call recording
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -436,7 +437,7 @@ $sthA->finish();
#############################################
##### START SYSTEM SETTINGS LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method,abandon_check_queue,inbound_credits,stereo_recording,stereo_parallel_recording FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method,abandon_check_queue,inbound_credits,stereo_recording,stereo_parallel_recording,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -469,6 +470,8 @@ if ($sthArows > 0)
$SSinbound_credits = $aryA[22];
$SSstereo_recording = $aryA[23];
$SSstereo_parallel_recording = $aryA[24];
$SSrecording_dtmf_detection = $aryA[25];
$SSrecording_dtmf_muting = $aryA[26];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -907,7 +910,7 @@ $affected_rows = $dbhA->do($stmtA);
### Grab inbound groups values from the database
$cbc=0;
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,routing_initiated_recordings,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,add_lead_timezone,populate_lead_source,populate_lead_vendor,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,answer_signal,no_agent_delay,agent_search_method,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,stereo_recording,stereo_recording_agent,stereo_rec_filename,stereo_parallel_recording,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename FROM vicidial_inbound_groups where group_id = '$channel_group';";
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,routing_initiated_recordings,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,add_lead_timezone,populate_lead_source,populate_lead_vendor,enter_ingroup_url,cid_cb_confirm_number,cid_cb_invalid_filter_phone_group,cid_cb_valid_length,cid_cb_valid_filename,cid_cb_confirmed_filename,cid_cb_enter_filename,cid_cb_you_entered_filename,cid_cb_press_to_confirm_filename,cid_cb_invalid_filename,cid_cb_reenter_filename,cid_cb_error_filename,place_in_line_caller_number_filename,place_in_line_you_next_filename,answer_signal,no_agent_delay,agent_search_method,populate_lead_comments,drop_call_seconds_override,populate_lead_owner,in_queue_nanque,in_queue_nanque_exceptions,second_alert_trigger,second_alert_trigger_seconds,second_alert_filename,second_alert_delay,second_alert_container,second_alert_only,third_alert_trigger,third_alert_trigger_seconds,third_alert_filename,third_alert_delay,third_alert_container,third_alert_only,stereo_recording,stereo_recording_agent,stereo_rec_filename,stereo_parallel_recording,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,recording_dtmf_muting FROM vicidial_inbound_groups where group_id = '$channel_group';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1070,6 +1073,9 @@ if ($sthArows > 0)
$parallel_rec_co_filename = $aryA[145];
$parallel_rec_cm_filename = $aryA[146];
$parallel_rec_fr_filename = $aryA[147];
$recording_dtmf_muting = $aryA[148];
if ( ($SSrecording_dtmf_detection < 1) || ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
if ( (length($place_in_line_caller_number_filename) < 1) || ($place_in_line_caller_number_filename =~ /^NULL$/i) )
{$place_in_line_caller_number_filename='queue-thereare';}
@@ -2693,7 +2699,7 @@ if ( ($CLchannel_group =~ /DID_INBOUND/) && (length($CLend_epoch) < 5) )
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("StopMixMonitor","");
@@ -2704,7 +2710,6 @@ if ( ($CLchannel_group =~ /DID_INBOUND/) && (length($CLend_epoch) < 5) )
}
}
$stmtA = "UPDATE recording_log set end_time='$now_date',end_epoch='$now_date_epoch',length_in_sec=$CLlength_in_sec,length_in_min='$CLlength_in_min' where recording_id='$CLrecording_id'";
$affected_rowsRL = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "Recording stopped: $CLstart_epoch|$now_date_epoch|$affected_rowsRL|$stmtA|"; &agi_output;}
@@ -3459,7 +3464,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$affected_rowsC = $dbhA->do($stmtC);
$dbhP=$dbhA; $mysql_count='02217'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_RIR','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_RIR','$VDADserver_ip','$now_date','$channelrec','$campaign_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3489,7 +3496,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3529,7 +3536,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3554,11 +3561,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3584,7 +3593,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3609,11 +3618,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3639,7 +3650,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3664,11 +3675,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$insert_lead_id','$channel_group STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$insert_lead_id','$channel_group STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3680,7 +3693,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3705,7 +3718,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$insert_lead_id','$channel_group STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$insert_lead_id','$channel_group STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -3713,7 +3726,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3725,8 +3740,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACIBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACICO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACICM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACI','$now_date','$now_date_epoch','$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3754,7 +3775,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$insert_lead_id','$channel_group STEREO AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$insert_lead_id','$channel_group STEREO AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -3762,7 +3783,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED RIR $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3770,14 +3793,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
@@ -5017,7 +5040,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$retval = $AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
@@ -5053,7 +5076,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$dbhP=$dbhA; $mysql_count='02214'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5082,7 +5107,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5122,7 +5147,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5147,11 +5172,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5177,7 +5204,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5202,11 +5229,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$insert_lead_id','$channel_group STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5232,7 +5261,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPFRR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPFRR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5257,11 +5286,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$insert_lead_id','$channel_group STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$insert_lead_id','$channel_group STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5273,7 +5304,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5298,11 +5329,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$insert_lead_id','$channel_group STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$insert_lead_id','$channel_group STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5314,8 +5347,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACRBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACRCO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACRCM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACR','$now_date','$now_date_epoch','$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5343,11 +5382,13 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$insert_lead_id','$channel_group STEREO AGENT-CONTROLLED REMOTE RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$insert_lead_id','$channel_group STEREO AGENT-CONTROLLED REMOTE RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$insert_lead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5355,14 +5396,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
+162 -82
View File
@@ -135,6 +135,7 @@
# 250827-1556 - Added stereo_recording code
# 250924-2150 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251001-1837 - Fix for rare Stereo recording filename issue
# 251020-0835 - Added code for recording_dtmf_muting, fix for stereo call recording
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -292,7 +293,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
#############################################
##### Gather system_settings #####
$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,agent_search_method,abandon_check_queue,stereo_recording,stereo_parallel_recording FROM system_settings;";
$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,agent_search_method,abandon_check_queue,stereo_recording,stereo_parallel_recording,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -305,6 +306,8 @@ if ($sthArows > 0)
$SSabandon_check_queue = $aryA[3];
$SSstereo_recording = $aryA[4];
$SSstereo_parallel_recording = $aryA[5];
$SSrecording_dtmf_detection = $aryA[6];
$SSrecording_dtmf_muting = $aryA[7];
}
$sthA->finish();
###########################################
@@ -838,7 +841,7 @@ if ($VDACaffected_rows > 0)
##### END - Max call stats
### Grab campaign values from the database
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field,use_other_campaign_dnc,cpd_unknown_action,routing_initiated_recordings,campaign_rec_exten,call_quota_lead_ranking,sip_event_logging,amd_type,agent_search_method,dial_method,stereo_recording,khomp_settings_container,stereo_recording_agent,stereo_rec_filename,stereo_parallel_recording,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field,use_other_campaign_dnc,cpd_unknown_action,routing_initiated_recordings,campaign_rec_exten,call_quota_lead_ranking,sip_event_logging,amd_type,agent_search_method,dial_method,stereo_recording,khomp_settings_container,stereo_recording_agent,stereo_rec_filename,stereo_parallel_recording,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,recording_dtmf_muting FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -894,6 +897,9 @@ if ($VDACaffected_rows > 0)
$parallel_rec_co_filename = $aryA[42];
$parallel_rec_cm_filename = $aryA[43];
$parallel_rec_fr_filename = $aryA[44];
$recording_dtmf_muting = $aryA[45];
if ( ($SSrecording_dtmf_detection < 1) || ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
if (length($closer_campaigns) > 2)
{
@@ -1200,7 +1206,7 @@ if ($VDACaffected_rows > 0)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
@@ -1236,7 +1242,9 @@ if ($VDACaffected_rows > 0)
$dbhP=$dbhA; $mysql_count='02214'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_SURVEY','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','VDAD','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_SURVEY','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','VDAD','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3210,7 +3218,7 @@ while ($drop_timer <= $DROP_TIME)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$retval = $AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
@@ -3248,7 +3256,9 @@ while ($drop_timer <= $DROP_TIME)
$dbhP=$dbhA; $mysql_count='02214'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3278,7 +3288,7 @@ while ($drop_timer <= $DROP_TIME)
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3318,7 +3328,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3343,11 +3353,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3373,7 +3385,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3398,11 +3410,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3428,7 +3442,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPFRR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPFRR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3453,11 +3467,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3469,7 +3485,7 @@ while ($drop_timer <= $DROP_TIME)
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3494,11 +3510,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$stereo_recording_agent','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$stereo_recording_agent','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3510,8 +3528,14 @@ while ($drop_timer <= $DROP_TIME)
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACRBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACRCO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACRCM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACR','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3539,11 +3563,13 @@ while ($drop_timer <= $DROP_TIME)
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3551,14 +3577,14 @@ while ($drop_timer <= $DROP_TIME)
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
@@ -3664,7 +3690,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsC = $dbhA->do($stmtC);
$dbhP=$dbhA; $mysql_count='02128'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_RIR','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_RIR','$VDADserver_ip','$now_date','$channelrec','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3696,7 +3724,7 @@ while ($drop_timer <= $DROP_TIME)
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3736,7 +3764,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3761,11 +3789,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3791,7 +3821,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3816,11 +3846,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3846,7 +3878,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3871,11 +3903,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3887,7 +3921,7 @@ while ($drop_timer <= $DROP_TIME)
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3912,7 +3946,7 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -3920,7 +3954,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3932,8 +3968,14 @@ while ($drop_timer <= $DROP_TIME)
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACIBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACICO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACICM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACI','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -3961,7 +4003,7 @@ while ($drop_timer <= $DROP_TIME)
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -3969,7 +4011,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED RIR $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -3977,14 +4021,14 @@ while ($drop_timer <= $DROP_TIME)
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
@@ -4606,7 +4650,7 @@ while ($drop_timer <= $DROP_TIME)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$retval = $AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
@@ -4644,7 +4688,9 @@ while ($drop_timer <= $DROP_TIME)
$dbhP=$dbhA; $mysql_count='02214'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4673,7 +4719,7 @@ while ($drop_timer <= $DROP_TIME)
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4713,7 +4759,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCOR','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4738,11 +4784,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4768,7 +4816,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCMR','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4793,11 +4841,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4823,7 +4873,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPRFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPRFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4848,11 +4898,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING REMOTE $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4864,7 +4916,7 @@ while ($drop_timer <= $DROP_TIME)
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACR','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4889,11 +4941,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4905,8 +4959,14 @@ while ($drop_timer <= $DROP_TIME)
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACRBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACRCO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACRCM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACR','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -4934,11 +4994,13 @@ while ($drop_timer <= $DROP_TIME)
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED REMOTE $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED REMOTE $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -4946,14 +5008,14 @@ while ($drop_timer <= $DROP_TIME)
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
@@ -5058,7 +5120,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsC = $dbhA->do($stmtC);
$dbhP=$dbhA; $mysql_count='02136'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','MONO_LEGACY_RIR','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_RIR','$VDADserver_ip','$now_date','$channelrec','$campaign_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5089,7 +5153,7 @@ while ($drop_timer <= $DROP_TIME)
$PATHmonitorT = $PATHmonitorP;
### insert record into recording_log_parallel table ###
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VDADserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$stmtA = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$VARserver_ip','','$now_date','0','PL$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid','START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5129,7 +5193,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_co_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCO','$now_date','$now_date_epoch','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5154,11 +5218,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_co_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5184,7 +5250,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_cm_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPCM','$now_date','$now_date_epoch','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5209,11 +5275,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_cm_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5239,7 +5307,7 @@ while ($drop_timer <= $DROP_TIME)
$temp_parallel_rec_fr_filename =~ s/\"|\'//gi;
}
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPFR','$now_date','$now_date_epoch','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5264,11 +5332,13 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL FULL-RECORDING $stereo_recording','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_fr_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5280,7 +5350,7 @@ while ($drop_timer <= $DROP_TIME)
{
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','SPACI','$now_date','$now_date_epoch','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5305,7 +5375,7 @@ while ($drop_timer <= $DROP_TIME)
}
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,parallel_recording_id,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADcampaign STEREO_PARALLEL AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','$parallel_recording_id','PARALLEL START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -5313,7 +5383,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$temp_parallel_rec_ag_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5325,8 +5397,14 @@ while ($drop_timer <= $DROP_TIME)
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$rl_exten='SACIBC';
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{$rl_exten='SACICO';}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{$rl_exten='SACICM';}
# insert a record into the recording_log table
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VDADserver_ip','SACI','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$VARserver_ip','$rl_exten','$now_date','$now_date_epoch','$stereo_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -5354,7 +5432,7 @@ while ($drop_timer <= $DROP_TIME)
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)");
### insert record into recording_log_stereo table ###
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VDADserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$VARserver_ip','$now_date','0','$stereo_rec_filename','$CIDlead_id','$VDADcampaign STEREO AGENT-CONTROLLED RIR $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $uniqueid|user: $VDADuser|channel: $channel|','STEREO START');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
@@ -5362,7 +5440,9 @@ while ($drop_timer <= $DROP_TIME)
$affected_rowsB = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED RIR','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED RIR $rl_exten','$VARserver_ip','$now_date','$channel','$stereo_rec_filename','$CIDlead_id','$VDADuser','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
@@ -5370,14 +5450,14 @@ while ($drop_timer <= $DROP_TIME)
if ($stereo_recording =~ /CUSTOMER_ONLY/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($stereo_recording =~ /CUSTOMER_MUTE/i)
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VARserver_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
+47 -3
View File
@@ -25,6 +25,7 @@
# 240420-2241 - Added ConfBridge code
# 240415-1702 - Fix for ConfBridge code
# 250924-2157 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0902 - If recording_dtmf_muting enabled, force use of MixMonitor for recording
#
$script = 'agi-VDAD_RINGALL.agi';
@@ -42,6 +43,7 @@ $now_date = "$year-$mon-$mday $hour:$min:$sec";
$now_num = "$year$mon$mday$hour$min$sec";
$CIDdate = "$mon$mday$hour$min$sec";
$S='*';
$recording_dtmf_muting=0;
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
@@ -92,6 +94,21 @@ $AGI = new Asterisk::AGI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
#############################################
##### Gather system_settings #####
$stmtA = "SELECT recording_dtmf_muting,recording_dtmf_detection FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$SSrecording_dtmf_muting = $aryA[0];
$SSrecording_dtmf_detection = $aryA[1];
}
$sthA->finish();
###########################################
### Grab Server values from the database
$stmtA = "SELECT agi_output,ext_context,asterisk_version,conf_engine FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -308,7 +325,7 @@ if ($NAGcount > 0)
### get the recording settings for the campaign that this remote agent is logged into
if (length($VLAcampaign_id) > 0)
{
$stmtA = "SELECT campaign_recording,campaign_rec_filename FROM vicidial_campaigns where campaign_id='$VLAcampaign_id';";
$stmtA = "SELECT campaign_recording,campaign_rec_filename,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$VLAcampaign_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$VCRcount=$sthA->rows;
@@ -317,6 +334,9 @@ if ($NAGcount > 0)
@aryA = $sthA->fetchrow_array;
$campaign_recording = $aryA[0];
$campaign_rec_filename = $aryA[1];
$recording_dtmf_muting = $aryA[2];
if ( ($SSrecording_dtmf_detection < 1) || ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
$sthA->finish();
}
@@ -388,7 +408,7 @@ if ($NAGcount > 0)
}
else
{
if ($ast_ver_str{major} > 20)
if ( ($ast_ver_str{major} > 20) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$AGI->exec("MixMonitor",",r($PATHmonitor/MIX/$campaign_rec_filename-in.wav)t($PATHmonitor/MIX/$campaign_rec_filename-out.wav)");
@@ -402,7 +422,31 @@ if ($NAGcount > 0)
### insert record into recording_log table ###
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,length_in_sec,filename,lead_id,user,location,vicidial_id) values('$channel','$VARserver_ip','$VAC_phone_number','$now_date','$now_date_epoch','0','$campaign_rec_filename','$VAC_lead_id','$dial_user','$campaign_rec_filename','$uniqueid');";
$RLRAaffected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($SSrecording_dtmf_muting > 1)
{
$recording_dtmf_muting = $SSrecording_dtmf_muting;
}
}
### insert record into recording_live table ###
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_REMOTE','$VARserver_ip','$now_date','$channel','$campaign_rec_filename','$VAC_lead_id','$dial_user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$RLRAaffected_rows|$rLIVEaffected_rows|$recording_id|$campaign_rec_filename|$stmtA|"; &agi_output;}
}
}
else
+50
View File
@@ -74,6 +74,7 @@
# 240916-2159 - Added --extended-log-only
# 240924-2041 - Added --vicidial-log-only
# 250914-1537 - Added archiving of recording_log_stereo and recording_log_parallel tables
# 251011-2048 - Added archiving of recording_live_log table
#
$CALC_TEST=0;
@@ -4136,6 +4137,55 @@ if (!$T)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
##### recording_live_log
$stmtA = "SELECT count(*) from recording_live_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_live_log_count = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) from recording_live_log_archive;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_live_log_archive_count = $aryA[0];
}
$sthA->finish();
if (!$Q) {print "\nProcessing recording_live_log table... ($recording_live_log_count|$recording_live_log_archive_count)\n";}
$stmtA = "INSERT IGNORE INTO recording_live_log_archive SELECT * from recording_live_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
if (!$Q) {print "$sthArows rows inserted into recording_live_log_archive table \n";}
$rv = $sthA->err();
if (!$rv)
{
$stmtA = "DELETE FROM recording_live_log WHERE start_time < '$RECdel_time';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
if (!$Q) {print "$sthArows rows deleted from recording_live_log table \n";}
$stmtA = "optimize table recording_live_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$stmtA = "optimize table recording_live_log_archive;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
}
File diff suppressed because it is too large Load Diff
+70 -8
View File
@@ -175,9 +175,11 @@
# 250103-0932 - Added ConfBridge code and enhanced_agent_monitoring system setting code
# 250914-1601 - Added pruning of recording_live table entries over 7 days old, deletion of parallel recording source files 3+ days
# 250924-2212 - Added code for deprecation of "Monitor" application after Asterisk 20
# 251006-0832 - Added truncating of vicidial_dtmf_log older than 24 hours & If recording_dtmf_muting enabled, force use of MixMonitor for recording
# 251011-1000 - Added archiving of recording_dtmf_muting_log, disabled purging of recording_live_log after 7 days
#
$build = '250924-2212';
$build = '251011-1000';
$DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -500,7 +502,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
##### Get the settings from system_settings #####
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id,hopper_hold_inserts,stereo_recording,stereo_parallel_recording FROM system_settings;";
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename,allow_chats,enable_auto_reports,enable_drop_lists,expired_lists_inactive,sip_event_logging,call_quota_lead_ranking,inbound_answer_config,log_latency_gaps,demographic_quotas,weekday_resets,highest_lead_id,hopper_hold_inserts,stereo_recording,stereo_parallel_recording,recording_dtmf_muting FROM system_settings;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -534,6 +536,7 @@ if ($sthArows > 0)
$SShopper_hold_inserts = $aryA[23];
$SSstereo_recording = $aryA[24];
$SSstereo_parallel_recording = $aryA[25];
$SSrecording_dtmf_muting = $aryA[26];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
@@ -2313,6 +2316,24 @@ if ($timeclock_end_of_day_NOW > 0)
$sthA->finish();
##### END vicidial_two_factor_auth end of day process removing records older than 7 days #####
##### BEGIN vicidial_dtmf_log end of day process removing records older than 24 hours #####
$stmtA = "DELETE from vicidial_dtmf_log where vicidial_dtmf_log < \"$RMSQLdate\";";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA);
if($DB){print STDERR "\n|$affected_rows vicidial_dtmf_log records older than 1 day purged|\n";}
if ($teodDB) {$event_string = "vicidial_dtmf_log records older than 1 day purged: |$stmtA|$affected_rows|"; &teod_logger;}
$stmtA = "optimize table vicidial_dtmf_log;";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
##### END vicidial_dtmf_log end of day process removing records older than 7 days #####
##### BEGIN vicidial_lead_messages end of day process removing records older than 1 day #####
$stmtA = "DELETE FROM vicidial_lead_messages WHERE call_date < \"$RMSQLdate\";";
@@ -2345,18 +2366,59 @@ if ($timeclock_end_of_day_NOW > 0)
##### BEGIN recording_live_log end of day process removing records older than 7 days #####
$stmtA = "DELETE FROM recording_live_log WHERE start_time < \"$SDSQLdate\";";
# $stmtA = "DELETE FROM recording_live_log WHERE start_time < \"$SDSQLdate\";";
# $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
# $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
# $sthArows = $sthA->rows;
# $event_string = "$sthArows rows deleted from recording_live_log table";
# if (!$Q) {print "$event_string \n";}
# if ($teodDB) {&teod_logger;}
# $stmtA = "optimize table recording_live_log;";
# $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
# $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
##### END recording_live_log end of day process removing records older than 7 days #####
# archive recording_dtmf_muting_log table every night
if (!$Q) {print "\nProcessing recording_dtmf_muting_log table...\n";}
$stmtA = "INSERT IGNORE INTO recording_dtmf_muting_log_archive SELECT * from recording_dtmf_muting_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
$event_string = "$sthArows rows deleted from recording_live_log table";
$event_string = "$sthArows rows inserted into recording_dtmf_muting_log_archive table";
if (!$Q) {print "$event_string \n";}
if ($teodDB) {&teod_logger;}
$stmtA = "optimize table recording_live_log;";
$rv = $sthA->err();
if (!$rv)
{
$stmtA = "DELETE FROM recording_dtmf_muting_log WHERE dtmf_muting_end_time < \"$now_date\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
$event_string = "$sthArows rows deleted from in recording_dtmf_muting_log table";
if (!$Q) {print "$event_string \n";}
if ($teodDB) {&teod_logger;}
$stmtA = "optimize table recording_dtmf_muting_log;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
# delete recording_dtmf_muting_log_archive records older than 7 days old
$stmtA = "DELETE FROM recording_dtmf_muting_log_archive WHERE dtmf_muting_end_time < \"$SDSQLdate\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
##### END recording_live_log end of day process removing records older than 7 days #####
$sthArows = $sthA->rows;
$event_string = "$sthArows old rows deleted from in recording_dtmf_muting_log_archive table ($SDSQLdate)";
if (!$Q) {print "$event_string \n";}
if ($teodDB) {&teod_logger;}
$stmtA = "optimize table recording_dtmf_muting_log_archive;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
##### START latency log summary log inserts
@@ -3404,7 +3466,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
{$Vext .= "exten => 8309,2,Monitor(wav,\${CALLERIDNAME})\n";}
else
{
if ($asterisk_version =~ /^2[1-9]|^3\d|^4\d/)
if ( ($asterisk_version =~ /^2[1-9]|^3\d|^4\d/) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$Vext .= "exten => 8309,2,MixMonitor(,r($PATHmonitor/\${CALLERID(name)}-in.wav)t($PATHmonitor/\${CALLERID(name)}-out.wav))\n";
@@ -3422,7 +3484,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
{$Vext .= "exten => 8310,2,Monitor(gsm,\${CALLERIDNAME})\n";}
else
{
if ($asterisk_version =~ /^2[1-9]|^3\d|^4\d/)
if ( ($asterisk_version =~ /^2[1-9]|^3\d|^4\d/) || ($SSrecording_dtmf_muting > 0) )
{
# Deprecation of "Monitor" application after Asterisk 20
$Vext .= "exten => 8309,2,MixMonitor(,r($PATHmonitor/\${CALLERID(name)}-in.wav)t($PATHmonitor/\${CALLERID(name)}-out.wav))\n";
+6 -1
View File
@@ -24,7 +24,7 @@
# This program assumes that recordings are saved by Asterisk as .wav
# should be easy to change this code if you use .gsm instead
#
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# 80302-1958 - First Build
@@ -34,6 +34,7 @@
# 160501-1001 - Added --SPHINX options to check for SPHINX audio files
# 160523-0650 - Added --HTTPS option to use https instead of http in local location
# 231019-2203 - Changed sleep time between directory scans from 5 to 15 seconds
# 251006-1852 - Added update of recording_live table record
#
$MIX=0;
@@ -294,6 +295,10 @@ foreach(@FILES)
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
$stmtA = "UPDATE recording_live set end_time=NOW(),recording_status='FINISHED FILE-MERGE' where recording_id='$recording_id' and recording_status='STARTED';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
if (!$T)
{
`mv -f "$dir1/$INfile" "$dir2/ORIG/$INfile"`;
+32 -18
View File
@@ -37,6 +37,7 @@
# 240219-0811 - Added optimizing of server_live_... tables
# 240709-1300 - Added Validate XFER vicidial_auto_calls: "--check-xfers" flag
# 250914-1537 - Added archiving of recording_live table
# 251003-0837 - Added --preserve-dtmf flag (DTMF logs would then be kept for 1-2 days)
#
$session_flush=0;
@@ -44,6 +45,7 @@ $SSsip_event_logging=0;
$reset_stuck_leads=0;
$stuck_lists='';
$stuck_listsSQL='';
$preserve_dtmf=0;
$check_xfers=0;
$vicidial_recording_limit=60;
@@ -68,6 +70,7 @@ if (length($ARGV[0])>1)
print " [--session-flush] = flush the vicidial_sessions_recent table\n";
print " [--reset-stuck-leads] = reset status of ERI/INCALL leads to NEW if previewed but not called\n";
print " [--stuck-lists=X] = restrict stuck leads check to these lists: X-Y-Z multiple lists separated by a single dash\n";
print " [--preserve-dtmf] = do not purge dtmf log\n";
print " [--check-xfers] = validates that XFER status vicidial_auto_calls records are live, if not, they are deleted\n";
print "\n";
@@ -106,6 +109,12 @@ if (length($ARGV[0])>1)
if ($Q < 1)
{print "\n----- RESET STUCK LEADS ----- $reset_stuck_leads \n\n";}
}
if ($args =~ /--preserve-dtmf/i)
{
$preserve_dtmf=1;
if ($Q < 1)
{print "\n----- PRESERVE DTMF LOGS ----- $preserve_dtmf \n\n";}
}
if ($args =~ /--check-xfers/i)
{
$check_xfers=1;
@@ -344,10 +353,13 @@ if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - vicidial_manager flush: $affected_rows rows\n";}
$stmtA = "DELETE from vicidial_dtmf_log where dtmf_time < '$flush_time';";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - vicidial_dtmf_log flush: $affected_rows rows\n";}
if ($preserve_dtmf < 1)
{
$stmtA = "DELETE from vicidial_dtmf_log where dtmf_time < '$flush_time';";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - vicidial_dtmf_log flush: $affected_rows rows\n";}
}
$stmtA = "DELETE from routing_initiated_recordings where launch_time < '$flush_time';";
if($DB){print STDERR "\n|$stmtA|\n";}
@@ -392,19 +404,21 @@ if (!$T)
if (!$Q) {print " - OPTIMIZE vicidial_manager \n";}
$stmtA = "OPTIMIZE table vicidial_dtmf_log;";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
if (!$Q) {print " - OPTIMIZE vicidial_dtmf_log \n";}
if ($preserve_dtmf < 1)
{
$stmtA = "OPTIMIZE table vicidial_dtmf_log;";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
if (!$Q) {print " - OPTIMIZE vicidial_dtmf_log \n";}
}
$stmtA = "OPTIMIZE table routing_initiated_recordings;";
if($DB){print STDERR "\n|$stmtA|\n";}
@@ -1099,7 +1113,7 @@ if ($rl_count > 0)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
if (!$Q) {print "$sthArows rows delete from recording_live_log table: |$OR_recording_id[$orc]|$OR_user[$orc]|$OR_lead_id[$orc]|\n";}
if (!$Q) {print "$sthArows rows delete from recording_live table: |$OR_recording_id[$orc]|$OR_user[$orc]|$OR_lead_id[$orc]|\n";}
}
$orc++;
}
+122 -1
View File
@@ -17,7 +17,7 @@
# the ADMIN_keepalive_ALL.pl script, which makes sure it is always running in a
# screen, provided that the astguiclient.conf keepalive setting "2" is set.
#
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 170915-2106 - Initial version based off the orginal AST_manager_listen.pl script
@@ -25,6 +25,8 @@
# 170930-0923 - Commented out handle_sip_event and handle_cpd_event functions, not needed anymore, to be deleted later
# 190121-1505 - Added RA_USER_PHONE On-Hook CID to solve last RINGAGENT issues
# 210407-2009 - Added Event handlers for new manager events
# 251007-2110 - Added code for recording_dtmf_detection and recording_dtmf_muting
#
# constants
$DB=0; # Debug flag, set to 0 for no debug messages, lots of output
@@ -162,6 +164,20 @@ if ($sthArows > 0)
}
$sthA->finish();
### Grab System Settings values from the database
$stmtA = "SELECT recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$SSrecording_dtmf_detection = $aryA[0];
$SSrecording_dtmf_muting = $aryA[1];
}
$sthA->finish();
if (!$telnet_port) {$telnet_port = '5038';}
$event_string='LOGGED INTO MYSQL SERVER ON 1 CONNECTION|';
@@ -866,6 +882,111 @@ sub handle_dtmf_begin_event
$dtmf_string = "$HRnow_date|$s_hires|$usec|$event_hash{'Channel'}|$event_hash{'Uniqueid'}|$event_hash{'Digit'}|$event_hash{'Direction'}|Begin|$event_hash{'CallerIDName'}";
&dtmf_logger;
$temp_server_ip = $event_hash{'ServerIP'};
$temp_channel = $event_hash{'Channel'};
##### BEGIN - if recording_dtmf_detection is enabled, check for recordings on this channel #####
if ( ($SSrecording_dtmf_detection > 0) && ( ($temp_channel !~ /Local\/5\d\d\d\d\d\d\d@default/i) || ( ($temp_channel =~ /Local\/5\d\d\d\d\d\d\d@default/i) && ($temp_channel =~ /;1$/) ) ) )
{
$channelSQL = "channel='$temp_channel'";
if (($temp_channel =~ /Local\/5\d\d\d\d\d\d\d@default/i))
{
$temp_rec_channel = $temp_channel;
$temp_rec_channel =~ s/-.*//gi;
$channelSQL = "channel='$temp_rec_channel'";
}
$rec_live_match=0;
$stmtA = "SELECT count(*) FROM recording_live where $channelSQL and server_ip='$temp_server_ip' and recording_status='STARTED';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsREC=$sthA->rows;
if ($sthArowsREC > 0)
{
@aryA = $sthA->fetchrow_array;
$rec_live_match = $aryA[0];
}
$sthA->finish();
if($DBX){print STDERR "$sthArowsREC|$rec_live_match|$stmtA|\n";}
if ($rec_live_match > 0)
{
$temp_recording_id = '';
$rec_channel = '';
$dtmf_detected = 0;
$dtmf_muting = 0;
$dtmf_muting_seconds = 0;
$mute_state = '';
$recording_type = '';
$recording_filename = '';
$rec_lead_id = 0;
$NEXTdtmf_muting = 0;
$stmtA = "SELECT recording_id,channel,dtmf_detected,dtmf_muting,dtmf_muting_seconds,mute_state,recording_type,filename,lead_id FROM recording_live where $channelSQL and server_ip='$temp_server_ip' and recording_status='STARTED' order by recording_id limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsRECdetail=$sthA->rows;
if ($sthArowsRECdetail > 0)
{
@aryA = $sthA->fetchrow_array;
$temp_recording_id = $aryA[0];
$rec_channel = $aryA[1];
$dtmf_detected = $aryA[2];
$dtmf_muting = $aryA[3];
$dtmf_muting_seconds = $aryA[4];
$mute_state = $aryA[5];
$recording_type = $aryA[6];
$recording_filename = $aryA[7];
$rec_lead_id = $aryA[8];
$NEXTdtmf_muting = ($dtmf_muting + 1);
}
$sthA->finish();
if ( ($SSrecording_dtmf_muting > 0) && ($dtmf_muting_seconds > 0) && ($sthArowsRECdetail > 0) )
{
$mute_stateSQL='';
if ($mute_state < 1)
{$mute_stateSQL="mute_state='1', dtmf_muting='$NEXTdtmf_muting',";}
# update recording_live record, trigger dtmf muting and increment dtmf_detected counter
$stmtA = "UPDATE recording_live SET $mute_stateSQL dtmf_detected='$NEXTdtmf_muting' where recording_id='$temp_recording_id';";
my $affected_rows = $dbhA->do($stmtA);
if($DBX){print STDERR "$affected_rows|$stmtA|\n";}
# if dtmf muting is triggered, then send the command to mute the channel and update the recording_live record
if (length($mute_stateSQL) > 10)
{
$mute_direction = 'both';
if ( ($recording_type eq 'MONO_LEGACY') || ($recording_type eq 'MONO_LEGACY_RIR') )
{$mute_direction = 'both';}
if ( ($recording_type !~ /PARALLEL/) && ($recording_type =~ /CUSTOMER_ONLY|SACCO|SACICO|SACRCO/) )
{$mute_direction = 'read';}
if ( ($recording_type !~ /PARALLEL/) && ($recording_type =~ /CUSTOMER_MUTE|SACCM|SACICM|SACRCM/) )
{$mute_direction = 'write';}
$vmgr_callerid = substr($recording_filename, -15) . 'DTMFM';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$temp_server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $temp_channel','Direction: $mute_direction','State: 1','','','','','','');";
my $affected_rowsVM = $dbhA->do($stmtE);
if($DBX){print STDERR "$affected_rowsVM|$stmtE|\n";}
$stmtC = "UPDATE recording_live SET mute_state='2', dtmf_muting_end_time=NOW() + INTERVAL $dtmf_muting_seconds SECOND where recording_id='$temp_recording_id';";
my $affected_rowsRL = $dbhA->do($stmtC);
if($DBX){print STDERR "$affected_rowsRL|$stmtC|\n";}
$stmtB="INSERT INTO recording_dtmf_muting_log SET recording_id='$temp_recording_id',recording_type='$recording_type',server_ip='$temp_server_ip',channel='$rec_channel',channel_to_mute='$temp_channel',filename='$recording_filename',lead_id='$rec_lead_id',campaign_id='',trigger_dtmf='$event_hash{'Digit'}',dtmf_muting='$NEXTdtmf_muting',dtmf_muting_start_time=NOW(),dtmf_muting_end_time=NOW() + INTERVAL $dtmf_muting_seconds SECOND,dtmf_muting_seconds='$dtmf_muting_seconds',mute_state='2';";
my $affected_rowsML = $dbhA->do($stmtB);
if($DBX){print STDERR "$affected_rowsML|$stmtB|\n";}
}
}
else
{
if ($sthArowsRECdetail > 0)
{
# update recording_live record, increment dtmf_detected counter
$stmtA = "UPDATE recording_live SET dtmf_detected='$NEXTdtmf_muting' where recording_id='$temp_recording_id';";
my $affected_rows = $dbhA->do($stmtA);
if($DBX){print STDERR "$affected_rows|$stmtA|\n";}
}
}
}
}
##### END - if recording_dtmf_detection is enabled, check for recordings on this channel #####
return 1;
}
else
+124 -2
View File
@@ -5,7 +5,7 @@
# This script uses the Asterisk Manager interface to update the live_channels
# tables and verify the parked_channels table in the asterisk MySQL database
#
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 170915-2110 - Initial version for Asterisk 13, based upon AST_update.pl
@@ -19,6 +19,7 @@
# 210315-1045 - Populate the CIDname in live_sip_channels/live_channels tables, Issue #1255
# 210827-0930 - Added PJSIP compatibility
# 220310-1136 - Fix for issue dealing with bad carrier 'P-Asserted-Identity' input
# 251008-2114 - Added code for recording_dtmf_detection and recording_dtmf_muting
#
# constants
@@ -38,6 +39,9 @@ $server_stats_update_interval = 30;
# how often performance logging is triggered
$performance_logging_interval = 5;
# dtmf-check last second
$dtmf_check_last_time = 999999;
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
@@ -192,6 +196,19 @@ if ($sthArows > 0)
if (!$telnet_port) {$telnet_port = '5038';}
### Grab System Settings values from the database
$stmtA = "SELECT recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$SSrecording_dtmf_detection = $aryA[0];
$SSrecording_dtmf_muting = $aryA[1];
}
$sthA->finish();
##### Check for a server_updater record, and if not present, insert one
$SUrec=0;
@@ -642,7 +659,6 @@ else
}
else
{
# Process the channel list
$counts = process_channels($dbhA,$chan_array_ref,$phones_ref,$db_trunks_ref,$db_clients_ref,$server_ip,$old_counts);
@@ -663,6 +679,18 @@ else
$last_perf_log = time();
}
# check for if dtmf-muted recordings to stop, if recording_dtmf_detection and recording_dtmf_muting are active
if ( ($SSrecording_dtmf_detection > 0) && ($SSrecording_dtmf_muting > 0) )
{
if ($dtmf_check_last_time != $current_time_sec)
{
# dtmf muting stop check hasn't run this second, so check for them
&dtmf_muting_stop_check;
$dtmf_check_last_time = $current_time_sec;
}
}
# figure out how long that loop took.
# get the current time
( $now_sec, $now_micro_sec ) = gettimeofday();
@@ -1462,8 +1490,102 @@ sub get_time_now #get the current date and time and epoch for logging call lengt
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$action_log_date = "$year-$mon-$mday";
$current_time_sec = "$hour$min$sec";
$current_time_sec = ($current_time_sec + 0);
}
sub dtmf_muting_stop_check
{
$mute_to_stop_count=0;
### Get count of dtmf muted recordings that should be un-muted
$stmtA = "SELECT count(*) FROM recording_live WHERE mute_state='2' and dtmf_muting_end_time <= '$now_date' and recording_status='STARTED' and server_ip='$server_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$mute_to_stop_count = $aryA[0];
}
$sthA->finish();
if ($DB) {print "DEBUG: DTMF Mute Stop Check: $mute_to_stop_count |$sthArows|$stmtA|\n";}
if ($mute_to_stop_count > 0)
{
# gather details on all recordings that need to be un-muted
$stmtA = "SELECT recording_id,channel,dtmf_detected,dtmf_muting,dtmf_muting_seconds,mute_state,recording_type,filename,lead_id FROM recording_live where mute_state='2' and dtmf_muting_end_time <= '$now_date' and dtmf_muting_end_time != '2020-12-31 23:59:59' and recording_status='STARTED' and server_ip='$server_ip' order by recording_id limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsRECdetail=$sthA->rows;
$rl_ct=0;
while ($sthArowsRECdetail > $rl_ct)
{
@aryA = $sthA->fetchrow_array;
$temp_recording_id[$rl_ct] = $aryA[0];
$rec_channel[$rl_ct] = $aryA[1];
$dtmf_detected[$rl_ct] = $aryA[2];
$dtmf_muting[$rl_ct] = $aryA[3];
$dtmf_muting_seconds[$rl_ct] = $aryA[4];
$mute_state[$rl_ct] = $aryA[5];
$recording_type[$rl_ct] = $aryA[6];
$recording_filename[$rl_ct] = $aryA[7];
$rec_lead_id[$rl_ct] = $aryA[8];
$rl_ct++;
}
$sthA->finish();
# go through each recording and un-mute the recording
$rl_ct=0;
while ($sthArowsRECdetail > $rl_ct)
{
# update recording_live record, trigger dtmf muting and increment dtmf_detected counter
$stmtA = "UPDATE recording_live SET mute_state='3' where recording_id='$temp_recording_id[$rl_ct]';";
my $affected_rows = $dbhA->do($stmtA);
if($DBX){print STDERR "$affected_rows|$stmtA|\n";}
$channel_to_mute = $rec_channel[$rl_ct];
$dtmf_mute_id=0;
### Get channel name of channel that should be un-muted
$stmtA = "SELECT channel_to_mute,dtmf_mute_id FROM recording_dtmf_muting_log WHERE recording_id='$temp_recording_id[$rl_ct]' and mute_state='2' order by dtmf_mute_id desc limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$channel_to_mute = $aryA[0];
$dtmf_mute_id = $aryA[1];
}
$sthA->finish();
$mute_direction = 'both';
if ( ($recording_type[$rl_ct] eq 'MONO_LEGACY') || ($recording_type[$rl_ct] eq 'MONO_LEGACY_RIR') )
{$mute_direction = 'both';}
if ( ($recording_type[$rl_ct] !~ /PARALLEL/) && ($recording_type[$rl_ct] =~ /CUSTOMER_ONLY|SACCO|SACICO|SACRCO/) )
{$mute_direction = 'read';}
if ( ($recording_type[$rl_ct] !~ /PARALLEL/) && ($recording_type[$rl_ct] =~ /CUSTOMER_MUTE|SACCM|SACICM|SACRCM/) )
{$mute_direction = 'write';}
$vmgr_callerid = substr($recording_filename[$rl_ct], -15) . 'DTMFU';
$stmtE="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel_to_mute','Direction: $mute_direction','State: 0','','','','','','');";
my $affected_rowsVM = $dbhA->do($stmtE);
if($DBX){print STDERR "$affected_rowsVM|$stmtE|\n";}
$stmtC = "UPDATE recording_live SET mute_state='0', dtmf_muting_end_time='$now_date' where recording_id='$temp_recording_id[$rl_ct]';";
my $affected_rowsRL = $dbhA->do($stmtC);
if($DBX){print STDERR "$affected_rowsRL|$stmtC|\n";}
$stmtB = "UPDATE recording_dtmf_muting_log SET mute_state='4',dtmf_muting_end_time='$now_date' WHERE dtmf_mute_id='$dtmf_mute_id';";
my $affected_rowsML = $dbhA->do($stmtB);
if($DBX){print STDERR "$affected_rowsML|$stmtB|\n";}
if ($DB) {print "DEBUG: DTMF Mute Stopped: $temp_recording_id[$rl_ct] $rl_ct\n";}
$rl_ct++;
}
}
}
# try to load a module
sub try_load
+46 -15
View File
@@ -1,7 +1,7 @@
VICIDIAL STEREO CALL RECORDINGS Started: 2025-06-18 Updated: 2025-10-01
VICIDIAL STEREO CALL RECORDINGS Started: 2025-06-18 Updated: 2025-10-20
TO USE THESE FEATURES, YOU WILL NEED TO HAVE ALL SERVERS IN YOUR CLUSTER USING SVN/TRUNK REVISION 3947(2025-10-01) CODE OR HIGHER!!!
TO USE THESE FEATURES, YOU WILL NEED TO HAVE ALL SERVERS IN YOUR CLUSTER USING SVN/TRUNK REVISION 3949(2025-10-20) CODE OR HIGHER!!!
This project was designed to allow for additional stereo recording of phone calls at the agent and server levels directly on VICIdial Asterisk servers, with the customer always on one channel(the Right channel) and the agent and all other parties on the other channel(the Left channel). If you are looking for the VICI Gateway Recording Server documentation, please see the GATEWAY_RECORDING_SERVER.txt document.
@@ -21,10 +21,9 @@ This project has been broken down into 4 phases of development, since it is so l
***COMPLETE***
4) Live recording muting based on DTMF receipt and un-muting after x seconds of being muted(campaign setting), for both new customer-channel-stereo and legacy-mono agent session recordings.
***STILL-IN-DEVELOPMENT***
***COMPLETE AS OF SVN/TRUNK REVISION 3949(2025-10-20)***
While the above development phases will be worked-on in the order they are above, there are portions of the later phases that will be implemented as early as the first phase due to shared processes needed for the later phases.
-------------------------------------------------------------------------------------------------
@@ -43,8 +42,13 @@ For In-groups, the "Stereo Recording" options do NOT default to inherit settings
For all of Stereo Recording, the agent-controlled Mute Recordings feature will not be available. This is because of all of the complexity already included in the Customer-Only, Customer-Muted and Recording DTMF Muting features that are to be built into Stereo Recording. Also, in the existing default mono call recording, if the Recording DTMF Muting feature is enabled, then the agent-controlled Mute Recordings feature will not be available.
For Recording DTMF Muting (STILL BEING DEVELOPED), this is NOT designed to mute 100% of the DTMF audio in a recording, it is meant to trigger a fixed time period of muting of the channel sending the DTMF audio AFTER a DTMF digit is detected. As a note, on many VICIdial systems, audible DTMF is already muted and converted into out-of-band DTMF signalling in many channel types by default, so this feature may not be necessary for all organizations. This setting is a number of seconds to mute the channel, with '0' being disabled. the default is '0'.
For Recording DTMF Muting, this is NOT designed to mute 100% of the DTMF audio in a recording, it is meant to trigger a fixed time period of muting of the call recording AFTER a DTMF digit is detected. If Recording DTMF Muting is active for a campaign/in-group, it will affect both Mono Legacy and Stereo call recordings for those calls. As a note, on many VICIdial systems, audible DTMF is already muted and converted into out-of-band DTMF signalling in many channel types by default, so this feature may not be necessary for all organizations. This setting is a number of seconds to mute the channel, with '0' being disabled. the default is '0'. To use this feature, you will need to enable both "Allow Recording DTMF Detection" and "Allow Recording DTMF Muting" in System Settings.
IMPORTANT NOTE FOR RECORDING DTMF MUTING: Once enabled in the system settings, make sure you set the "Reload Dialplan On Servers" system settingss option to '1' and submit. This will make sure all of the call recording functions in the dialplan are using MixMonitor, which is what is required for Recording DTMF Muting to work properly.
Also for Recording DTMF Muting, just like with Stereo Call Recording, each campaign and in-group that you want to have Recording DTMF Muting active for will need to have it enabled, there is no inheritance of that setting from campaign to in-groups. However, if you want to enable Recording DTMF Muting for all call recordings on a system with the same number of muting seconds on all calls, you can use the System Setting "Allow Recording DTMF Muting" setting set to a number 2 or greater to do this.
When there is more than one recording on the same channel, Recording DTMF Muting logging will only log for one of the recordings on that channel, even though the muting will affect all recordings on that channel.
@@ -171,6 +175,11 @@ List of recording_log.extension values with recording_log_stereo.recording_type
MONO_LEGACY_RIR
MONO_LEGACY_REMOTE
MONO_LEGACY_SURVEY
MONO_LEGACY_NVA
MONO_LEGACY_DID
MONO_LEGACY_AMD
MONO_LEGACY_VERIF
MONO_LEGACY_3WAY
STEREO_AGENT
STEREO_DID
SPACBC STEREO_PARALLEL AGENT-CONTROLLED BOTH_CHANNELS
@@ -183,18 +192,21 @@ SPCO STEREO_PARALLEL CUSTOMER-ONLY
SPCM STEREO_PARALLEL CUSTOMER-MUTED
SPFR STEREO_PARALLEL FULL-RECORDING
SPACI STEREO_PARALLEL AGENT-CONTROLLED RIR
SACI STEREO AGENT-CONTROLLED RIR
SACIBC STEREO AGENT-CONTROLLED RIR BOTH_CHANNELS
SACICO STEREO AGENT-CONTROLLED RIR CUSTOMER_ONLY
SACICM STEREO AGENT-CONTROLLED RIR CUSTOMER_MUTE
SPCOR STEREO_PARALLEL CUSTOMER-ONLY REMOTE
SPCMR STEREO_PARALLEL CUSTOMER-MUTED REMOTE
SPFRR STEREO_PARALLEL FULL-RECORDING REMOTE
SPACR STEREO_PARALLEL AGENT-CONTROLLED REMOTE
SACR STEREO AGENT-CONTROLLED REMOTE
SACRBC STEREO AGENT-CONTROLLED REMOTE BOTH_CHANNELS
SACRCO STEREO AGENT-CONTROLLED REMOTE CUSTOMER_ONLY
SACRCM STEREO AGENT-CONTROLLED REMOTE CUSTOMER_MUTE
-------------------------------------------------------------------------------------------------
List of scripts modified/created for these new Stereo Call Recording features:
List of scripts modified/created for these new Stereo Call Recording and Recording DTMF Muting features:
- agc/vicidial.php
- agc/vdc_db_query.php
- agc/manager_send.php
@@ -204,12 +216,21 @@ List of scripts modified/created for these new Stereo Call Recording features:
- install.pl
- AST_CRON_audio_1_move_VDonly.pl
- AST_CRON_audio_1_stereo.pl
- AST_CRON_audio_1_move_mix.pl
- AST_CRON_audio_2_compress.pl
- AST_flush_DBqueue.pl
- ADMIN_keepalive_ALL.pl
- ADMIN_archive_log_tables.pl
- AST_update_AMI2.pl
- AST_manager_listen_AMI2.pl
- agi-VDAD_ALL_inbound.agi
- agi-VDAD_ALL_outbound.agi
- VD_amd.agi
- agi-VDAD_RINGALL.agi
- agi-NVA_recording.agi
- agi-IVR_recording_verification.agi
- agi-DID_route.agi
@@ -346,23 +367,33 @@ index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_dtmf_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
CREATE TABLE recording_log_parallel_archive LIKE recording_log_parallel;
CREATE TABLE recording_log_stereo_archive LIKE recording_log_stereo;
CREATE TABLE recording_dtmf_muting_log (
dtmf_mute_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
recording_id INT(10) UNSIGNED NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
channel VARCHAR(255),
channel_to_mute VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
dtmf_muting TINYINT(3) UNSIGNED default '0',
campaign_id VARCHAR(20) default '',
trigger_dtmf VARCHAR(100) default '',
dtmf_muting SMALLINT(3) UNSIGNED default '0',
dtmf_muting_start_time DATETIME,
dtmf_muting_end_time DATETIME,
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
mute_state TINYINT(3) UNSIGNED default '0',
index(filename),
index(lead_id),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_log_parallel_archive LIKE recording_log_parallel;
CREATE TABLE recording_log_stereo_archive LIKE recording_log_stereo;
CREATE TABLE recording_dtmf_muting_log_archive LIKE recording_dtmf_muting_log;
ALTER TABLE recording_dtmf_muting_log_archive MODIFY dtmf_mute_id INT(10) UNSIGNED NOT NULL;
CREATE UNIQUE INDEX rdml_key on recording_dtmf_muting_log_archive(dtmf_mute_id, recording_id);
CREATE INDEX rllst on recording_live_log(start_time);
CREATE TABLE recording_live_log_archive LIKE recording_live_log;
+18 -5
View File
@@ -5428,20 +5428,23 @@ index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_dtmf_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
CREATE TABLE recording_dtmf_muting_log (
dtmf_mute_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
recording_id INT(10) UNSIGNED NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
channel VARCHAR(255),
channel_to_mute VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
dtmf_muting TINYINT(3) UNSIGNED default '0',
campaign_id VARCHAR(20) default '',
trigger_dtmf VARCHAR(100) default '',
dtmf_muting SMALLINT(3) UNSIGNED default '0',
dtmf_muting_start_time DATETIME,
dtmf_muting_end_time DATETIME,
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
mute_state TINYINT(3) UNSIGNED default '0',
index(filename),
index(lead_id),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
@@ -5607,6 +5610,8 @@ CREATE INDEX vlecc on vicidial_log_extended (caller_code);
CREATE UNIQUE INDEX vvmmcount on vicidial_vmm_counts (lead_id,call_date);
CREATE UNIQUE INDEX vicidial_user_logins_daily_user on vicidial_user_logins_daily(login_day, user);
CREATE INDEX vdtmflt on vicidial_dtmf_log (dtmf_time);
CREATE INDEX vlali on vicidial_live_agents (lead_id);
CREATE INDEX vlaus on vicidial_live_agents (user);
@@ -5754,6 +5759,14 @@ CREATE UNIQUE INDEX vdpla on vicidial_3way_press_log_archive (call_date,caller_c
CREATE TABLE vicidial_daily_rt_monitoring_log LIKE vicidial_rt_monitor_log;
CREATE TABLE recording_dtmf_muting_log_archive LIKE recording_dtmf_muting_log;
ALTER TABLE recording_dtmf_muting_log_archive MODIFY dtmf_mute_id INT(10) UNSIGNED NOT NULL;
CREATE UNIQUE INDEX rdml_key on recording_dtmf_muting_log_archive(dtmf_mute_id, recording_id);
CREATE INDEX rllst on recording_live_log(start_time);
CREATE TABLE recording_live_log_archive LIKE recording_live_log;
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
@@ -5854,4 +5867,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='1731',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1732',db_schema_update_date=NOW(),reload_timestamp=NOW();
+33 -18
View File
@@ -2985,24 +2985,6 @@ index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_dtmf_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_start_time DATETIME,
dtmf_muting_end_time DATETIME,
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
mute_state TINYINT(3) UNSIGNED default '0',
index(filename),
index(lead_id),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_log_parallel_archive LIKE recording_log_parallel;
CREATE TABLE recording_log_stereo_archive LIKE recording_log_stereo;
@@ -3015,3 +2997,36 @@ UPDATE system_settings SET db_schema_version='1730',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns ADD call_count_limit_restrict VARCHAR(30) default 'DISABLED';
UPDATE system_settings SET db_schema_version='1731',db_schema_update_date=NOW() where db_schema_version < 1731;
CREATE INDEX vdtmflt on vicidial_dtmf_log (dtmf_time);
CREATE TABLE recording_dtmf_muting_log (
dtmf_mute_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
recording_id INT(10) UNSIGNED NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
channel VARCHAR(255),
channel_to_mute VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
campaign_id VARCHAR(20) default '',
trigger_dtmf VARCHAR(100) default '',
dtmf_muting SMALLINT(3) UNSIGNED default '0',
dtmf_muting_start_time DATETIME,
dtmf_muting_end_time DATETIME,
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
mute_state TINYINT(3) UNSIGNED default '0',
index(filename),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_dtmf_muting_log_archive LIKE recording_dtmf_muting_log;
ALTER TABLE recording_dtmf_muting_log_archive MODIFY dtmf_mute_id INT(10) UNSIGNED NOT NULL;
CREATE UNIQUE INDEX rdml_key on recording_dtmf_muting_log_archive(dtmf_mute_id, recording_id);
CREATE INDEX rllst on recording_live_log(start_time);
CREATE TABLE recording_live_log_archive LIKE recording_live_log;
UPDATE system_settings SET db_schema_version='1732',db_schema_update_date=NOW() where db_schema_version < 1732;
+74 -16
View File
@@ -159,10 +159,11 @@
# 240709-2010 - Changes to input variable filtering
# 241122-1544 - Fix for DTMF issue #1525
# 250831-0839 - Added MonitorStereo/StopMonitorStereo functions
# 251005-0935 - Added code for recording_dtmf_muting
#
$version = '2.14-106';
$build = '250831-0839';
$version = '2.14-107';
$build = '251005-0935';
$php_script = 'manager_send.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=177;
@@ -171,6 +172,7 @@ $SSagent_debug_logging=0;
$startMS = microtime();
$dial_override_limit=6;
$ip = getenv("REMOTE_ADDR");
$recording_dtmf_muting=0;
require_once("dbconnect_mysqli.php");
require_once("functions.php");
@@ -286,7 +288,7 @@ $pass=preg_replace("/\'|\"|\\\\|;| /","",$pass);
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,allow_sipsak_messages,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,agent_debug_logging,allow_web_debug,stereo_recording,stereo_parallel_recording FROM system_settings;";
$stmt = "SELECT use_non_latin,allow_sipsak_messages,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,agent_debug_logging,allow_web_debug,stereo_recording,stereo_parallel_recording,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02001',$user,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";}
@@ -304,6 +306,8 @@ if ($qm_conf_ct > 0)
$SSallow_web_debug = $row[7];
$SSstereo_recording = $row[8];
$SSstereo_parallel_recording = $row[9];
$SSrecording_dtmf_detection = $row[10];
$SSrecording_dtmf_muting = $row[11];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -2706,6 +2710,53 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
$recording_id = mysqli_insert_id($link);
}
}
### check for recording_dtmf_muting
$stmt="SELECT callerid FROM vicidial_live_agents where user='$user' and lead_id='$lead_id' limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$rec_count = mysqli_num_rows($rslt);
if ($rec_count>0)
{
$row=mysqli_fetch_row($rslt);
$USERcallerid = $row[0];
$stmt="SELECT campaign_id FROM vicidial_auto_calls where callerid='$USERcallerid' and lead_id='$lead_id' order by auto_call_id limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vac_count = mysqli_num_rows($rslt);
if ($vac_count>0)
{
$row=mysqli_fetch_row($rslt);
$USERcampaign_id = $row[0];
$stmt = "SELECT recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$USERcampaign_id';";
if (preg_match("/^Y|^DC/",$USERcallerid))
{$stmt = "SELECT recording_dtmf_muting FROM vicidial_inbound_groups where group_id='$USERcampaign_id';";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vic_count = mysqli_num_rows($rslt);
if ($vic_count>0)
{
$row=mysqli_fetch_row($rslt);
$recording_dtmf_muting = $row[0];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
}
}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY','$server_ip','$NOW_TIME','$channel','$filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($FROMvdc=='YES')
{
##### update vla record with recording_id
@@ -2945,11 +2996,11 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
##### gather stereo recording settings for this specific campaign/in-group
if ($VLA_inOUT == 'INBOUND')
{
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent FROM vicidial_inbound_groups where group_id='$VDcampaign_id';";
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent,recording_dtmf_muting FROM vicidial_inbound_groups where group_id='$VDcampaign_id';";
}
else
{
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent FROM vicidial_campaigns where campaign_id='$VDcampaign_id';";
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$VDcampaign_id';";
}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02075',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2962,6 +3013,9 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
$stereo_parallel_recording = $row[1];
$stereo_rec_filename = $row[2];
$stereo_recording_agent = $row[3];
$recording_dtmf_muting = $row[4];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
}
@@ -3020,7 +3074,7 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
if (preg_match("/RECID/",$filename) )
{
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$server_ip','$stereo_exten','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$VDvicidial_id')";
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$call_server_ip','$stereo_exten','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$VDvicidial_id')";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02133',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3039,7 +3093,7 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
}
else
{
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$server_ip','$stereo_exten','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$VDvicidial_id')";
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$call_server_ip','$stereo_exten','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$VDvicidial_id')";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02073',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3068,12 +3122,14 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
}
# stereo_parallel_recording is enabled, only insert DB records, don't initiate recording
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status,parallel_recording_id) values('$recording_id','$server_ip','$NOW_TIME','0','$stereo_rec_filename','$lead_id','$VDcampaign_id STEREO_PARALLEL AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $VDvicidial_id|user: $user|channel: $channel|','STEREO START','$parallel_recording_id');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status,parallel_recording_id) values('$recording_id','$call_server_ip','$NOW_TIME','0','$stereo_rec_filename','$lead_id','$VDcampaign_id STEREO_PARALLEL AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $VDvicidial_id|user: $user|channel: $channel|','STEREO START','$parallel_recording_id');";
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
$rslt=mysql_to_mysqli($stmtA, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'02166',$user,$server_ip,$session_name,$one_mysql_log);}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED','$server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED $stereo_exten','$call_server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmtD -->";}
$rslt=mysql_to_mysqli($stmtD, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtD,'02167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3084,17 +3140,19 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
$PATHmonitorT = '/var/spool/asterisk/monitorS';
$stereo_recording_options = "r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)";
$vmgr_callerid = substr($stereo_rec_filename, 0, 17) . '...';
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','MixMonitor','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Options: $stereo_recording_options','','','','','','','');";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','MixMonitor','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Options: $stereo_recording_options','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02135',$user,$server_ip,$session_name,$one_mysql_log);}
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$server_ip','$NOW_TIME','0','$stereo_rec_filename','$lead_id','$VDcampaign_id STEREO AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $VDvicidial_id|user: $user|channel: $channel|','STEREO START');";
$stmtA = "INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log,recording_status) values('$recording_id','$call_server_ip','$NOW_TIME','0','$stereo_rec_filename','$lead_id','$VDcampaign_id STEREO AGENT-CONTROLLED $stereo_recording $stereo_recording_agent','start: $now_date|vicidial_id: $VDvicidial_id|user: $user|channel: $channel|','STEREO START');";
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
$rslt=mysql_to_mysqli($stmtA, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'02168',$user,$server_ip,$session_name,$one_mysql_log);}
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED','$server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
$stmtD = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED $stereo_exten','$call_server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmtD -->";}
$rslt=mysql_to_mysqli($stmtD, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtD,'02169',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3102,7 +3160,7 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
if (preg_match("/CUSTOMER_ONLY/",$stereo_recording) )
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: write','State: 1','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02170',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3110,7 +3168,7 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
if (preg_match("/CUSTOMER_MUTE/",$stereo_recording) )
{
$vmgr_callerid = substr($stereo_rec_filename, 0, 16) . 'M...';
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','MixMonitorMute','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','Direction: read','State: 1','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02171',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3210,14 +3268,14 @@ if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
if (!preg_match("/PARALLEL/",$recording_type))
{
# stop all stereo recordings on the customer channel
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','StopMixMonitor','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','','','','','','','','');";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','StopMixMonitor','$vmgr_callerid','ActionID: $vmgr_callerid','Channel: $channel','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02177',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END StopMonitorStereo steps #####
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n";
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$call_server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n";
}
}
+79 -17
View File
@@ -553,7 +553,7 @@
# 240612-0206 - Fix for extension_appended_cidname newer options
# 240801-1140 - Code updates for PHP8 compatibility
# 240830-1618 - Added manual_minimum_ring_seconds SIP action lookup code
# 240906-1646 - Added testing for stereo_recording campaign option for manual dial calls *NOT PRODUCTION READY*
# 240906-1646 - Added testing for stereo_recording campaign option for manual dial calls
# 250129-0900 - Fix for PHP8 TypeError
# 250224-1642 - Fix for drop_lockout_time issue with NULL last_local_call_time DROP leads
# 250311-1420 - Fix for start_call_url on inbound calls where blank and campaign set to ALT
@@ -563,10 +563,11 @@
# 250916-1918 - Added stereo recording features
# 250923-1755 - Added talk_sec_url features
# 251002-1352 - Added call_count_limit_restrict campaign option
# 251005-0931 - Added code for recording_dtmf_muting
#
$version = '2.14-456';
$build = '251002-1352';
$version = '2.14-457';
$build = '251005-0931';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=995;
@@ -575,6 +576,7 @@ $DB=0;
$VD_login=0;
$SSagent_debug_logging=0;
$pause_to_code_jump=0;
$recording_dtmf_muting=0;
$startMS = microtime();
require_once("dbconnect_mysqli.php");
@@ -1094,7 +1096,7 @@ $sip_hangup_cause_dictionary = array(
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug,abandon_check_queue,inbound_credits,stereo_recording,stereo_parallel_recording FROM system_settings;";
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug,abandon_check_queue,inbound_credits,stereo_recording,stereo_parallel_recording,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";}
@@ -1130,6 +1132,8 @@ if ($qm_conf_ct > 0)
$SSinbound_credits = $row[25];
$SSstereo_recording = $row[26];
$SSstereo_parallel_recording = $row[27];
$SSrecording_dtmf_detection = $row[28];
$SSrecording_dtmf_muting = $row[29];
}
if ($SSallow_web_debug < 1) {$DB=0; $format='text';}
##### END SETTINGS LOOKUP #####
@@ -2433,7 +2437,7 @@ if ($ACTION == 'manDiaLnextCaLL')
$local_call_time='24hours';
##### gather local call time, user_group_script settings from campaign
$stmt="SELECT local_call_time,user_group_script,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions FROM vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT local_call_time,user_group_script,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00353',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2449,6 +2453,9 @@ if ($ACTION == 'manDiaLnextCaLL')
$camp_custom_four = $row[5];
$camp_custom_five = $row[6];
$state_descriptions = $row[7];
$recording_dtmf_muting = $row[8];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
$stmt="SELECT user_group,territory FROM vicidial_users where user='$user';";
@@ -5394,6 +5401,14 @@ if ($ACTION == 'manDiaLnextCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00733',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_RIR','$server_ip','$NOW_TIME','$channel','$recording_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
##### update vla record with recording_id
$stmt = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
@@ -6441,7 +6456,7 @@ if ($ACTION == 'manDiaLonly')
### check for manual dial filter and extension append settings in campaign
$use_eac=0;
$use_custom_cid='N';
$stmt = "SELECT manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,extension_appended_cidname,start_call_url,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,custom_one,custom_two,custom_three,custom_four,custom_five,daily_phone_number_call_limit,state_descriptions,call_count_limit_restrict,call_count_limit FROM vicidial_campaigns where campaign_id='$campaign';";
$stmt = "SELECT manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,extension_appended_cidname,start_call_url,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,custom_one,custom_two,custom_three,custom_four,custom_five,daily_phone_number_call_limit,state_descriptions,call_count_limit_restrict,call_count_limit,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00325',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -6472,6 +6487,9 @@ if ($ACTION == 'manDiaLonly')
$state_descriptions = $row[20];
$call_count_limit_restrict = $row[21];
$call_count_limit = $row[22];
$recording_dtmf_muting = $row[23];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
# check for user overrides
@@ -7441,6 +7459,14 @@ if ($ACTION == 'manDiaLonly')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00740',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_RIR','$server_ip','$NOW_TIME','$channel','$recording_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
##### update vla record with recording_id
$stmt = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
@@ -8184,7 +8210,7 @@ if ($ACTION == 'manDiaLlookCaLL')
$row=mysqli_fetch_row($rslt);
if ( $row[0] == 'CONFBRIDGE' )
{
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename FROM vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent,parallel_rec_co_filename,parallel_rec_cm_filename,parallel_rec_fr_filename,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00921',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -8199,6 +8225,9 @@ if ($ACTION == 'manDiaLlookCaLL')
$parallel_rec_co_filename = $row[4];
$parallel_rec_cm_filename = $row[5];
$parallel_rec_fr_filename = $row[6];
$recording_dtmf_muting = $row[7];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
if ( (preg_match("/CUSTOMER|BOTH/",$stereo_recording) ) and (strlen($stereo_rec_filename) > 5) )
@@ -8302,8 +8331,10 @@ if ($ACTION == 'manDiaLlookCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00927',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_co_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-ONLY','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_co_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00928',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8353,8 +8384,10 @@ if ($ACTION == 'manDiaLlookCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00931',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_cm_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL CUSTOMER-MUTED','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_cm_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00932',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8404,8 +8437,10 @@ if ($ACTION == 'manDiaLlookCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00935',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_fr_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL FULL-RECORDING','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_fr_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00936',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8449,8 +8484,10 @@ if ($ACTION == 'manDiaLlookCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00939',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_ag_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO_PARALLEL AGENT-CONTROLLED','$server_ip','$NOW_TIME','$channel','$temp_parallel_rec_ag_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00940',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8465,9 +8502,15 @@ if ($ACTION == 'manDiaLlookCaLL')
if ((preg_match("/ALLCALLS|ALLFORCE/",$stereo_recording_agent)))
{
$stereo_ac='SAC-'.$stereo_recording_agent."\n";
$rl_exten='SACBC';
if (preg_match("/CUSTOMER_ONLY/",$stereo_recording) )
{$rl_exten='SACCO';}
if (preg_match("/CUSTOMER_MUTE/",$stereo_recording) )
{$rl_exten='SACCM';}
## Start NON-parallel stereo call recording ##
# insert a record into the recording_log table
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$server_ip','SAC','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$uniqueid')";
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channel','$server_ip','$rl_exten','$NOW_TIME','$StarTtime','$stereo_rec_filename','$lead_id','$user','$uniqueid')";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00941',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8498,8 +8541,10 @@ if ($ACTION == 'manDiaLlookCaLL')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00944',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status) values('$recording_id','STEREO AGENT-CONTROLLED','$server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED');";
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','STEREO AGENT-CONTROLLED $rl_exten','$server_ip','$NOW_TIME','$channel','$stereo_rec_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00945',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -9064,7 +9109,7 @@ if ($stage == "end")
if ($auto_dial_level > 0)
{
### check to see if campaign has alt_dial enabled
$stmt="SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold,daily_phone_number_call_limit,call_count_limit_restrict,call_count_limit FROM vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT auto_alt_dial,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,auto_alt_threshold,daily_phone_number_call_limit,call_count_limit_restrict,call_count_limit,recording_dtmf_muting FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00064',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -9086,6 +9131,9 @@ if ($stage == "end")
$daily_phone_number_call_limit = $row[11];
$call_count_limit_restrict = $row[12];
$call_count_limit = $row[13];
$recording_dtmf_muting = $row[14];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
}
else {$auto_alt_dial = 'NONE';}
$alt_lead_done=0;
@@ -10306,6 +10354,14 @@ if ($stage == "end")
$recording_id = mysqli_insert_id($link);
}
}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### insert record into recording_live table ###
$stmt = "INSERT INTO recording_live (recording_id,recording_type,server_ip,start_time,channel,filename,lead_id,user,dtmf_muting_end_time,recording_status,dtmf_muting_seconds) values('$recording_id','MONO_LEGACY_3WAY','$server_ip','$NOW_TIME','$channel','$leave_3way_start_recording_filename','$lead_id','$user','2020-12-31 23:59:59','STARTED','$recording_dtmf_muting');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
}
##### END leave_3way_start_recording if triggered #####
@@ -10457,6 +10513,7 @@ if ($ACTION == 'VDADcheckINCOMING')
# default to $fronter=$user, closer blank
$fronter = $user;
$closer='';
$recording_dtmf_muting=0;
if ( (strlen($campaign)<1) || (strlen($server_ip)<1) )
{
@@ -11092,7 +11149,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$ig_custom_five='';
$ig_state_descriptions='';
$stmt = "SELECT group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination,web_form_address_three,status_group_id,inbound_survey,ingroup_script_two,browser_alert_sound,browser_alert_volume,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions,stereo_recording,stereo_recording_agent from vicidial_inbound_groups where group_id='$VDADchannel_group';";
$stmt = "SELECT group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination,web_form_address_three,status_group_id,inbound_survey,ingroup_script_two,browser_alert_sound,browser_alert_volume,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions,stereo_recording,stereo_recording_agent,recording_dtmf_muting from vicidial_inbound_groups where group_id='$VDADchannel_group';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -11139,6 +11196,9 @@ if ($ACTION == 'VDADcheckINCOMING')
$ig_state_descriptions = $row[37];
$stereo_recording = $row[38];
$stereo_recording_agent = $row[39];
$recording_dtmf_muting = $row[40];
if ( ($SSrecording_dtmf_detection < 1) or ($SSrecording_dtmf_muting < 1) )
{$recording_dtmf_muting=0;}
$status_group_gather_data = status_group_gather($row[27],'INGROUP');
@@ -11524,9 +11584,11 @@ if ($ACTION == 'VDADcheckINCOMING')
}
}
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{if ($SSrecording_dtmf_muting > 1) {$recording_dtmf_muting = $SSrecording_dtmf_muting;} }
### if web form is set then send on to vicidial.php for override of WEB_FORM address
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|$VDCL_ingroup_script_two|$VDCL_ingroup_script_color_two|$VDCL_browser_alert_sound|$VDCL_browser_alert_volume|$stereo_recording|$stereo_recording_agent|$talk_sec_urls_secs|\n";}
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|$VDCL_ingroup_script_two|$VDCL_ingroup_script_color_two|$VDCL_browser_alert_sound|$VDCL_browser_alert_volume|$stereo_recording|$stereo_recording_agent|$talk_sec_urls_secs|\n";}
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|$VDCL_ingroup_script_two|$VDCL_ingroup_script_color_two|$VDCL_browser_alert_sound|$VDCL_browser_alert_volume|$stereo_recording|$stereo_recording_agent|$talk_sec_urls_secs|$recording_dtmf_muting|\n";}
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|$VDCL_ingroup_script_two|$VDCL_ingroup_script_color_two|$VDCL_browser_alert_sound|$VDCL_browser_alert_volume|$stereo_recording|$stereo_recording_agent|$talk_sec_urls_secs|$recording_dtmf_muting|\n";}
if (strlen($fronter) < 2) {$fronter = $tsr;}
$stmt = "SELECT full_name from vicidial_users where user='$fronter';";
+17 -10
View File
@@ -751,10 +751,11 @@
# 250916-2055 - Added stereo recording features
# 250924-0953 - Added Talk Seconds URLs features
# 251002-1353 - Added call_count_limit_restrict campaign option
# 251020-0849 - Added code for recording_dtmf_muting, fix for Stereo Call Recording
#
$version = '2.14-717c';
$build = '251002-1353';
$version = '2.14-718c';
$build = '251020-0849';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=108;
@@ -864,7 +865,7 @@ $random = (rand(1000000, 9999999) + 10000000);
#############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications,inbound_credits,two_factor_auth_agent_hours,two_factor_container,sip_event_logging,stereo_recording,agent_hide_dial_fail,agent_man_dial_filter,agent_3way_dial_filter FROM system_settings;";
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications,inbound_credits,two_factor_auth_agent_hours,two_factor_container,sip_event_logging,stereo_recording,agent_hide_dial_fail,agent_man_dial_filter,agent_3way_dial_filter,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";}
@@ -935,6 +936,8 @@ if ($qm_conf_ct > 0)
$SSagent_hide_dial_fail = $row[60];
$SSagent_man_dial_filter = $row[61];
$SSagent_3way_dial_filter = $row[62];
$SSrecording_dtmf_detection = $row[63];
$SSrecording_dtmf_muting = $row[64];
if ( ($SSagent_hidden_sound == '---NONE---') or ($SSagent_hidden_sound == '') ) {$SSagent_hidden_sound_seconds=0;}
}
else
@@ -3157,7 +3160,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,dead_stop_recording,force_per_call_notes,state_descriptions,script_tab_height,leave_3way_stop_recording,manual_minimum_ring_seconds,manual_minimum_attempt_seconds,manual_minimum_answer_seconds,sip_event_logging,stereo_recording,stereo_recording_agent 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,force_per_call_notes,state_descriptions,script_tab_height,leave_3way_stop_recording,manual_minimum_ring_seconds,manual_minimum_attempt_seconds,manual_minimum_answer_seconds,sip_event_logging,stereo_recording,stereo_recording_agent,recording_dtmf_muting 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";}
@@ -3362,6 +3365,7 @@ else
$CAMPsip_event_logging = $row[197];
$stereo_recording = $row[198];
$stereo_recording_agent = $row[199];
$recording_dtmf_muting = $row[200];
if ( (!preg_match("/DISABLED/",$VU_manual_dial_lead_id)) and (strlen($VU_manual_dial_lead_id) > 0) )
{
@@ -3504,7 +3508,7 @@ else
if (preg_match("/EXTERNAL/",$transfer_no_dispo)) {$transfer_no_dispoEXTERNAL=1;}
if (preg_match("/LEAVE3WAY/",$transfer_no_dispo)) {$transfer_no_dispoLEAVE3WAY=1;}
if ($SSmute_recordings < 1)
if ( ($SSmute_recordings < 1) or ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) and ($recording_dtmf_muting > 0) ) )
{$mute_recordings='N';}
else
{
@@ -6796,6 +6800,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var MDOalt='';
var manual_entry_dial=0;
var mute_recordings='<?php echo $mute_recordings ?>';
var recording_dtmf_muting='<?php echo $recording_dtmf_muting ?>';
var leave_vm_no_dispo='<?php echo $leave_vm_no_dispo ?>';
var leave_vm_message_group_id='<?php echo $leave_vm_message_group_id ?>';
var leave_vm_message_group_exists='<?php echo $leave_vm_message_group_exists ?>';
@@ -6866,6 +6871,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var agent_hide_dial_fail='<?php echo $SSagent_hide_dial_fail ?>';
var agent_hide_dial_fail_MESSAGE="<?php echo $agent_hide_dial_fail_MESSAGE ?>";
var talk_sec_url_secs='';
var redirectserverip='';
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\" />";
@@ -9139,7 +9145,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
if (mute_recordings == 'Y')
if ( (mute_recordings == 'Y') && (recording_dtmf_muting < 1) )
{
document.getElementById("RecorDMute").innerHTML = conf_rec_mute_html;
}
@@ -9219,7 +9225,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
}
if (mute_recordings == 'Y')
if ( (mute_recordings == 'Y') && (recording_dtmf_muting < 1) )
{
document.getElementById("RecorDMute").innerHTML = conf_rec_mute_html;
}
@@ -9305,7 +9311,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
}
confmonitor_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + lastcustchannel + "&filename=NOfilenameNEEDED&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&lead_id=" + document.vicidial_form.lead_id.value + "&CalLCID=" + LasTCID + "&phone_number=" + lead_dial_number + "&ext_priority=1&FROMvdc=YES&uniqueid=" + tmp_vicidial_id + "&FROMapi=" + taskfromapi;
confmonitor_query = "server_ip=" + server_ip + "&call_server_ip=" + lastcustserverip + "&session_name=" + session_name + "&campaign=" + campaign + "&user=" + user + "&pass=" + pass + "&ACTION=" + taskconfrectype + "&format=text&channel=" + lastcustchannel + "&filename=NOfilenameNEEDED&exten=" + query_recording_exten + "&ext_context=" + ext_context + "&lead_id=" + document.vicidial_form.lead_id.value + "&CalLCID=" + LasTCID + "&phone_number=" + lead_dial_number + "&ext_priority=1&FROMvdc=YES&uniqueid=" + tmp_vicidial_id + "&FROMapi=" + taskfromapi;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(confmonitor_query);
@@ -9401,7 +9407,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
if (xmlhttpXF)
{
var redirectvalue = MDchannel;
var redirectserverip = lastcustserverip;
redirectserverip = lastcustserverip;
if (redirectvalue.length < 2)
{redirectvalue = lastcustchannel}
if ( (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') )
@@ -9822,7 +9828,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
if (xmlhttpXF)
{
var redirectvalue = MDchannel;
var redirectserverip = lastcustserverip;
redirectserverip = lastcustserverip;
var queryCID='';
var exten='';
var ext_context='';
@@ -14315,6 +14321,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
VDICstereo_recording = VDIC_data_VDIG[42];
VDICstereo_recording_agent = VDIC_data_VDIG[43];
talk_sec_url_secs = VDIC_data_VDIG[44];
recording_dtmf_muting = VDIC_data_VDIG[45];
// alert("talk_sec_url_secs: |" + talk_sec_url_secs + "|");
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
+57 -13
View File
@@ -6290,12 +6290,13 @@ if ($SSscript_remove_js > 0)
# 250822-2056 - Added system/campaign/ingroup settings for stereo_recording
# 250922-0841 - Added Talk Seconds URL links to multi-url admin page in campaigns and in-groups
# 251002-1428 - Added call_count_limit_restrict campaign setting
# 251019-2024 - Added Recording DTMF Muting
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
$admin_version = '2.14-945a';
$build = '251002-1428';
$admin_version = '2.14-946a';
$build = '251019-2024';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -28184,9 +28185,11 @@ if ($ADD==31)
{
echo "<tr bgcolor=#$SSstd_row3_background><td align=right></td><td align=left><input type=hidden name=stereo_parallel_recording value='$stereo_parallel_recording'><input type=hidden name=parallel_rec_co_filename value='$parallel_rec_co_filename'><input type=hidden name=parallel_rec_cm_filename value='$parallel_rec_cm_filename'><input type=hidden name=parallel_rec_fr_filename value='$parallel_rec_fr_filename'></td></tr>\n";
}
if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting =='2') or ($SSrecording_dtmf_muting =='3') ) and ($SSrecording_dtmf_detection == '1') )
if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting >= 2) ) and ($SSrecording_dtmf_detection == '1') )
{
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Recording DTMF Muting").": </td><td align=left><input type=text name=recording_dtmf_muting size=2 maxlength=3 value=\"$recording_dtmf_muting\"> $NWB#campaigns-recording_dtmf_muting$NWE</td></tr>\n";
$SYSTEM_DTMF_MUTING_OVERRIDE='';
if ($SSrecording_dtmf_muting >= 2) {$SYSTEM_DTMF_MUTING_OVERRIDE = "<B><FONT color='RED'>"._QXZ("SYSTEM OVERRIDE ENABLED").": $SSrecording_dtmf_muting "._QXZ("SECONDS")."</FONT></B>";}
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Recording DTMF Muting").": </td><td align=left><input type=text name=recording_dtmf_muting size=2 maxlength=3 value=\"$recording_dtmf_muting\"> $NWB#campaigns-recording_dtmf_muting$NWE $SYSTEM_DTMF_MUTING_OVERRIDE </td></tr>\n";
}
else
{
@@ -31464,22 +31467,61 @@ if ($ADD==34)
echo "<TABLE width=600 cellspacing=3>\n";
echo "<tr><td>"._QXZ("USER")."</td><td> &nbsp; &nbsp; "._QXZ("RANK")."</td><td> &nbsp; &nbsp; "._QXZ("GRADE")."</td><td> &nbsp; &nbsp; "._QXZ("CALLS TODAY")."</td></tr>\n";
$stmt="SELECT vu.user,vca.campaign_rank,vca.calls_today,full_name,vca.campaign_grade from vicidial_campaign_agents vca, vicidial_users vu where campaign_id='$campaign_id' and active='Y' and vu.user=vca.user $LOGadmin_viewable_groupsSQL order by vu.user;";
$rsltx=mysql_to_mysqli($stmt, $link);
$users_to_print = mysqli_num_rows($rsltx);
$stmt="SELECT user_group from vicidial_user_groups where ( (allowed_campaigns LIKE \"%-ALL-CAMPAIGNS-%\") or (allowed_campaigns LIKE \"% $campaign_id %\") ) $LOGadmin_viewable_groupsSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
$USERgroups_to_print = mysqli_num_rows($rslt);
if ($DB) {echo "$USERgroups_to_print|$stmt\n";}
$USERgroupsSQL="''";
$i=0;
while ($i < $USERgroups_to_print)
{
$row=mysqli_fetch_row($rslt);
$USERgroupsSQL .= ",'$row[0]'";
$i++;
}
$stmt="SELECT user,full_name from vicidial_users where user_group IN($USERgroupsSQL) and active='Y' order by user;";
$rslt=mysql_to_mysqli($stmt, $link);
$users_to_print = mysqli_num_rows($rslt);
if ($DB) {echo "$users_to_print|$stmt\n";}
$U_user=array();
$U_full_name=array();
$i=0;
while ($i < $users_to_print)
{
$row=mysqli_fetch_row($rslt);
$U_user[$i] = $row[0];
$U_full_name[$i] = $row[1];
$i++;
}
$o=0;
while ($users_to_print > $o)
{
$rowx=mysqli_fetch_row($rsltx);
$o++;
$temp_user = $U_user[$o];
$temp_name = $U_full_name[$o];
$campaign_rank='n/a';
$calls_today='n/a';
$campaign_grade='n/a';
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
else
{$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';}
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$rowx[0]\">$rowx[0]</a> - $rowx[3]</td><td><font size=1>$rowx[1]</td><td><font size=1>$rowx[4]</td><td><font size=1>$rowx[2]</td></tr>\n";
$stmt="SELECT campaign_rank,calls_today,campaign_grade from vicidial_campaign_agents where user='$U_user[$o]' and campaign_id='$campaign_id';";
$rslt=mysql_to_mysqli($stmt, $link);
$USERdetails_to_print = mysqli_num_rows($rslt);
if ($USERdetails_to_print > 0)
{
$row=mysqli_fetch_row($rslt);
$campaign_rank = $row[0];
$calls_today = $row[1];
$campaign_grade = $row[2];
}
$o++;
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3&user=$temp_user\">$temp_user</a> - $temp_name</td><td><font size=1>$campaign_rank</td><td><font size=1>$campaign_grade</td><td><font size=1>$calls_today</td></tr>\n";
}
echo "</table></center><br>\n";
@@ -35236,9 +35278,11 @@ if ($ADD==3111)
{
echo "<tr bgcolor=#$SSstd_row3_background><td align=right></td><td align=left><input type=hidden name=stereo_parallel_recording value='$stereo_parallel_recording'><input type=hidden name=parallel_rec_co_filename value='$parallel_rec_co_filename'><input type=hidden name=parallel_rec_cm_filename value='$parallel_rec_cm_filename'><input type=hidden name=parallel_rec_fr_filename value='$parallel_rec_fr_filename'></td></tr>\n";
}
if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting =='2') or ($SSrecording_dtmf_muting =='3') ) and ($SSrecording_dtmf_detection == '1') )
if ( ( ($SSrecording_dtmf_muting =='1') or ($SSrecording_dtmf_muting >= 2) ) and ($SSrecording_dtmf_detection == '1') )
{
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Recording DTMF Muting").": </td><td align=left><input type=text name=recording_dtmf_muting size=2 maxlength=3 value=\"$recording_dtmf_muting\"> $NWB#inbound_groups-recording_dtmf_muting$NWE</td></tr>\n";
$SYSTEM_DTMF_MUTING_OVERRIDE='';
if ($SSrecording_dtmf_muting >= 2) {$SYSTEM_DTMF_MUTING_OVERRIDE = "<B><FONT color='RED'>"._QXZ("SYSTEM OVERRIDE ENABLED").": $SSrecording_dtmf_muting "._QXZ("SECONDS")."</FONT></B>";}
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Recording DTMF Muting").": </td><td align=left><input type=text name=recording_dtmf_muting size=2 maxlength=3 value=\"$recording_dtmf_muting\"> $NWB#inbound_groups-recording_dtmf_muting$NWE $SYSTEM_DTMF_MUTING_OVERRIDE </td></tr>\n";
}
else
{
@@ -45271,7 +45315,7 @@ if ($ADD==311111111111111)
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Allow Stereo Recordings").": </td><td align=left><select size=1 name=stereo_recording><option>1</option><option>0</option><option selected>$stereo_recording</option></select>$NWB#settings-stereo_recording$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Enable Stereo Parallel Recordings").": </td><td align=left><select size=1 name=stereo_parallel_recording><option>1</option><option>0</option><option selected>$stereo_parallel_recording</option></select>$NWB#settings-stereo_parallel_recording$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Allow Recording DTMF Detection").": </td><td align=left><select size=1 name=recording_dtmf_detection><option>1</option><option>0</option><option selected>$recording_dtmf_detection</option></select>$NWB#settings-recording_dtmf_detection$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Allow Recording DTMF Muting").": </td><td align=left><select size=1 name=recording_dtmf_muting><option>1</option><option>0</option><option selected>$recording_dtmf_muting</option></select>$NWB#settings-recording_dtmf_muting$NWE</td></tr>\n";
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Allow Recording DTMF Muting").": </td><td align=left><select size=1 name=recording_dtmf_muting><option>1</option><option>0</option><option selected>$recording_dtmf_muting</option><option value=0></option><option value=0></option><option value=0></option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option></select>$NWB#settings-recording_dtmf_muting$NWE</td></tr>\n";
}
else
{
+48 -2
View File
@@ -121,6 +121,7 @@
# 241002-0936 - Fix for displaying CID info on outbound calls that were blind transferred
# 250129-0921 - Fix for closer call notes display, Issue #1534
# 250913-0837 - Added Stereo Call Recording indicator
# 251010-1140 - Added DTMF count and muting recording log indicator columns
#
require("dbconnect_mysqli.php");
@@ -282,7 +283,7 @@ if ($nonselectable_statuses > 0)
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings,sip_event_logging,allow_web_debug,hopper_hold_inserts,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port,stereo_recording FROM system_settings;";
$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings,sip_event_logging,allow_web_debug,hopper_hold_inserts,coldstorage_server_ip,coldstorage_dbname,coldstorage_login,coldstorage_pass,coldstorage_port,stereo_recording,recording_dtmf_detection,recording_dtmf_muting FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -310,6 +311,8 @@ if ($qm_conf_ct > 0)
$SScoldstorage_pass = $row[18];
$SScoldstorage_port = $row[19];
$SSstereo_recording = $row[20];
$SSrecording_dtmf_detection = $row[21];
$SSrecording_dtmf_muting = $row[22];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -4012,10 +4015,21 @@ else
{
$stereo_column = "<td align=left NOWRAP><font size=1>"._QXZ("STEREO")."</td>";
}
$dtmf_detect_column='';
if ($SSrecording_dtmf_detection > 0)
{
$dtmf_detect_column = "<td align=left NOWRAP><font size=1>"._QXZ("DTMF GRP")." &nbsp; </td>";
}
$dtmf_mute_column='';
if ( ($SSrecording_dtmf_detection > 0) and ($SSrecording_dtmf_muting > 0) )
{
$dtmf_mute_column = "<td align=left NOWRAP><font size=1>"._QXZ("D-MUTE")." &nbsp; </td>";
}
echo "<B>"._QXZ("RECORDINGS FOR THIS LEAD").":</B>\n";
echo "<TABLE width=800 cellspacing=1 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td align=left><font size=2> "._QXZ("LEAD")."</td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("SECONDS")." </td><td align=left><font size=2> &nbsp; "._QXZ("RECID")."</td><td align=center><font size=2>"._QXZ("FILENAME")."</td><td align=left><font size=2>"._QXZ("LOCATION")."</td><td align=left><font size=2>"._QXZ("TSR")."</td>$mute_column$stereo_column<td align=left><font size=2> </td></tr>\n";
echo "<tr><td><font size=1># </td><td align=left><font size=2> "._QXZ("LEAD")."</td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("SECONDS")." </td><td align=left><font size=2> &nbsp; "._QXZ("RECID")."</td><td align=center><font size=2>"._QXZ("FILENAME")."</td><td align=left><font size=2>"._QXZ("LOCATION")."</td><td align=left><font size=2>"._QXZ("TSR")."</td>$mute_column$stereo_column$dtmf_detect_column$dtmf_mute_column<td align=left><font size=2> </td></tr>\n";
$stmt="SELECT recording_id,channel,server_ip,extension,start_time,start_epoch,end_time,end_epoch,length_in_sec,length_in_min,filename,location,lead_id,user,vicidial_id from recording_log where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by recording_id desc limit 500;";
$rslt=mysql_to_mysqli($stmt, $link);
@@ -4113,6 +4127,38 @@ else
if (!preg_match("/^S/",$stereo_flag)) {$stereo_flag='';}
echo "<td align=center><font size=1> $stereo_flag &nbsp; </td>\n";
}
if ($SSrecording_dtmf_detection > 0)
{
$dtmf_detected='';
$dtmf_muting='';
$dtmf_muting_seconds='';
$stmtDTMF="SELECT dtmf_detected,dtmf_muting,dtmf_muting_seconds from recording_live_log where recording_id='$row[0]' limit 1;";
$rsltDTMF=mysql_to_mysqli($stmtDTMF, $link);
$DTMF_to_print = mysqli_num_rows($rsltDTMF);
if ($DB) {echo "$DTMF_to_print|$stmtDTMF|\n";}
if ($DTMF_to_print > 0)
{
$DTMFrow=mysqli_fetch_row($rsltDTMF);
$dtmf_detected = $DTMFrow[0];
$dtmf_muting = $DTMFrow[1];
$dtmf_muting_seconds = $DTMFrow[2];
if ($dtmf_detected < 1)
{$dtmf_detected='';}
if ($SSrecording_dtmf_muting > 0)
{
if ($dtmf_muting > 0)
{$dtmf_muting = "$dtmf_muting - $dtmf_muting_seconds";}
else
{$dtmf_muting='';}
}
}
echo "<td align=center><font size=1> $dtmf_detected &nbsp; </td>\n";
if ($SSrecording_dtmf_muting > 0)
{echo "<td align=center><font size=1> $dtmf_muting &nbsp; </td>\n";}
}
echo "$play_audio";
echo "</tr>\n";
$rec_ids .= ",'$row[0]'";
+5 -5
View File
@@ -1,4 +1,4 @@
# version: 20251002142401
# version: 20251017123601
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, unless the User Password Minimum Length system setting is enabled, which will require a longer password. 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>
@@ -275,7 +275,7 @@ campaigns-stereo_recording_agent Stereo Recording Agent Control <QXZ>If Stereo C
campaigns-stereo_rec_filename Stereo Rec Filename <QXZ>If Stereo Call Recordings is enabled, this will be the recording filename of the Stereo call recordings. This cannot be set the same as the Campaign Rec Filename. This field is required to be populated for Stereo Call Recording to work for calls placed from this campaign. The dynamic fields that can be used are the same as can be used in the Campaign Rec Filename. Default is S_FULLDATE_CUSTPHONE.</QXZ>
campaigns-stereo_parallel_recording Parallel Stereo Recordings <QXZ>if enabled, then every call will be recorded in its entirety, from when the agent receives it until it leaves the agent session. The options include: CUSTOMER-ONLY, CUSTOMER-MUTED and FULL-RECORDING. If Stereo Recording Agent Control is also enabled, that can itself also result in multiple recordings on a single call. Default is DISABLED.</QXZ>
campaigns-parallel_rec_xx_filename Parallel Rec Filenames <QXZ>If Parallel Stereo Recordings are enabled, then these optional fields can be used to customize the call recording filenames for each type of Parallel Stereo Call Recording. If these fields are not populated, then the system will default to use the Stereo Rec Filename with a prefix at the beginning of each filename for the type of Parallel Stereo Call Recording that has been used: CO for Customer-Only, CM for Customer-Muted and FR for Full-Recording. Default is blank for all 3 of these fields.</QXZ>
campaigns-recording_dtmf_muting Recording DTMF Muting <QXZ>NOT FUNCTIONAL, STILL IN DEVELOPMENT. If enabled, and Allow Recording DTMF Detection is also enabled, call recordings will be muted for this number of seconds after the first DTMF signal is detected while recording is active. Default is 0 for disabled.</QXZ>
campaigns-recording_dtmf_muting Recording DTMF Muting <QXZ>If enabled, and the Allow Recording DTMF Detection system setting is also enabled, call recordings will be muted for this number of seconds after the first DTMF signal is detected while recording is active. This setting will only effect on calls placed from this campaign, if you also want DTMF Muting to be active for inbound calls, then each In-Group will also need to have this feature enabled. If this is enabled for a campaign, then Mute Recordings will be disabled automatically. Default is 0 for disabled.</QXZ>
campaigns-per_call_notes Call Notes Per Call <QXZ>Setting this option to ENABLED will allow agents to enter in notes for every call they handle in the agent interface. The notes entry field will appear below the Comments field in the agent interface. Also, if the Agent User Group is allowed to view Call Logs then the agent will be able to view past call notes for a lead at any time. Default is DISABLED.</QXZ>
campaigns-force_per_call_notes Per Call Notes Required <QXZ>If enabled, the agent will have to enter text into the Call Notes field on their agent screen in order to Hangup the Customer phone call. The CHARACTERS options will also enable this feature, but they will require a minimum number of characters to be entered to allow hangup. Default is DISABLED.</QXZ>
campaigns-comments_all_tabs Comments All Tabs <QXZ>Setting this option to ENABLED will display the Comments field on all tabs in the main agent screen. Default is DISABLED.</QXZ>
@@ -676,7 +676,7 @@ inbound_groups-stereo_recording_agent Stereo Recording Agent Control <QXZ>If Ste
inbound_groups-stereo_rec_filename Stereo Rec Filename <QXZ>If Stereo Call Recordings is enabled, this will be the recording filename of the Stereo call recordings for calls handled through this In-Group. This cannot be set the same as the Campaign Rec Filename. This field is required to be populated for Stereo Call Recording to work for calls handled through this In-Group. The dynamic fields that can be used are the same as can be used in the In-Group Recording Filename. Default is S_FULLDATE_CUSTPHONE.</QXZ>
inbound_groups-stereo_parallel_recording Parallel Stereo Recordings <QXZ>if enabled, then every call will be recorded in its entirety for calls handled through this In-Group, from when the agent receives it until it leaves the agent session. The options include: CUSTOMER-ONLY, CUSTOMER-MUTED and FULL-RECORDING. If Stereo Recording Agent Control is also enabled, that can itself also result in multiple recordings on a single call. Default is DISABLED.</QXZ>
inbound_groups-parallel_rec_xx_filename Parallel Rec Filenames <QXZ>If Parallel Stereo Recordings are enabled, then these optional fields can be used to customize the call recording filenames for each type of Parallel Stereo Call Recording. If these fields are not populated, then the system will default to use the Stereo Rec Filename with a prefix at the beginning of each filename for the type of Parallel Stereo Call Recording that has been used: CO for Customer-Only, CM for Customer-Muted and FR for Full-Recording. Default is blank for all 3 of these fields.</QXZ>
inbound_groups-recording_dtmf_muting Recording DTMF Muting <QXZ>NOT FUNCTIONAL, STILL IN DEVELOPMENT. If enabled, and Allow Recording DTMF Detection is also enabled, call recordings for calls handled through this In-Group will be muted for this number of seconds after the first DTMF signal is detected while recording is active. Default is 0 for disabled.</QXZ>
inbound_groups-recording_dtmf_muting Recording DTMF Muting <QXZ>If enabled, and the Allow Recording DTMF Detection system setting is also enabled, call recordings from this In-Group will be muted for this number of seconds after the first DTMF signal is detected while recording is active. This setting will only effect on calls handled through this In-Group, if you also want DTMF Muting to be active for outbound calls, then each Campaign will also need to have this feature enabled. Default is 0 for disabled.</QXZ>
inbound_groups-qc_enabled QC Enabled <QXZ>Setting this field to Y allows for the agent Quality Control features to work. Default is N.</QXZ>
inbound_groups-qc_statuses QC Statuses <QXZ>This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review. </QXZ>
inbound_groups-qc_statuses_id QC Statuses ID <QXZ>This area is where you select which "QC_TEMPLATE" settings container will be used to determine the call statuses that are eligible for QC evaluation in this ingroup. This will override both campaign and list "QC Statuses ID" settings. </QXZ>
@@ -1252,8 +1252,8 @@ settings-recording_buttons Recording Buttons Type <QXZ>This option allows you to
settings-mute_recordings Allow Mute Recordings <QXZ>This option if enabled allows you to enable the MUTE RECORDING button on the agent screen by campaign and-or user. This feature is only tested with systems running Asterisk 13. You should not mute recordings for more than 15 minutes at a time. Default is 0 for disabled.</QXZ>
settings-stereo_recording Allow Stereo Recordings <QXZ>If enabled, allows for additional call recordings in stereo, with the customer on one side and the agent on the other. Must also be enabled at the campaign level. Enabling this setting may require additional system resources if standard mono recordings are also still enabled. Default is 0 for disabled.</QXZ>
settings-stereo_parallel_recording Enable Stereo Parallel Recordings <QXZ>If enabled, and Allow Stereo Recordings is also enabled, allows for multiple parallel stereo call recordings for every call. Enabling this setting will require additional system resources, since every call will be recorded in its entirety, and post-call processing will be required to facilitate all of this settings features. Must also be enabled at the campaign level. Default is 0 for disabled.</QXZ>
settings-recording_dtmf_detection Allow Recording DTMF Detection <QXZ>NOT FUNCTIONAL, STILL IN DEVELOPMENT. If enabled, recordings will be flagged if any DTMF signals are detected during the recording duration. Default is 0 for disabled.</QXZ>
settings-recording_dtmf_muting Allow Recording DTMF Muting <QXZ>NOT FUNCTIONAL, STILL IN DEVELOPMENT. If enabled, and Allow Recording DTMF Detection is also enabled, call recordings will be muted for X seconds after the first DTMF signal is detected while recording is active. Must also be enabled at the campaign level. Default is 0 for disabled.</QXZ>
settings-recording_dtmf_detection Allow Recording DTMF Detection <QXZ>If enabled, recording logs will be flagged if any DTMF signals are detected during the recording duration. Default is 0 for disabled.</QXZ>
settings-recording_dtmf_muting Allow Recording DTMF Muting <QXZ>If enabled, and Allow Recording DTMF Detection is also enabled, then you will be allowed to enable this feature for specific Campaigns and In-Groups. If set to -1- this setting will only effect on calls handled through the Campaigns and In-Groups that have this feature enabled. If this is enabled for a campaign, then Mute Recordings will be disabled automatically for that campaign. If this setting is set to 2 or higher, then this will force-enable DTMF Muting on all calls on this cluster and will override any Campaign or In-Group settings with this number of seconds of DTMF muting. Default is 0 for disabled.</QXZ>
settings-enable_auto_reports Enable Automated Reports <QXZ>This option if enabled allows you access to the Automated Reports section where you can set up reports to run at scheduled times and be delivered by email or FTP. Default is 0 for disabled.</QXZ>
settings-first_login_trigger First Login Trigger <QXZ>This setting allows for the initial configuration of the server screen to be shown to the administrator when they first log into the system.</QXZ>
settings-require_password_length User Password Minimum Length <QXZ>If set above 0, this setting will require that user passwords, phone and server passwords, and system settings default passwords be at least this minimum length of characters when those records settings are modified on the Modify pages. The most important factor in password security is the length of the password, and user passwords in this system can be up to 100 characters in length. Default is 0 for disabled.</QXZ>