Stereo Call Recording commit

git-svn-id: svn://192.168.202.10@3941 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2025-09-19 17:23:26 +00:00
parent 073f4baf52
commit 916fb65c6f
36 changed files with 5618 additions and 279 deletions
+1 -1
View File
@@ -69,7 +69,7 @@
# 220411-0833 - Added FHG(file-http-get) message playback option to download file from website
# 230412-1023 - Added Code to dispo NOAUDIODATA as ADAIR (Dead Air Auto) with Settings Container option, Issue #1459
# 230726-0932 - Added manual_vm_status_updates campaign option
# 250906-2228 - Added AMD minimum length handling to increase short call durations
# 240906-2228 - Added AMD minimum length handling to increase short call durations
#
$script = 'VD_amd.agi';
+677 -36
View File
@@ -265,6 +265,7 @@
# 240723-1632 - Small fix for ConfBridge
# 240906-1032 - Added testing for stereo_recording in-group option *NOT PRODUCTION READY*
# 250325-1724 - Fix for possible daily_limit issue
# 250825-1824 - Added stereo_recording code
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -395,6 +396,11 @@ if (!$PRSLOGfile) {$PRSLOGfile = "$PATHlogs/prsout.$year-$mon-$mday";}
if (!$PRSTESTfile) {$PRSTESTfile = "$PATHlogs/prstest.$year-$mon-$mday";}
if (!$ERRLOGfile) {$ERRLOGfile = "$PATHlogs/MySQLerror.$year-$mon-$mday";}
# generate paths to asterisk stereo recordings directories:
$PATHmonitorS = $PATHmonitor."S";
$PATHmonitorP = $PATHmonitor."P";
$PATHmonitorTRASH = $PATHmonitor."TRASH";
use DBI;
use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second
use Asterisk::AGI;
@@ -428,7 +434,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 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 FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -459,6 +465,8 @@ if ($sthArows > 0)
$SSagent_search_method = $aryA[20];
$SSabandon_check_queue = $aryA[21];
$SSinbound_credits = $aryA[22];
$SSstereo_recording = $aryA[23];
$SSstereo_parallel_recording = $aryA[24];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -897,7 +905,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 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 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;
@@ -1054,6 +1062,12 @@ if ($sthArows > 0)
$third_alert_container = $aryA[139];
$third_alert_only = $aryA[140];
$stereo_recording = $aryA[141];
$stereo_recording_agent = $aryA[142];
$stereo_rec_filename = $aryA[143];
$stereo_parallel_recording = $aryA[144];
$parallel_rec_co_filename = $aryA[145];
$parallel_rec_cm_filename = $aryA[146];
$parallel_rec_fr_filename = $aryA[147];
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';}
@@ -2673,11 +2687,11 @@ if ( ($CLchannel_group =~ /DID_INBOUND/) && (length($CLend_epoch) < 5) )
%ast_ver_str = parse_asterisk_version($asterisk_version);
if (( $ast_ver_str{major} = 1 ) && ($ast_ver_str{minor} < 6))
{
$AGI->exec("StopMonitor wav|/var/spool/asterisk/monitor/MIX/$CLfilename");
$AGI->exec("StopMonitor wav|$PATHmonitor/MIX/$CLfilename");
}
else
{
$AGI->exec("StopMonitor","wav,/var/spool/asterisk/monitor/MIX/$CLfilename");
$AGI->exec("StopMonitor","wav,$PATHmonitor/MIX/$CLfilename");
}
@@ -3319,9 +3333,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
my $LOCKaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02060'; $MEL_aff_rows=$LOCKaffected_rows; &mysql_error_logging;
if ( ($routing_initiated_recordings =~ /Y/) && ($found_agents > 0) && ($VDADon_hook_agent !~ /Y/) && ($CAMP_callorder !~ /ring_all$/i) && ($VDADextension !~ /^R\//))
# if ($AGILOG) {$agi_string = "-- DEBUG RECORDING: |$stereo_recording|$conf_engine|$SSstereo_recording|$stereo_rec_filename|$stereo_parallel_recording|$uniqueid|$channel|$insert_lead_id| |$routing_initiated_recordings|$found_agents|$VDADon_hook_agent|$CAMP_callorder|$VDADextension|"; &agi_output;}
if ( ( ($routing_initiated_recordings =~ /Y/) || ( ($stereo_recording =~ /CUSTOMER|BOTH/i) && ($conf_engine eq "CONFBRIDGE") && ($SSstereo_recording > 0) ) ) && ($found_agents > 0) && ($VDADon_hook_agent !~ /Y/) && ($CAMP_callorder !~ /ring_all$/i) && ($VDADextension !~ /^R\//))
{
### BEGIN routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
### BEGIN routing-initiated agent call recording for ALLCALLS/ALLFORCE for non-remote and non-on-hook agents ###
### get the recording settings for the campaign that this user is logged into
if (length($log_campaign) > 0)
@@ -3363,7 +3379,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$sthA->finish();
}
### if recording is enabled then start recording on this call before sending to a remote agent
### if recording is enabled then start recording on this call before sending to an agent
if ($ingroup_recording_override =~ /ALLCALLS|ALLFORCE/)
{
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$insert_lead_id';";
@@ -3434,18 +3450,6 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$dbhP=$dbhA; $mysql_count='02214'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
if ( ($stereo_recording =~ /CUSTOMER/i) && ($conf_engine eq "CONFBRIDGE") )
{
$retval_stop = $AGI->exec("StopMixMonitor","");
$retval = $AGI->exec("MixMonitor",",r(/var/spool/asterisk/monitorS/$campaign_rec_filename-in.wav)t(/var/spool/asterisk/monitorS/$campaign_rec_filename-out.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) values('$recording_id','$VDADserver_ip','$now_date','0','$campaign_rec_filename','$insert_lead_id','$stereo_recording $channel_group','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE STEREO RECORDING STARTED : |$retval|$retval_stop|$SRaffected_rows|$recording_id|$stmtA|"; &agi_output;}
}
$vmgr_callerid = substr($campaign_rec_filename, 0, 17) . '...';
$stmtA="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','Originate','$vmgr_callerid','Channel: $channelrec','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $campaign_rec_filename','','','','','');";
$affected_rows = $dbhA->do($stmtA);
@@ -3459,9 +3463,333 @@ 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;
if ($AGILOG) {$agi_string = "-- ROUTING INITIATED RECORDING STARTED : |$affected_rows|$recording_id|$campaign_rec_filename|$stmtA| |$affected_rowsB|$stmtB| |$affected_rowsC|$stmtC|"; &agi_output;}
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- ROUTING INITIATED RECORDING STARTED : |$affected_rows|$recording_id|$campaign_rec_filename|$stmtA| |$affected_rowsB|$stmtB| |$affected_rowsC|$stmtC| |$rLIVEaffected_rows|$stmtD|"; &agi_output;}
}
### END routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
### END routing-initiated agent call recording for ALLCALLS/ALLFORCE for non-remote and non-on-hook agents ###
### BEGIN stereo call recording for ALLCALLS/ALLFORCE and for all parallel stereo recording in-groups ###
if ( ($stereo_recording =~ /CUSTOMER|BOTH/i) && ($conf_engine eq "CONFBRIDGE") && ($SSstereo_recording > 0) )
{
$stereo_rec_filename =~ s/CAMPAIGN/$log_campaign/gi;
$stereo_rec_filename =~ s/INGROUP/$channel_group/gi;
$stereo_rec_filename =~ s/CUSTPHONE/$phone_number/gi;
$stereo_rec_filename =~ s/FULLDATE/$recdate/gi;
$stereo_rec_filename =~ s/TINYDATE/$tinydate/gi;
$stereo_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$stereo_rec_filename =~ s/AGENT/$VDADuser/gi;
$stereo_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$stereo_rec_filename =~ s/LEADID/$insert_lead_id/gi;
$stereo_rec_filename =~ s/CALLID/$callerid/gi;
$stereo_rec_filename =~ s/\"|\'//gi;
$PATHmonitorT = $PATHmonitorS;
if ( ($SSstereo_parallel_recording > 0) && ($stereo_parallel_recording =~ /CUSTOMER|FULL/) )
{
$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');";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$parallel_recording_id = $aryA[0];
}
$sthA->finish();
### start the parallel recording
$retval_stop = $AGI->exec("StopMixMonitor","");
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/PL$stereo_rec_filename-out.wav)t($PATHmonitorT/PL$stereo_rec_filename-in.wav)");
if ($AGILOG) {$agi_string = "-- PARALLEL STEREO STARTED: |$retval|$retval_stop|$SRaffected_rows|$parallel_recording_id|$stmtA|"; &agi_output;}
if ($stereo_parallel_recording =~ /CUSTOMER-ONLY/)
{
$temp_parallel_rec_co_filename = "CO".$stereo_rec_filename;
if (length($parallel_rec_co_filename) > 0)
{
$temp_parallel_rec_co_filename = $parallel_rec_co_filename;
$temp_parallel_rec_co_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_co_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_co_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_co_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_co_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_co_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_co_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_co_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_co_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_co_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_co_filename =~ /RECID/)
{
$temp_parallel_rec_co_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_co_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- PARALLEL CO STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
if ($stereo_parallel_recording =~ /CUSTOMER-MUTED/)
{
$temp_parallel_rec_cm_filename = "CM".$stereo_rec_filename;
if (length($parallel_rec_cm_filename) > 0)
{
$temp_parallel_rec_cm_filename = $parallel_rec_cm_filename;
$temp_parallel_rec_cm_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_cm_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_cm_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_cm_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_cm_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_cm_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_cm_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_cm_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_cm_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_cm_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_cm_filename =~ /RECID/)
{
$temp_parallel_rec_cm_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_cm_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- PARALLEL CM STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
if ($stereo_parallel_recording =~ /FULL-RECORDING/)
{
$temp_parallel_rec_fr_filename = "FR".$stereo_rec_filename;
if (length($parallel_rec_fr_filename) > 0)
{
$temp_parallel_rec_fr_filename = $parallel_rec_fr_filename;
$temp_parallel_rec_fr_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_fr_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_fr_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_fr_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_fr_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_fr_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_fr_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_fr_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_fr_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_fr_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_fr_filename =~ /RECID/)
{
$temp_parallel_rec_fr_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_fr_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- PARALLEL FR STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
# insert logs for agent-controlled stereo call recordings while parallel recordings are enabled
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_ag_filename =~ /RECID/)
{
$temp_parallel_rec_ag_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_ag_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO routing_initiated_recordings (recording_id,filename,launch_time,lead_id,vicidial_id,user,processed,rir_type) values('$recording_id','$temp_parallel_rec_ag_filename','$now_date','$insert_lead_id','$insert_close_id','$VDADuser','0','S')";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- PARALLEL AG STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$affected_rowsB|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
}
else
{
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
# 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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($stereo_rec_filename =~ /RECID/)
{
$stereo_rec_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$stereo_rec_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$retval_stop = $AGI->exec("StopMixMonitor","");
$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');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO routing_initiated_recordings (recording_id,filename,launch_time,lead_id,vicidial_id,user,processed,rir_type) values('$recording_id','$stereo_rec_filename','$now_date','$insert_lead_id','$insert_close_id','$VDADuser','0','S')";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
$mLIVEaffected_rows=0;
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','','','','','','');";
$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','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($AGILOG) {$agi_string = "-- AGENT STEREO RECORDING STARTED : |$retval|$retval_stop|$SRaffected_rows|$recording_id|$affected_rowsB|$rLIVEaffected_rows|$mLIVEaffected_rows|$stmtA|"; &agi_output;}
}
}
}
### END stereo call recording for ALLCALLS/ALLFORCE and for all parallel stereo recording in-groups ###
}
}
@@ -4693,21 +5021,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$campaign_rec_filename =~ s/CALLID/$callerid/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
if ( ($stereo_recording =~ /CUSTOMER/i) && ($conf_engine eq "CONFBRIDGE") )
if ( ($stereo_recording =~ /CUSTOMER|BOTH/i) && ($conf_engine eq "CONFBRIDGE") && ($SSstereo_recording > 0) )
{
$retval_stop = $AGI->exec("StopMixMonitor","");
$retval = $AGI->exec("MixMonitor",",r(/var/spool/asterisk/monitorS/$campaign_rec_filename-in.wav)t(/var/spool/asterisk/monitorS/$campaign_rec_filename-out.wav)");
# do nothing can't record more than 1 stream on the same channel, stereo call recording processing is right below this section
}
else
{
%ast_ver_str = parse_asterisk_version($asterisk_version);
if (( $ast_ver_str{major} = 1 ) && ($ast_ver_str{minor} < 6))
{
$retval = $AGI->exec("Monitor wav|/var/spool/asterisk/monitor/MIX/$campaign_rec_filename");
$retval = $AGI->exec("Monitor wav|$PATHmonitor/MIX/$campaign_rec_filename");
}
else
{
$retval = $AGI->exec("Monitor","wav,/var/spool/asterisk/monitor/MIX/$campaign_rec_filename");
$retval = $AGI->exec("Monitor","wav,$PATHmonitor/MIX/$campaign_rec_filename");
}
}
@@ -4715,27 +5042,341 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$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','$phone_number','$now_date','$now_date_epoch','0','$campaign_rec_filename','$insert_lead_id','$VDADuser','$campaign_rec_filename','$insert_close_id');";
$RLRAaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01173'; $MEL_aff_rows=$RLRAaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$retval|$RLRAaffected_rows|$campaign_rec_filename|$stmtA|"; &agi_output;}
if ( ($stereo_recording =~ /CUSTOMER/i) && ($conf_engine eq "CONFBRIDGE") )
$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;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02213'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($campaign_rec_filename =~ /RECID/)
{
$campaign_rec_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$campaign_rec_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE RECORDING STARTED : |$retval|$RLRAaffected_rows|$campaign_rec_filename|$recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
### BEGIN stereo call recording for ALLCALLS/ALLFORCE and for all parallel stereo recording in-groups ###
if ( ($stereo_recording =~ /CUSTOMER|BOTH/i) && ($conf_engine eq "CONFBRIDGE") && ($SSstereo_recording > 0) )
{
$stereo_rec_filename =~ s/CAMPAIGN/$log_campaign/gi;
$stereo_rec_filename =~ s/INGROUP/$channel_group/gi;
$stereo_rec_filename =~ s/CUSTPHONE/$phone_number/gi;
$stereo_rec_filename =~ s/FULLDATE/$recdate/gi;
$stereo_rec_filename =~ s/TINYDATE/$tinydate/gi;
$stereo_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$stereo_rec_filename =~ s/AGENT/$VDADuser/gi;
$stereo_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$stereo_rec_filename =~ s/LEADID/$insert_lead_id/gi;
$stereo_rec_filename =~ s/CALLID/$callerid/gi;
$stereo_rec_filename =~ s/\"|\'//gi;
$PATHmonitorT = $PATHmonitorS;
if ( ($SSstereo_parallel_recording > 0) && ($stereo_parallel_recording =~ /CUSTOMER|FULL/) )
{
$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');";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
$parallel_recording_id = $aryA[0];
}
$sthA->finish();
### 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) values('$recording_id','$VDADserver_ip','$now_date','0','$campaign_rec_filename','$insert_lead_id','$stereo_recording $channel_group','start: $now_date|vicidial_id: $insert_close_id|user: $VDADuser|channel: $channel|');";
$SRaffected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$SRaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE STEREO RECORDING STARTED : |$retval|$SRaffected_rows|$recording_id|$stmtA|"; &agi_output;}
### start the parallel recording
$retval_stop = $AGI->exec("StopMixMonitor","");
$retval = $AGI->exec("MixMonitor",",r($PATHmonitorT/PL$stereo_rec_filename-out.wav)t($PATHmonitorT/PL$stereo_rec_filename-in.wav)");
if ($AGILOG) {$agi_string = "-- REMOTE PARALLEL STEREO STARTED: |$retval|$retval_stop|$SRaffected_rows|$parallel_recording_id|$stmtA|"; &agi_output;}
if ($stereo_parallel_recording =~ /CUSTOMER-ONLY/)
{
$temp_parallel_rec_co_filename = "CO".$stereo_rec_filename;
if (length($parallel_rec_co_filename) > 0)
{
$temp_parallel_rec_co_filename = $parallel_rec_co_filename;
$temp_parallel_rec_co_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_co_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_co_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_co_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_co_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_co_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_co_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_co_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_co_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_co_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_co_filename =~ /RECID/)
{
$temp_parallel_rec_co_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_co_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE PARALLEL CO STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
if ($stereo_parallel_recording =~ /CUSTOMER-MUTED/)
{
$temp_parallel_rec_cm_filename = "CM".$stereo_rec_filename;
if (length($parallel_rec_cm_filename) > 0)
{
$temp_parallel_rec_cm_filename = $parallel_rec_cm_filename;
$temp_parallel_rec_cm_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_cm_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_cm_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_cm_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_cm_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_cm_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_cm_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_cm_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_cm_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_cm_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_cm_filename =~ /RECID/)
{
$temp_parallel_rec_cm_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_cm_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE PARALLEL CM STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
if ($stereo_parallel_recording =~ /FULL-RECORDING/)
{
$temp_parallel_rec_fr_filename = "FR".$stereo_rec_filename;
if (length($parallel_rec_fr_filename) > 0)
{
$temp_parallel_rec_fr_filename = $parallel_rec_fr_filename;
$temp_parallel_rec_fr_filename =~ s/CAMPAIGN/$log_campaign/gi;
$temp_parallel_rec_fr_filename =~ s/INGROUP/$channel_group/gi;
$temp_parallel_rec_fr_filename =~ s/CUSTPHONE/$phone_number/gi;
$temp_parallel_rec_fr_filename =~ s/FULLDATE/$recdate/gi;
$temp_parallel_rec_fr_filename =~ s/TINYDATE/$tinydate/gi;
$temp_parallel_rec_fr_filename =~ s/EPOCH/$now_date_epoch/gi;
$temp_parallel_rec_fr_filename =~ s/AGENT/$VDADuser/gi;
$temp_parallel_rec_fr_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$temp_parallel_rec_fr_filename =~ s/LEADID/$insert_lead_id/gi;
$temp_parallel_rec_fr_filename =~ s/CALLID/$callerid/gi;
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_fr_filename =~ /RECID/)
{
$temp_parallel_rec_fr_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_fr_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE PARALLEL FR STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
# insert logs for agent-controlled stereo call recordings while parallel recordings are enabled
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
$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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($temp_parallel_rec_ag_filename =~ /RECID/)
{
$temp_parallel_rec_ag_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$temp_parallel_rec_ag_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
### 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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- REMOTE PARALLEL AG STEREO RECORDING LOG INSERT : |$SRaffected_rows|$recording_id|$parallel_recording_id|$affected_rowsB|$rLIVEaffected_rows|$stmtA|"; &agi_output;}
}
}
else
{
## Start NON-parallel stereo call recording ##
if ($stereo_recording_agent =~ /ALLCALLS|ALLFORCE/)
{
# 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')";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
}
$sthA->finish();
if ($stereo_rec_filename =~ /RECID/)
{
$stereo_rec_filename =~ s/RECID/$recording_id/gi;
$stmtA = "UPDATE recording_log SET filename='$stereo_rec_filename' where recording_id='$recording_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
}
$retval_stop = $AGI->exec("StopMixMonitor","");
$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');";
$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');";
$rLIVEaffected_rows = $dbhA->do($stmtD);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$rLIVEaffected_rows; &mysql_error_logging;
$mLIVEaffected_rows=0;
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','','','','','','');";
$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','','','','','','');";
$mLIVEaffected_rows = $dbhA->do($stmtE);
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$mLIVEaffected_rows; &mysql_error_logging;
}
if ($AGILOG) {$agi_string = "-- REMOTE AGENT STEREO RECORDING STARTED : |$retval|$retval_stop|$SRaffected_rows|$recording_id|$affected_rowsB|$rLIVEaffected_rows|$mLIVEaffected_rows|$stmtA|"; &agi_output;}
}
}
}
}
File diff suppressed because it is too large Load Diff
+100 -1
View File
@@ -20,7 +20,7 @@
# Based on perl scripts in ViciDial from Matt Florell and post:
# http://www.vicidial.org/VICIDIALforum/viewtopic.php?p=22506&sid=ca5347cffa6f6382f56ce3db9fb3d068#22506
#
# Copyright (C) 2024 I. Taushanov, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 I. Taushanov, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 90615-1701 - First version
@@ -73,6 +73,7 @@
# 231126-2227 - Added vicidial_hci_log archiving
# 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
#
$CALC_TEST=0;
@@ -4037,6 +4038,104 @@ if (!$T)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
##### recording_log_stereo
$stmtA = "SELECT count(*) from recording_log_stereo;";
$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_log_stereo_count = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) from recording_log_stereo_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_log_stereo_archive_count = $aryA[0];
}
$sthA->finish();
if (!$Q) {print "\nProcessing recording_log_stereo table... ($recording_log_stereo_count|$recording_log_stereo_archive_count)\n";}
$stmtA = "INSERT IGNORE INTO recording_log_stereo_archive SELECT * from recording_log_stereo;";
$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_log_stereo_archive table \n";}
$rv = $sthA->err();
if (!$rv)
{
$stmtA = "DELETE FROM recording_log_stereo 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_log_stereo table \n";}
$stmtA = "optimize table recording_log_stereo;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$stmtA = "optimize table recording_log_stereo_archive;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
##### recording_log_parallel
$stmtA = "SELECT count(*) from recording_log_parallel;";
$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_log_parallel_count = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) from recording_log_parallel_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_log_parallel_archive_count = $aryA[0];
}
$sthA->finish();
if (!$Q) {print "\nProcessing recording_log_parallel table... ($recording_log_parallel_count|$recording_log_parallel_archive_count)\n";}
$stmtA = "INSERT IGNORE INTO recording_log_parallel_archive SELECT * from recording_log_parallel;";
$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_log_parallel_archive table \n";}
$rv = $sthA->err();
if (!$rv)
{
$stmtA = "DELETE FROM recording_log_parallel 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_log_parallel table \n";}
$stmtA = "optimize table recording_log_parallel;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$stmtA = "optimize table recording_log_parallel_archive;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
}
}
+52 -2
View File
@@ -173,9 +173,10 @@
# 240401-1810 - Added purging of vicidial_pending_ar records older than 7 days
# 240420-2209 - Added Conference Updater option
# 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
#
$build = '250103-0932';
$build = '250914-1601';
$DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -444,6 +445,8 @@ foreach(@conf)
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARactive_keepalives/) && ($CLIactive_keepalives < 1) )
{$VARactive_keepalives = $line; $VARactive_keepalives =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
@@ -496,7 +499,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 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;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -528,6 +531,8 @@ if ($sthArows > 0)
$SSweekday_resets = $aryA[21];
$SShighest_lead_id = $aryA[22];
$SShopper_hold_inserts = $aryA[23];
$SSstereo_recording = $aryA[24];
$SSstereo_parallel_recording = $aryA[25];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
@@ -1216,6 +1221,36 @@ if ($timeclock_end_of_day_NOW > 0)
}
if ($teodDB) {$event_string = "Empty $vicidial_conf_table entries cleared: $conf_cleared"; &teod_logger;}
### If stereo parallel recording is enabled on this system, delete parallel source files over 3 days old every night
if ( ($SSstereo_recording > 0) && ($SSstereo_parallel_recording > 0) )
{
### find 'find' to gather the list of files to delete
$findbin = '';
if ( -e ('/usr/bin/find')) {$findbin = '/usr/bin/find';}
else
{
if ( -e ('/bin/find')) {$findbin = '/bin/find';}
else
{
if ( -e ('/usr/sbin/find')) {$findbin = '/usr/sbin/find';}
else
{
if ($DB) {print "Can't find -find- binary! No file deletions will be possible...\n";}
}
}
}
$PATHmonitorTRASH = $PATHmonitor.'TRASH';
$now_epoch = int(time());
# command to trigger old stereo parallel source file deletion:
$parallel_delete_command = "$findbin $PATHmonitorTRASH -maxdepth 2 -type f -mtime +3 | xargs rm -f ";
if (!$Q) {print "Triggering old Parallel source recording file deletion... |$parallel_delete_command| \n";}
`/usr/bin/screen -d -m -S PD$reset_test $parallel_delete_command `;
$end_epoch = int(time());
$run_length = ($end_epoch - $now_epoch);
if (!$Q) {print " Parallel source recording file deletion complete ($run_length sec) \n";}
if ($teodDB) {$event_string = "Old Parallel source recording file deletion complete ($run_length sec): $parallel_delete_command"; &teod_logger;}
}
### Only run the following on one server in the cluster, the one set as the active voicemail server ###
if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) )
@@ -2308,6 +2343,21 @@ if ($timeclock_end_of_day_NOW > 0)
##### END vicidial_lead_24hour_calls end of day process removing records older than 1 day #####
##### BEGIN recording_live_log end of day process removing records older than 7 days #####
$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 #####
##### START latency log summary log inserts
##### gather vicidial_agent_latency_log #####
+84 -4
View File
@@ -15,8 +15,8 @@
# ### recording mixing/compressing/ftping scripts
##0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl
# 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --GSM
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --GSM
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3
#
# make sure that the following directories exist:
# /var/spool/asterisk/monitor # default Asterisk recording directory
@@ -36,6 +36,7 @@
# 190311-0105 - Added code to check for agent-muted recordings
# 231019-2202 - Changed sleep time between directory scans from 5 to 15 seconds
# 250430-0850 - Added --POST options for skipping over recordings for leads with active calls, and using logs for statuss
# 250909-0845 - Added trigger for stereo recording script, if enabled and raw audio files present
#
$HTTPS=0;
@@ -227,14 +228,16 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
##### Get the settings from system_settings #####
$SSmute_recordings=0;
$stmtA = "SELECT mute_recordings FROM system_settings;";
$stmtA = "SELECT mute_recordings,stereo_recording,stereo_parallel_recording 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;
$SSmute_recordings = $aryA[0];
$SSmute_recordings = $aryA[0];
$SSstereo_recording = $aryA[1];
$SSstereo_parallel_recording = $aryA[2];
}
$sthA->finish();
@@ -268,6 +271,22 @@ else
}
}
# time variable definitions
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
$wtoday = $wday;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$dateint = "$year$mon$mday$hour$min$sec";
$today_start = "$year-$mon-$mday 00:00:00";
$today_date = "$year-$mon-$mday";
$hm = "$hour$min";
### directory where in/out recordings are saved to by Asterisk
$dir1 = "$PATHmonitor";
$dir2 = "$PATHDONEmonitor";
@@ -660,6 +679,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";
### sleep for twenty hundredths of a second to not flood the server with disk activity
usleep(1*200*1000);
@@ -687,6 +710,63 @@ if($DBX)
print "Run time: $run_length seconds \n";
}
if ($SSstereo_recording > 0)
{
$PATHmonitorS = $PATHmonitor.'S';
$PATHmonitorP = $PATHmonitor.'P';
if($DBX)
{print "Checking for Stereo Call Recordings in $PATHmonitorS \n";}
opendir(sFILE, "$PATHmonitorS/");
@sFILES = readdir(sFILE);
### Loop through files first to gather filesizes
$trigger_stereo=0;
$i=0;
foreach(@sFILES)
{
if ( (length($sFILES[$i]) > 4) && (!-d "$dir1/$sFILES[$i]") && ($sFILES[$i] =~ /\.wav$/i) )
{
$trigger_stereo++;
if ($DBX) {print "Stereo file found! $sFILES[$i] \n";}
last;
}
$i++;
}
if ( ($SSstereo_parallel_recording > 0) && ($trigger_stereo < 1) )
{
if($DBX)
{print "Checking for Stereo Parallel Call Recordings in $PATHmonitorP \n";}
opendir(pFILE, "$PATHmonitorP/");
@pFILES = readdir(pFILE);
### Loop through files first to gather filesizes
$trigger_stereo=0;
$i=0;
foreach(@pFILES)
{
if ( (length($pFILES[$i]) > 4) && (!-d "$dir1/$pFILES[$i]") && ($pFILES[$i] =~ /\.wav$/i) )
{
$trigger_stereo++;
if ($DBX) {print "Stereo Parallel file found! $pFILES[$i] \n";}
last;
}
$i++;
}
}
if ($trigger_stereo > 0)
{
# command to trigger stereo call file processing, preserving flags from this script:
$stereo_command = "$PATHhome/AST_CRON_audio_1_stereo.pl $args ";
if ($DBX) {print "Triggering Stereo call file processing... |$stereo_command| \n";}
`/usr/bin/screen -d -m -S SP$hm $stereo_command `;
}
}
if ($DB) {print "DONE... EXITING\n\n";}
$sthA->finish();
+2 -2
View File
@@ -14,8 +14,8 @@
# ### recording mixing/compressing/ftping scripts
# 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl --MIX
##0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --GSM
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --GSM
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3
#
# make sure that the following directories exist:
# /var/spool/asterisk/monitor # default Asterisk recording directory
+970
View File
@@ -0,0 +1,970 @@
#!/usr/bin/perl
#
# AST_CRON_audio_1_stereo.pl
#
# This is a STEP-1 program in the audio archival process
#
# IMPORTANT!!! ONLY TO BE USED WHEN STEREO VICIDIAL CALL RECORDINGS ARE ON THE SYSTEM!
#
# runs every 3 minutes if there are stereo call recording files to process.
# Processes audio and moves to other directories for further processing.
#
# Do NOT put this script in the crontab! It is launched as needed by the
# "AST_CRON_audio_1_move_VDonly.pl" script, which should be run every 3 minutes
#
# make sure that the following directories exist:
# /var/spool/asterisk/monitorS # default Asterisk stereo recording directory
# /var/spool/asterisk/monitorP # default Asterisk stereo parallel recording directory
# /var/spool/asterisk/monitorTRASH # where the used parallel files are put
# /var/spool/asterisk/monitorDONE # where the mixed -all files are put
# /var/spool/asterisk/monitor/ORIG # where the original -in and -out files are put
#
# This program assumes that recordings are saved by Asterisk as .wav
#
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# 250909-0955 - First Build
#
$HTTPS=0;
$status_post_logs=0;
$delay_post_live=0;
$ignore_parallel=0;
$now_epoch = int(time());
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
$i++;
}
if ($args =~ /--help/i)
{
print "allowed run time options:\n";
print " [--help] = this screen\n";
print " [--quiet] = suppress output, if possible\n";
print " [--debug] = debug\n";
print " [--debugX] = super debug\n";
print " [--test] = test\n";
print " [--ignore-parallel] = do not process parallel stereo recordings\n";
print " [--HTTPS] = use https instead of http in local location\n";
print " [--POST] = post call variable filename replacement, MUST define STATUS and CAMP below\n";
print " [--STATUS-POST=X] = only run post call variable filename replacement on specific status calls\n";
print " If multiple statuses, use --- delimiting, i.e.: SALE---PRESALE\n";
print " For status wildcards, use * flag, i.e.: S* to match SALE and SQUAL\n";
print " For all statuses, use ----ALL----\n";
print " \n";
print " [--CAMP-POST=X] = only run post call variable filename replacement on specific campaigns or ingroups\n";
print " If multiple campaigns or ingroups, use --- delimiting, i.e.: TESTCAMP---TEST_IN2\n";
print " For all calls, use ----ALL----\n";
print " [--CLEAR-POST-NO-MATCH] = clear POST filename variables if no match is found\n";
print " [--STATUS-POST-LOGS] = use the call logs for POST filename status variable, if found\n";
print " [--DELAY-POST-LIVE-CALLS] = delay processing of recordings using POST filename variables if any live calls/agents for lead\n";
print "\n";
exit;
}
else
{
if ($args =~ /--quiet/)
{
$q=1;
}
if ($args =~ /--debug/i)
{
$DB=1;
print "\n----- DEBUG -----\n\n";
}
if ($args =~ /--debugX/i)
{
$DBX=1;
print "\n----- SUPER DEBUG -----\n\n";
}
if ($args =~ /--test/)
{
$T=1; $TEST=1;
if ($q < 1) {print "\n-----TESTING -----\n\n";}
}
if ($args =~ /--ignore-parallel/)
{
$ignore_parallel=1;
if ($q < 1) {print "\n----- IGNORING PARALLEL CALL RECORDINGS -----\n\n";}
}
if ($args =~ /--HTTPS/i)
{
$HTTPS=1;
if ($DB) {print "HTTPS location option enabled\n";}
}
if ($args =~ /--POST/i)
{
$POST=1;
if ($DB) {print "POST post call variable filename replacement\n";}
if ($args =~ /--STATUS-POST=/i)
{
@data_in = split(/--STATUS-POST=/,$args);
$status_post = $data_in[1];
$status_post =~ s/ .*//gi;
if ($q < 1) {print "\n----- STATUS POST SET: $status_post -----\n\n";}
}
else
{
$POST=0;
if ($q < 1) {print "\n----- POST disabled, no status set -----\n\n";}
}
if ($args =~ /--CAMP-POST=/i)
{
@data_in = split(/--CAMP-POST=/,$args);
$camp_post = $data_in[1];
$camp_post =~ s/ .*//gi;
if ($q < 1) {print "\n----- CAMP POST SET: $camp_post -----\n\n";}
}
else
{
$POST=0;
if ($q < 1) {print "\n----- POST disabled, no campaigns set -----\n\n";}
}
if ($args =~ /--STATUS-POST-LOGS/i)
{
$status_post_logs=1;
if ($q < 1) {print "\n----- STATUS POST LOGS SET: $status_post_logs -----\n\n";}
}
if ($args =~ /--DELAY-POST-LIVE-CALLS/i)
{
$delay_post_live=1;
if ($q < 1) {print "\n----- DELAY POST LIVE SET: $delay_post_live -----\n\n";}
}
}
if ($args =~ /--CLEAR-POST-NO-MATCH/i)
{
$CLEAR_POST=1;
if ($DB) {print "--- CLEAR-POST-NO-MATCH ENABLED ---\n";}
}
}
if ( ($POST > 0) && ( (length($camp_post) < 1) || (length($status_post) < 1) ) )
{
$POST=0;
if ($q < 1) {print "\n----- POST disabled, status or campaign invalid: |$camp_post|$status_post| -----\n\n";}
}
}
else
{
#print "no command line options set\n";
}
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^PATHDONEmonitor/) && ($CLIDONEmonitor < 1) )
{$PATHDONEmonitor = $line; $PATHDONEmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_host/) && ($CLIFTP_host < 1) )
{$VARFTP_host = $line; $VARFTP_host =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_user/) && ($CLIFTP_user < 1) )
{$VARFTP_user = $line; $VARFTP_user =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_pass/) && ($CLIFTP_pass < 1) )
{$VARFTP_pass = $line; $VARFTP_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_port/) && ($CLIFTP_port < 1) )
{$VARFTP_port = $line; $VARFTP_port =~ s/.*=//gi;}
if ( ($line =~ /^VARFTP_dir/) && ($CLIFTP_dir < 1) )
{$VARFTP_dir = $line; $VARFTP_dir =~ s/.*=//gi;}
if ( ($line =~ /^VARHTTP_path/) && ($CLIHTTP_path < 1) )
{$VARHTTP_path = $line; $VARHTTP_path =~ s/.*=//gi;}
$i++;
}
# Customized Variables
$server_ip = $VARserver_ip; # Asterisk server IP
if (!$VARDB_port) {$VARDB_port='3306';}
use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second
use DBI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
##### Get the settings from system_settings #####
$SSmute_recordings=0;
$stmtA = "SELECT mute_recordings,stereo_recording,stereo_parallel_recording 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;
$SSmute_recordings = $aryA[0];
$SSstereo_recording = $aryA[1];
$SSstereo_parallel_recording = $aryA[2];
}
$sthA->finish();
##### Get the settings from servers #####
$vicidial_recording_limit=0;
$stmtA = "SELECT vicidial_recording_limit FROM servers where 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;
$vicidial_recording_limit = $aryA[0];
$start_epoch_test = ($now_epoch - ( ($vicidial_recording_limit * 2) * 60) );
}
$sthA->finish();
# calculate server recording limit time, plus 60 minutes
($Rsec,$Rmin,$Rhour,$Rmday,$Rmon,$Ryear,$Rwday,$Ryday,$Risdst) = localtime(time() - (($vicidial_recording_limit + 60) * 60));
$Ryear = ($Ryear + 1900);
$Ryy = $Ryear; $Ryy =~ s/^..//gi;
$Rmon++;
if ($Rmon < 10) {$Rmon = "0$Rmon";}
if ($Rmday < 10) {$Rmday = "0$Rmday";}
if ($Rhour < 10) {$Rhour = "0$Rhour";}
if ($Rmin < 10) {$Rmin = "0$Rmin";}
if ($Rsec < 10) {$Rsec = "0$Rsec";}
$SQLdate_REC_limit="$Ryear-$Rmon-$Rmday $Rhour:$Rmin:$Rsec";
### find soxmix or sox to do the mixing
$soxbin = '';
if ( -e ('/usr/bin/sox')) {$soxbin = '/usr/bin/sox';}
else
{
if ( -e ('/usr/local/bin/sox')) {$soxbin = '/usr/local/bin/sox';}
else
{
print "Can't find sox binary! Exiting...\n";
exit;
}
}
### find soxi to gather the length info if needed
$soxibin = '';
if ( -e ('/usr/bin/soxi')) {$soxibin = '/usr/bin/soxi';}
else
{
if ( -e ('/usr/local/bin/soxi')) {$soxibin = '/usr/local/bin/soxi';}
else
{
if ( -e ('/usr/sbin/soxi')) {$soxibin = '/usr/sbin/soxi';}
else
{
if ($DB) {print "Can't find soxi binary! No length calculations will be available...\n";}
}
}
}
if ($SSstereo_recording < 1)
{
if ($DB) {print "Stereo Call Recording is disabled on this system, exiting... |$SSstereo_recording| \n";}
exit;
}
### directory where in/out recordings are saved to by Asterisk
$dir1 = $PATHmonitor.'S';
$dir2 = "$PATHDONEmonitor";
$PATHmonitorP = $PATHmonitor.'P';
$PATHmonitorTRASH = $PATHmonitor.'TRASH';
####################################################
##### BEGIN parallel call recording processing #####
####################################################
if ( ($ignore_parallel < 1) && ($SSstereo_parallel_recording > 0) )
{
if (!-e "$PATHmonitorTRASH/one-sec-silence.wav")
{
# generate 1 second silence file, to be used to create stereo files with only one side having audio
`$soxbin -n -c 1 -r 8k -b 16 "$PATHmonitorTRASH/one-sec-silence.wav" synth 1 sine 0`;
if($DBX){print "Created one-sec-silence.wav audio file. \n";}
}
opendir(pFILE, "$PATHmonitorP/");
@pFILES = readdir(pFILE);
### Loop through files first to gather filesizes
$parallel_files_ct=0;
$i=0;
foreach(@pFILES)
{
$pFILEsize1[$i] = 0;
if ( (length($pFILES[$i]) > 4) && (!-d "$PATHmonitorP/$pFILES[$i]") )
{
$parallel_files_ct++;
$pFILEsize1[$i] = (-s "$PATHmonitorP/$pFILES[$i]");
if ($DBX) {print "$parallel_files_ct $pFILES[$i] $pFILEsize1[$i]\n";}
}
$i++;
}
if ($parallel_files_ct < 1)
{
if ($DBX) {print "No parallel files found to process: $parallel_files_ct \n";}
}
else
{
sleep(15);
### Loop through files a second time to gather filesizes again 5 seconds later
$i=0;
$active_recordings=0;
$delay_ct=0;
$processed_ct=0;
$stereo_rec_made=0;
foreach(@pFILES)
{
$lead_id=0;
$vicidial_id='';
$pFILEsize2[$i] = 0;
if ( (length($pFILES[$i]) > 4) && (!-d "$PATHmonitorP/$pFILES[$i]") )
{
$pFILEsize2[$i] = (-s "$PATHmonitorP/$pFILES[$i]");
if ($DBX) {print "$pFILES[$i] $pFILEsize2[$i]\n\n";}
if ( ($pFILES[$i] !~ /out\.wav|out\.gsm|lost\+found/i) && ($pFILEsize1[$i] eq $pFILEsize2[$i]) && (length($pFILES[$i]) > 4))
{
$process_recording=0;
$INfile = $pFILES[$i];
$OUTfile = $pFILES[$i];
$OUTfile =~ s/-in\.wav/-out.wav/gi;
$OUTfile =~ s/-in\.gsm/-out.gsm/gi;
$ALLfile = $pFILES[$i];
$ALLfile =~ s/-in\.wav/-all.wav/gi;
$ALLfile =~ s/-in\.gsm/-all.gsm/gi;
$SQLpFILE = $pFILES[$i];
$SQLpFILE =~ s/-in\.wav|-in\.gsm//gi;
$filenameSQL='';
$length_in_sec=0;
$rec_ended=0;
$start_epoch=0;
$stmtA = "SELECT parallel_recording_id,channel,length_in_sec,lead_id,vicidial_id,start_time,end_time,user,UNIX_TIMESTAMP(start_time),recording_status from recording_log_parallel where filename='$SQLpFILE' and server_ip='$server_ip' and start_time >= \"$SQLdate_REC_limit\" order by parallel_recording_id desc LIMIT 1;";
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;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$parallel_recording_id = $aryA[0];
$channel = $aryA[1];
$length_in_sec = $aryA[2];
$lead_id = $aryA[3];
$vicidial_id = $aryA[4];
$start_time = $aryA[5];
$end_time = $aryA[6];
$user = $aryA[7];
$start_epoch = $aryA[8];
$recording_status = $aryA[9];
if (length($end_time) > 15) {$rec_ended=1;}
$process_recording=1;
}
$sthA->finish();
# get the length of the file from soxi
@soxi_output = `$soxibin -D $PATHmonitorP/$pFILES[$i]`;
$soxi_sec = $soxi_output[0];
$soxi_sec =~ s/\..*|\n|\r| //gi;
### process the recording files
if ($process_recording > 0)
{
$stereo_rec_ids='Stereo Rec IDs:';
if ($DB) {print "|$parallel_recording_id|$length_in_sec($soxi_sec)|$INfile| \n";}
# Look for stereo recordings using this parallel_recording_id
$stmtA = "SELECT filename,lead_id,recording_id,options,start_time,end_time,UNIX_TIMESTAMP(start_time),UNIX_TIMESTAMP(end_time) FROM recording_log_stereo where start_time >= \"$SQLdate_REC_limit\" and parallel_recording_id='$parallel_recording_id' and server_ip='$server_ip' order by recording_id limit 10;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsRECS=$sthA->rows;
if ($DBX) {print "DEBUG: $sthArowsRECS|$stmtA|\n";}
$prc=0;
while ($sthArowsRECS > $prc)
{
@aryA = $sthA->fetchrow_array;
$PR_filenameIN[$prc] = $aryA[0]."-in.wav";
$PR_filenameOUT[$prc] = $aryA[0]."-out.wav";
$PR_lead_id[$prc] = $aryA[1];
$PR_recording_id[$prc] = $aryA[2];
$PR_options[$prc] = $aryA[3];
$PR_start_time[$prc] = $aryA[4];
$PR_end_time[$prc] = $aryA[5];
$PR_start_epoch[$prc] = $aryA[6];
$PR_end_epoch[$prc] = $aryA[7];
if ( ($PR_end_epoch[$prc] =~ /^NULL$/i) || ($PR_end_epoch[$prc] < 1000) || (length($PR_end_epoch[$prc]) < 4) )
{$PR_end_epoch[$prc] = ($start_epoch + $soxi_sec);}
$prc++;
}
$sthA->finish();
$prc=0;
while ($sthArowsRECS > $prc)
{
$stereo_file_processed=0;
if ($PR_options[$prc] =~ /AGENT-CONTROLLED/)
{
$temp_start_test = ($PR_start_epoch[$prc] - $start_epoch);
$temp_ac_length = ($PR_end_epoch[$prc] - $PR_start_epoch[$prc]);
$temp_length_test = ($soxi_sec - $temp_ac_length);
# if agent-controlled file is shorter than, or starts after parallel file, use sox to create shorter file matching start/stop
if ( ($temp_start_test > 2) || ($temp_length_test > 4) )
{
if ($PR_options[$prc] =~ /CUSTOMER_ONLY/)
{
# stereo recording is shorter than parallel recording, copy Left(-in/silence) and trim Right channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "$soxbin \"$PATHmonitorP/$OUTfile\" \"$dir1/$PR_filenameOUT[$prc]\" trim $temp_start_test $temp_ac_length";
$stereo_file_processed++;
}
if ($PR_options[$prc] =~ /CUSTOMER_MUTE/)
{
# stereo recording is shorter than parallel recording, trim Left and copy Right(-out/silence) channels to stereo mixing directory
$mix_commandA = "$soxbin \"$PATHmonitorP/$INfile\" \"$dir1/$PR_filenameIN[$prc]\" trim $temp_start_test $temp_ac_length";
$mix_commandB = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ( ($stereo_file_processed < 1) || ($PR_options[$prc] =~ /BOTH_CHANNELS/) )
{
# stereo recording is shorter than parallel recording, merge Left and Right channels into a single Stereo WAV audio file
$mix_commandA = "$soxbin \"$PATHmonitorP/$INfile\" \"$dir1/$PR_filenameIN[$prc]\" trim $temp_start_test $temp_ac_length";
$mix_commandB = "$soxbin \"$PATHmonitorP/$OUTfile\" \"$dir1/$PR_filenameOUT[$prc]\" trim $temp_start_test $temp_ac_length";
$stereo_file_processed++;
}
}
else
{
if ($PR_options[$prc] =~ /CUSTOMER_ONLY/)
{
# stereo recording is same length as parallel recording, copy Left(-in/silence) and Right channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorP/$OUTfile $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ($PR_options[$prc] =~ /CUSTOMER_MUTE/)
{
# stereo recording is same length as parallel recording, copy Left and Right(-out/silence) channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorP/$INfile $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ( ($stereo_file_processed < 1) || ($PR_options[$prc] =~ /BOTH_CHANNELS/) )
{
# stereo recording is same length as parallel recording, copy Left and Right channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorP/$INfile $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorP/$OUTfile $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
}
}
if ( ($PR_options[$prc] =~ /CUSTOMER-ONLY/) && ($stereo_file_processed < 1) )
{
# stereo recording is same length as parallel recording, copy Left(-in/silence) and Right channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorP/$OUTfile $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ( ($PR_options[$prc] =~ /CUSTOMER-MUTED/) && ($stereo_file_processed < 1) )
{
# stereo recording is same length as parallel recording, copy Left and Right(-out/silence) channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorP/$INfile $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorTRASH/one-sec-silence.wav $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ( ($PR_options[$prc] =~ /FULL-RECORDING/) && ($stereo_file_processed < 1) )
{
# stereo recording is same length as parallel recording, copy Left and Right channels to stereo mixing directory
$mix_commandA = "cp -f $PATHmonitorP/$INfile $dir1/$PR_filenameIN[$prc]";
$mix_commandB = "cp -f $PATHmonitorP/$OUTfile $dir1/$PR_filenameOUT[$prc]";
$stereo_file_processed++;
}
if ($stereo_file_processed > 0)
{
`$mix_commandA`;
`$mix_commandB`;
$stereo_rec_made++;
$stereo_rec_ids .= " $PR_recording_id[$prc]";
if($DBX){print "Copy commands run: |$stereo_rec_made|$prc|$mix_commandA|$mix_commandB|\n";}
}
else
{
if($DBX){print "ERROR, file cannot be processed: |$prc|$parallel_recording_id|$PR_recording_id[$prc]|$PR_filename[$prc]|\n";}
}
$prc++;
}
if (!$T)
{
`mv -f "$PATHmonitorP/$INfile" "$PATHmonitorTRASH/$INfile"`;
`mv -f "$PATHmonitorP/$OUTfile" "$PATHmonitorTRASH/$OUTfile"`;
}
$lengthSQL='';
if ( ( ($length_in_sec < 1) || ($length_in_sec =~ /^NULL$/i) || (length($length_in_sec)<1) ) && (length($soxibin) > 3) )
{
$lengthSQL = ",length_in_sec='$soxi_sec'";
}
$stmtA = "UPDATE recording_log_parallel set recording_status='PROCESSED', processing_log=CONCAT(processing_log,' $stereo_rec_ids') $lengthSQL where parallel_recording_id='$parallel_recording_id';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
### sleep for twenty hundredths of a second to not flood the server with disk activity
usleep(1*200*1000);
$processed_ct++;
}
}
else
{$active_recordings++;}
}
$i++;
}
if($DBX)
{
$end_epoch = int(time());
$run_length = ($end_epoch - $now_epoch);
print "\nPARALLEL RECORDING Debug output:\n";
print "Total parallel files: $i \n";
print " Active recordings: $active_recordings \n";
print " Processed files: $processed_ct \n";
print " Stereo files made: $stereo_rec_made \n";
print "\n";
print "Run time: $run_length seconds \n";
}
}
}
##################################################
##### END parallel call recording processing #####
##################################################
##################################################
##### BEGIN stereo call recording processing #####
##################################################
opendir(FILE, "$dir1/");
@FILES = readdir(FILE);
### Loop through files first to gather filesizes
$i=0;
foreach(@FILES)
{
$FILEsize1[$i] = 0;
if ( (length($FILES[$i]) > 4) && (!-d "$dir1/$FILES[$i]") )
{
$FILEsize1[$i] = (-s "$dir1/$FILES[$i]");
if ($DBX) {print "$FILES[$i] $FILEsize1[$i]\n";}
}
$i++;
}
sleep(15);
### Loop through files a second time to gather filesizes again 5 seconds later
$i=0;
$active_recordings=0;
$delay_ct=0;
$processed_ct=0;
$post_status_change_ct=0;
foreach(@FILES)
{
$lead_id=0;
$vicidial_id='';
$FILEsize2[$i] = 0;
if ( (length($FILES[$i]) > 4) && (!-d "$dir1/$FILES[$i]") )
{
$FILEsize2[$i] = (-s "$dir1/$FILES[$i]");
if ($DBX) {print "$FILES[$i] $FILEsize2[$i]\n\n";}
if ( ($FILES[$i] !~ /out\.wav|out\.gsm|lost\+found/i) && ($FILEsize1[$i] eq $FILEsize2[$i]) && (length($FILES[$i]) > 4))
{
$INfile = $FILES[$i];
$OUTfile = $FILES[$i];
$OUTfile =~ s/-in\.wav/-out.wav/gi;
$OUTfile =~ s/-in\.gsm/-out.gsm/gi;
$ALLfile = $FILES[$i];
$ALLfile =~ s/-in\.wav/-all.wav/gi;
$ALLfile =~ s/-in\.gsm/-all.gsm/gi;
$SQLFILE = $FILES[$i];
$SQLFILE =~ s/-in\.wav|-in\.gsm//gi;
$filenameSQL='';
$length_in_sec=0;
$rec_ended=0;
$start_epoch=0;
$stmtA = "SELECT recording_id,length_in_sec,lead_id,vicidial_id,start_time,end_time,user,UNIX_TIMESTAMP(start_time) from recording_log where filename='$SQLFILE' order by recording_id desc LIMIT 1;";
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;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$recording_id = $aryA[0];
$length_in_sec = $aryA[1];
$lead_id = $aryA[2];
$vicidial_id = $aryA[3];
$start_time = $aryA[4];
$end_time = $aryA[5];
$user = $aryA[6];
$start_epoch = $aryA[7];
if (length($end_time) > 15) {$rec_ended=1;}
}
$sthA->finish();
$process_recording=1;
### this is where code for agent-muted recordings went, if found then delay processing(not available for stereo call recordings)
### check for POST variables, and delay setting
if ( ($delay_post_live > 0) && ($POST > 0) && ($ALLfile =~ /POSTVLC|POSTSP|POSTADDR3|POSTSTATUS/) )
{
if ($lead_id > 0)
{
$VLA_count=0;
$VAC_count=0;
if ( ($start_epoch > 0) && ($start_epoch < $start_epoch_test) )
{
if ($DBX > 0) {print "DEBUG6: delay processing past server limit, process now: ($start_epoch|$start_epoch_test) |$SQLFILE|ended: $rec_ended|\n";}
}
else
{
if ($DBX > 0) {print "DEBUG7: delay processing not past server limit yet: ($start_epoch|$start_epoch_test) |$SQLFILE|ended: $rec_ended|\n";}
### check if any live agents are connected to this lead_id right now
$stmtA = "SELECT count(*) from vicidial_live_agents where lead_id='$lead_id';";
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;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VLA_count = $aryA[0];
}
$sthA->finish();
### check if any live calls are tied to this lead_id right now
$stmtA = "SELECT count(*) from vicidial_auto_calls where lead_id='$lead_id';";
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;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VAC_count = $aryA[0];
}
$sthA->finish();
}
if ( ($VLA_count > 0) || ($VAC_count > 0) )
{
if ($DBX > 0) {print "DEBUG4: delay processing active, do not process: ($VLA_count|$VAC_count) |$SQLFILE|ended: $rec_ended|\n";}
$process_recording=0;
$delay_ct++;
}
else
{
if ($DBX > 0) {print "DEBUG5: delay processing - no calls or agents found, OK to process: ($VLA_count|$VAC_count) |$SQLFILE|ended: $rec_ended|\n";}
}
}
}
### process the recording files
if ($process_recording > 0)
{
if ($DB) {print "|$recording_id|$length_in_sec|$INfile| |$ALLfile|\n";}
# merge Left and Right channels into a single Stereo WAV audio file
`$soxbin -M "$dir1/$INfile" "$dir1/$OUTfile" "$dir2/$ALLfile"`;
if (!$T)
{
`mv -f "$dir1/$INfile" "$dir2/ORIG/$INfile"`;
`mv -f "$dir1/$OUTfile" "$dir2/ORIG/$OUTfile"`;
}
$lengthSQL='';
if ( ( ($length_in_sec < 1) || ($length_in_sec =~ /^NULL$/i) || (length($length_in_sec)<1) ) && (length($soxibin) > 3) )
{
@soxi_output = `$soxibin -D $dir2/$ALLfile`;
$soxi_sec = $soxi_output[0];
$soxi_sec =~ s/\..*|\n|\r| //gi;
$soxi_min = ($soxi_sec / 60);
$soxi_min = sprintf("%.2f", $soxi_min);
$lengthSQL = ",length_in_sec='$soxi_sec',length_in_min='$soxi_min'";
}
##### BEGIN post call variable replacement #####
if ($POST > 0)
{
if ($ALLfile =~ /POSTVLC|POSTSP|POSTADDR3|POSTSTATUS/)
{
$origALLfile = $ALLfile;
$origSQLFILE = $SQLFILE;
$vendor_lead_code=''; $security_phrase=''; $address3=''; $status='';
$status_ALL=0;
$camp_ALL=0;
$camp_status_selected=0;
if ($status_post =~ /----ALL----/)
{
$status_ALL++;
if($DBX){print "All Statuses: |$status_post|$status_ALL|\n";}
}
if ($camp_post =~ /----ALL----/)
{
$camp_ALL++;
if($DBX){print "All Campaigs and Ingroups: |$camp_post|$camp_ALL|\n";}
}
if ( ($camp_ALL < 1) || ($status_ALL < 1) )
{
$camp_postSQL='';
if ($camp_ALL < 1)
{
$camp_postSQL = $camp_post;
$camp_postSQL =~ s/---/','/gi;
$camp_postSQL = "and campaign_id IN('$camp_postSQL')";
}
if ($vicidial_id =~ /\./)
{
$log_lookupSQL = "SELECT status from vicidial_log where uniqueid='$vicidial_id' and lead_id='$lead_id' $camp_postSQL;";
}
else
{
$log_lookupSQL = "SELECT status from vicidial_closer_log where closecallid='$vicidial_id' and lead_id='$lead_id' $camp_postSQL;";
}
if($DBX){print STDERR "\n|$log_lookupSQL|\n";}
$sthA = $dbhA->prepare($log_lookupSQL) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $log_lookupSQL ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$lead_status = $aryA[0];
if ($status_ALL > 0)
{$camp_status_selected++;}
else
{
@status_vars = split(/---/,$status_post);
$fc=0;
foreach(@status_vars)
{
$status_temp = $status_vars[$fc];
if ($status_vars[$fc] =~ /\*/)
{
$status_temp =~ s/\*/.*/gi;
if ( ($lead_status =~ /^$status_temp/) && ($status_vars[$fc] =~ /\*$/) )
{$camp_status_selected++;}
if ( ($lead_status =~ /$status_temp$/) && ($status_vars[$fc] =~ /^\*/) )
{$camp_status_selected++;}
}
else
{
if ($lead_status =~ /^$status_temp$/)
{$camp_status_selected++;}
}
if ($DBX) {print " POST processing DEBUG: $fc|$status_temp|$lead_status|$lead_id|$vicidial_id|$ALLfile|\n";}
$fc++;
}
}
if ($DB) {print " POST processing SELECT: |$camp_status_selected|$sthArows|$camp_postSQL|$camp_ALL|$status_post|$status_ALL|$ALLfile|\n";}
}
else
{if ($DB) {print " POST processing ERROR: lead not found: |$lead_id|$ALLfile|\n";} }
$sthA->finish();
}
if ( ( ($camp_ALL > 0) && ($status_ALL > 0) ) || ($camp_status_selected > 0) )
{
$stmtA = "SELECT vendor_lead_code,security_phrase,address3,status from vicidial_list where lead_id='$lead_id' LIMIT 1;";
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;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$vendor_lead_code = $aryA[0];
$security_phrase = $aryA[1];
$address3 = $aryA[2];
$status = $aryA[3];
$vendor_lead_code =~ s/[^a-zA-Z0-9_-]//gi;
$security_phrase =~ s/[^a-zA-Z0-9_-]//gi;
$address3 =~ s/[^a-zA-Z0-9_-]//gi;
$status =~ s/[^a-zA-Z0-9_-]//gi;
}
else
{if ($DB) {print " POST processing ERROR: lead not found: |$lead_id|$ALLfile|\n";} }
$sthA->finish();
if ( ($status_post_logs > 0) && ($ALLfile =~ /POSTSTATUS/) )
{
$log_status = $status;
if ($vicidial_id =~ /\./)
{
$log_lookupSQL = "SELECT status from vicidial_log where uniqueid='$vicidial_id' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
}
else
{
$log_lookupSQL = "SELECT status from vicidial_closer_log where closecallid='$vicidial_id' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
}
if($DBX){print STDERR "\n|$log_lookupSQL|\n";}
$sthA = $dbhA->prepare($log_lookupSQL) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $log_lookupSQL ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$log_status = $aryA[0];
}
if ($log_status ne $status)
{$post_status_change_ct++;}
if ($DB) {print " POST processing Log status override: lead: |$status| log: |$log_status| $post_status_change_ct \n";}
$status = $log_status;
}
$ALLfile =~ s/POSTVLC/$vendor_lead_code/gi;
$ALLfile =~ s/POSTSP/$security_phrase/gi;
$ALLfile =~ s/POSTADDR3/$address3/gi;
$ALLfile =~ s/POSTSTATUS/$status/gi;
$SQLFILE =~ s/POSTVLC/$vendor_lead_code/gi;
$SQLFILE =~ s/POSTSP/$security_phrase/gi;
$SQLFILE =~ s/POSTADDR3/$address3/gi;
$SQLFILE =~ s/POSTSTATUS/$status/gi;
$filenameSQL = ",filename='$SQLFILE'";
`mv -f "$dir2/$origALLfile" "$dir2/$ALLfile"`;
if ($DB) {print " POST processing COMPLETE: old: |$origALLfile| new: |$ALLfile|\n";}
}
else
{
if ($DB) {print " POST processing SKIPPED: |$camp_ALL|$status_ALL|$camp_status_selected|$lead_id|$vicidial_id|$ALLfile|\n";}
if ($CLEAR_POST > 0)
{
$ALLfile =~ s/POSTVLC//gi;
$ALLfile =~ s/POSTSP//gi;
$ALLfile =~ s/POSTADDR3//gi;
$ALLfile =~ s/POSTSTATUS//gi;
$SQLFILE =~ s/POSTVLC//gi;
$SQLFILE =~ s/POSTSP//gi;
$SQLFILE =~ s/POSTADDR3//gi;
$SQLFILE =~ s/POSTSTATUS//gi;
$filenameSQL = ",filename='$SQLFILE'";
`mv -f "$dir2/$origALLfile" "$dir2/$ALLfile"`;
if ($DB) {print " CLEAR POST COMPLETE: old: |$origALLfile| new: |$ALLfile|\n";}
}
}
}
else
{if ($DB) {print " POST processing ERROR: No variables found: |$ALLfile|\n";} }
}
##### END post call variable replacement #####
$HTTP='http';
if ($HTTPS > 0) {$HTTP='https';}
$stmtA = "UPDATE recording_log set location='$HTTP://$server_ip/RECORDINGS/$ALLfile' $filenameSQL $lengthSQL where recording_id='$recording_id';";
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";
### sleep for twenty hundredths of a second to not flood the server with disk activity
usleep(1*200*1000);
$processed_ct++;
}
}
else
{$active_recordings++;}
}
$i++;
}
if($DBX)
{
$end_epoch = int(time());
$run_length = ($end_epoch - $now_epoch);
print "\nDebug output:\n";
print "Total files: $i \n";
print " Active recordings: $active_recordings \n";
print " Delayed processing: $delay_ct \n";
print " Processed files: $processed_ct \n";
print " POST log status diff: $post_status_change_ct \n";
print "\n";
print "Run time: $run_length seconds \n";
}
################################################
##### END stereo call recording processing #####
################################################
if ($DB) {print "DONE... EXITING\n\n";}
$sthA->finish();
$dbhA->disconnect();
exit;
+30 -4
View File
@@ -12,8 +12,8 @@
# ### recording mixing/compressing/ftping scripts
##0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl
# 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --GSM
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --GSM
# 1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
# 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3
#
# FLAGS FOR COMPRESSION CODECS
# --GSM = GSM 6.10 codec
@@ -28,7 +28,7 @@
#
# This program assumes that recordings are saved by Asterisk as .wav
#
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# 80302-1958 - First Build
@@ -40,6 +40,7 @@
# 170212-0732 - Added --file-sorting option to put files into dated directories (THIS WILL NOT ALLOW FTP ARCHIVING)
# 230201-0007 - Allowed for handling of stereo gateway recordings
# 240213-1146 - Added --GATEWAY option
# 250909-1030 - Added code to detect stereo audio files for MP3 stereo processing
#
$GSM=0; $MP3=0; $OGG=0; $GSW=0;
@@ -251,6 +252,22 @@ if ( ($GSM > 0) || ($OGG > 0) || ($GSW > 0) )
}
}
### find soxi to gather the length/channels info if needed
$soxibin = '';
if ( -e ('/usr/bin/soxi')) {$soxibin = '/usr/bin/soxi';}
else
{
if ( -e ('/usr/local/bin/soxi')) {$soxibin = '/usr/local/bin/soxi';}
else
{
if ( -e ('/usr/sbin/soxi')) {$soxibin = '/usr/sbin/soxi';}
else
{
if ($DB) {print "Can't find soxi binary! No length calculations will be available...\n";}
}
}
}
if ($MP3 > 0)
{
### find lame mp3 encoder binary to do the compression
@@ -381,9 +398,18 @@ foreach(@FILES)
$MP3file =~ s/-all\.wav/-all.mp3/gi;
$MP3file =~ s/\.wav|\.gsm/.mp3/gi;
$soxi_channels=1;
if (length($soxibin) > 3)
{
@soxi_output = `$soxibin -c $dir2/$ALLfile`;
$soxi_channels = $soxi_output[0];
$soxi_channels =~ s/\D//gi;
$soxi_channels = ($soxi_channels + 0);
}
if ($DB) {print "|$recording_id|$ALLfile|$dir2/$location$MP3file| |$SQLfile|\n";}
if ($GATEWAY > 0)
if ( ($GATEWAY > 0) || ($soxi_channels > 1) )
{
`$lamebin -b 16 -m s --silent "$dir2/$ALLfile" "$dir2/$location$MP3file"`;
}
+115 -3
View File
@@ -9,7 +9,7 @@
# !!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!
# THIS SCRIPT SHOULD ONLY BE RUN ON ONE SERVER ON YOUR CLUSTER
#
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 60717-1214 - changed to DBI by Marin Blu
@@ -36,6 +36,7 @@
# 231228-1901 - Added optimizing of vicidial_3way_press_multi records
# 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
#
$session_flush=0;
@@ -44,6 +45,7 @@ $reset_stuck_leads=0;
$stuck_lists='';
$stuck_listsSQL='';
$check_xfers=0;
$vicidial_recording_limit=60;
### begin parsing run-time options ###
if (length($ARGV[0])>1)
@@ -293,19 +295,32 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database
$stmtA = "SELECT vd_server_logs FROM servers where server_ip = '$VARserver_ip';";
$stmtA = "SELECT vd_server_logs,vicidial_recording_limit FROM servers where server_ip = '$VARserver_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;
$DBvd_server_logs = $aryA[0];
$DBvd_server_logs = $aryA[0];
$vicidial_recording_limit = $aryA[1];
if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';}
else {$SYSLOG = '0';}
}
$sthA->finish();
($Rsec,$Rmin,$Rhour,$Rmday,$Rmon,$Ryear,$Rwday,$Ryday,$Risdst) = localtime(time() - ($vicidial_recording_limit * 60));
$Ryear = ($Ryear + 1900);
$Ryy = $Ryear; $Ryy =~ s/^..//gi;
$Rmon++;
if ($Rmon < 10) {$Rmon = "0$Rmon";}
if ($Rmday < 10) {$Rmday = "0$Rmday";}
if ($Rhour < 10) {$Rhour = "0$Rhour";}
if ($Rmin < 10) {$Rmin = "0$Rmin";}
if ($Rsec < 10) {$Rsec = "0$Rsec";}
$SQLdate_REC_limit="$Ryear-$Rmon-$Rmday $Rhour:$Rmin:$Rsec";
### Grab system_settings values from the database
$stmtA = "SELECT sip_event_logging,enable_auto_reports FROM system_settings limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -1002,6 +1017,103 @@ if ($check_xfers > 0)
}
### BEGIN archive recording_live that are FINISHED ###
$rl_count=0;
$stmtA = "SELECT count(*) FROM recording_live;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsACTIVE=$sthA->rows;
if ($DBX) {print "DEBUG: $sthArowsACTIVE|$stmtA|\n";}
if ($sthArowsACTIVE > 0)
{
@aryA = $sthA->fetchrow_array;
$rl_count = $aryA[0];
}
$sthA->finish();
if ($rl_count > 0)
{
$stmtA = "INSERT IGNORE INTO recording_live_log SELECT * FROM recording_live where end_time <= \"$SQLdate_NOW\" and end_time IS NOT NULL and recording_status LIKE \"FINISHED%\";";
$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 table\n";}
if ($sthArows > 0)
{
$stmtA = "DELETE FROM recording_live where end_time <= \"$SQLdate_NOW\" and end_time IS NOT NULL and recording_status LIKE \"FINISHED%\";";
$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 table\n";}
}
### Gather older STARTED recording_live records from the database to confirm they are still active
$stmtA = "SELECT user,lead_id,recording_id FROM recording_live where start_time <= \"$SQLdate_REC_limit\" and recording_status='STARTED';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsRECS=$sthA->rows;
if ($DBX) {print "DEBUG: $sthArowsRECS|$stmtA|\n";}
$orc=0;
while ($sthArowsRECS > $orc)
{
@aryA = $sthA->fetchrow_array;
$OR_user[$orc] = $aryA[0];
$OR_lead_id[$orc] = $aryA[1];
$OR_recording_id[$orc] = $aryA[2];
$orc++;
}
$sthA->finish();
$orc=0;
while ($sthArowsRECS > $orc)
{
$al_count=0;
$stmtA = "SELECT count(*) FROM vicidial_live_agents where user='$OR_user[$orc]' and lead_id='$OR_lead_id[$orc]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsAGNT=$sthA->rows;
if ($DBX) {print "DEBUG: $sthArowsAGNT|$stmtA|\n";}
if ($sthArowsAGNT > 0)
{
@aryA = $sthA->fetchrow_array;
$al_count = $aryA[0];
}
$sthA->finish();
if ($al_count < 1)
{
$stmtA = "UPDATE recording_live SET recording_status='FINISHED CHECK' where recording_id='$OR_recording_id[$orc]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows = $sthA->rows;
if ($DBX) {print "$sthArows rows set to finished in recording_live table: |$OR_recording_id[$orc]|$OR_user[$orc]|$OR_lead_id[$orc]|\n";}
$stmtA = "INSERT IGNORE INTO recording_live_log SELECT * FROM recording_live where recording_id='$OR_recording_id[$orc]';";
$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 table: |$OR_recording_id[$orc]|$OR_user[$orc]|$OR_lead_id[$orc]|\n";}
$stmtA = "DELETE FROM recording_live where recording_id='$OR_recording_id[$orc]';";
$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";}
}
$orc++;
}
# optimize recording_live table
$stmtA = "optimize table recording_live;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthA->finish();
}
### END archive recording_live that are FINISHED ###
$dbhA->disconnect();
exit;
+41 -2
View File
@@ -1,4 +1,4 @@
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2024-06-24
AGENT API DOCUMENT Started: 2008-07-03 Updated: 2025-08-30
This document describes the functions of an API(Application Programming Interface)
for the VICIDIAL Agent screen. This functionality will be rather limited at first
@@ -30,6 +30,7 @@ transfer_conference - sends several commands related to the agent transfer-conf
park_call - sends command to park customer or grab customer from park or ivr
logout - logs the agent out of the agent interface
recording - sends a recording start/stop signal or status of agent recording
stereo_recording - send a start or stop stereo agent recording signal to agent screen
webserver - display webserver information, very useful for load balanced setups
webphone_url - display the webphone url for the current agent's session
call_agent - send a call to connect the agent to their session
@@ -772,7 +773,7 @@ VALUES:
START - sends a "start recording" signal to the agent screen
(you can have multiple recordings going at the same time)
STOP - sends a "stop recording" signal to the agent screen
(this will stop all active recordings onthe agent screen)
(this will stop all active recordings on the agent screen)
STATUS - displays results of active recording and agent session information
(returns: user|recording_id|filename|server|start_time|agent_server|session|agent_status)
stage -
@@ -798,6 +799,44 @@ NOTICE: recording active - 6666|121242|20120810-012008__6666_|192.168.1.5|2012-0
--------------------------------------------------------------------------------
stereo_recording -
DESCRIPTION:
sends a stereo_recording start/stop signal or status of agent-controlled stereo recording
VALUES:
value -
REQUIRED, choices are below
BEGIN - sends a "start stereo_recording" signal to the agent screen
(you cannot have multiple agent-controlled stereo_recordings going at the same time)
END - sends a "stop stereo_recording" signal to the agent screen
(this will stop all active agent-controlled stereo_recordings on the agent screen)
STATUS - displays results of active stereo_recording and agent session information (Only AGENT-CONTROLLED recordings)
(returns: user|recording_id|filename|server|start_time|agent_server|session|agent_status)
stage -
OPTIONAL, value to append to the stereo_recording filename, limited to 14 characters, if more it will truncate. Only works with BEGIN value
EXAMPLE URLS:
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=stereo_recording&value=BEGIN
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=stereo_recording&value=END
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=stereo_recording&value=STATUS
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=stereo_recording&value=BEGIN&stage=_MIDCALL
RESPONSES:
ERROR: no user found - 6666
ERROR: agent_user is not logged in - 6666
ERROR: stop stereo_recording error - 6666|||||192.168.1.5|8600051|PAUSED
SUCCESS: stereo_recording function sent - 6666|END||||192.168.1.5|8600051|PAUSED
SUCCESS: stereo_recording function sent - 6666|BEGIN||||192.168.1.5|8600051|PAUSED
SUCCESS: stereo_recording function sent - 6666|BEGIN_MIDCALL||||192.168.1.5|8600051|PAUSED
NOTICE: not stereo_recording - 6666|||||192.168.1.5|8600051|PAUSED
NOTICE: stereo_recording active - 6666|121242|20120810-012008__6666_|192.168.1.5|2012-08-10 01:20:10|192.168.1.5|8600051|PAUSED
--------------------------------------------------------------------------------
webphone_url -
+3 -2
View File
@@ -1,4 +1,4 @@
CALLER ID NAME CODES DOC Started: 2013-07-15 Updated: 2025-01-03
CALLER ID NAME CODES DOC Started: 2013-07-15 Updated: 2025-09-08
This document is meant for reference only, and it does not contain all CID name codes possible, but more will be added over time.
@@ -24,7 +24,8 @@ XLvdc - Agent Local Closer or ReQueue Call (XLvdcW13739431946666) [epoch + user.
XBvdc - Agent blind transfer (XBvdcW14528875091001100110011001) [epoch + user...]
AGMON - Remote Agent Monitor (AGMON715224918000001)
HLvdcW - Hangup of customer call from agent screen (HLvdcW1475524272tluc)
CH123456 - Hangup of all non-agent channels in meetme session(CH1234614755246080)
CH123456 - Hangup of all non-agent channels in meetme session(CH12345614755246080)
SH1234567 - Stop recording on customer channel(SH12345671475524608)
ULGC - Hangup of lone channel in left 3way session (ULGC0010420221616133)
ULGH - Clearing of left 3way session after server rec limit (ULGH0010420221618178)
ULAL - Clearing of agent session by AST_agent_logout.pl script
+368
View File
@@ -0,0 +1,368 @@
VICIDIAL STEREO CALL RECORDINGS Started: 2025-06-18 Updated: 2025-09-19
TO USE THESE FEATURES, YOU WILL NEED TO HAVE ALL SERVERS IN YOUR CLUSTER USING SVN/TRUNK REVISION 3940(2025-09-19) 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.
Stereo Call Recording is IN-ADDITION-TO the existing Legacy Mono Call Recording within VICIdial. Both can be active at the same time, and Stereo Call Recording is supplemental, not a replacement for Legacy Mono Call Recording.
This project has been broken down into 4 phases of development, since it is so large:
1) Additional agent-initiated stereo-recording(customer-channel on one side) On-Demand, with option to mute customer-channel only. Agent screen and Agent API functions.
***COMPLETE***
2) Campaign & in-Group settings for separate automatic whole-call stereo call recording with options for customer-only and customer-muted settings.
***COMPLETE***
3) Parallel stereo call recordings with customer on one side, agent & 3rd parties on other side, customer-only, customer-muted, agent-controlled start-stop of recording (this will be done as a post-call process).
***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***
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.
-------------------------------------------------------------------------------------------------
NOTES:
For Stereo Call Recordings to work properly, all Asterisk servers in your VICIdial cluster need to be running Asterisk 18 or higher and they need to all be using the CONFBRIDGE agent session conferencing engine. You will also need to run the "install.pl" script on each Asterisk server so the new stereo recording directories are created.
All Stereo Call Recordings will have "Customer on the Right and Agent(and 3rd-parties) on the Left". There may be some cases where more than one agent will be on a consultative 3-way conference call with the customer, and by necessity in these cases on the 2nd-agent-initiated stereo recording, the 1st agent will be with the customer on the Right channel while the 2nd agent is on the Left channel, but on the 1st agent recording(which is happening at the same time), the customer will be on the Right channel alone and the 1st and 2nd agent will both be on the Left channel together.
Stereo Call Recording is not going to replace the existing default mono call recording in VICIdial, it is "in-addition-to" the existing default mono call recording. This means that you can record calls in mono and stereo at the same time in separate recordings. This also means that additional system resources will be used on Stereo recording if the default Mono call recording is still enabled at the same time. One other note related to this: the 6 existing "3way" recording campaign settings and the agent-controlled "Mute Recording" campaign features will only affect the default Mono call recording, and not the new Stereo call recording. Also, each recording method has different "Recording Filename" fields, which cannot be the same, so that recordings won't be overwritten on archive servers or during call recording exports. If you have parallel recording enabled, there are also 3 additional optional "Recording Filename" fields. If these are left blank, then the Stereo Recording Filename will be used with a prefix added to it for each of the different types of parallel recording files.
If Parallel Stereo Call Recordings is enabled, then every call will be temporarily recorded in it's entirety(from when the agent receives it until it leaves the agent session), since this feature uses a post-call process to create the parallel recordings, there must be full call recordings available to create the separate parallel recordings from. After the post-call process finishes, the original full recordings will be marked for deletion. 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.
For In-groups, the "Stereo Recording" options do NOT default to inherit settings from whatever campaign the agent is logged into when a call arrives at the agent session(which is how default mono call recording works). If you want calls handled through an In-Group to be Stereo Recorded, then that In-Group needs to have those settings enabled.
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'.
-------------------------------------------------------------------------------------------------
DIFFERENCES BETWEEN LEGACY MONO CALL RECORDING AND THE NEW STEREO CALL RECORDING:
1. Stereo Call Recording is based upon the customer's bridged phone call channel, not the agent session like Legacy Mono Call Recording does. As such, Stereo Call Recording cannot start until the customer call is answered for outbound calls. This means that for manual-dial calls, the recording cannot start before the ringing of the call starts, like Legacy Mono Call Recording does, it will start after the Answer signal is detected and the call has been bridged.
2. The 6 existing "3way" recording campaign settings and the agent-controlled "Mute Recording" campaign features will only work with the default Mono call recording, and not the new Stereo call recording.
3. There are now up to 5 different Recording Filename fields for each campaign and in-group, all of these can be generated at the same time:
Mono Legacy, Agent-Controlled Stereo, Parallel Customer-Only Stereo, Parallel Customer-Muted Stereo, Parallel Full-Recording Stereo
4. In the Agent Screen, the new Stereo Recording buttons will appear directly below the legacy mono call recording buttons, but the stereo buttons will have a small Stereo logo on the left side of the buttons.
5. For In-groups, the "Stereo Recording" options do NOT default to inherit settings from whatever campaign the agent is logged into when a call arrives at the agent session(which is how default mono call recording works). If you want calls handled through an In-Group to be Stereo Recorded, then that In-Group needs to have those settings enabled.
6. With Parallel Stereo Call Recording, the recording is initiated on the back-end, with no agent visibility into the recordings, unlike with Legacy Mono Call Recording, which displays recording information on the agent screen.
7. In Stereo Recording call recordings, if an agent parks a customer, the recording will follow the customer and you will hear the park message on the stereo recording. With Mono Legacy Recordings, the recording follows the agent, so when a customer is parked, they are no longer heard on the legacy recording until the agent grabs the customer from park.
8. Stereo Call Recording files are each about double the file size of a single Legacy Mono Call Recording, and if you have all Stereo Recording options enabled, including the three Parallel call recording options, then the file recordings will take up eight times the amount of space total as a single Mono recording file.
9. In the Modify Lead Page, in the RECORDINGS FOR THIS LEAD section near the bottom, there is a new "STEREO" column that will indicate if a recording is in Stereo or not by the use of a code. If the STEREO field is blank, then the recording is a Mono Legacy Recording, and if the value in that column begins with "S", then that recording is in Stereo. The code used will explain what type of stereo recording it is, and it will be one of the codes listed in the "List of recording_log.extension values" section shown further down in this document.
-------------------------------------------------------------------------------------------------
EXAMPLE SETS OF REQUIREMENTS AND THE SETTINGS THAT NEED TO BE CONFIGURED ON VICIDIAL:
--------------------------------------------------------------------------------
EXAMPLE 1 REQUIREMENTS:
- Must record both sides of each entire customer call in a stereo recording
EXAMPLE 1 SETTINGS:
- System Settings -> Allow Stereo Recordings = '1'
- Campaign Detail -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'ALLFORCE'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
- In-Group Modify -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'ALLFORCE'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
NOTE: (For every Campaign and In-Group you want these Stereo Recordings for, they will each need to have the above settings)
--------------------------------------------------------------------------------
EXAMPLE 2 REQUIREMENTS:
- Must allow for Agent-Controlled stereo recording on-demand, but not started at the beginning of the phone call
- Must also record both sides of the entire call in a separate stereo recording
EXAMPLE 2 SETTINGS:
- System Settings -> Allow Stereo Recordings = '1'
-> Enable Stereo Parallel Recordings = '1'
- Campaign Detail -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'ONDEMAND'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
-> Parallel Stereo Recordings = 'FULL-RECORDING'
-> Parallel Full-Recording Rec Filename = 'SFR_FULLDATE_CUSTPHONE'
- In-Group Modify -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'ONDEMAND'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
-> Parallel Stereo Recordings = 'FULL-RECORDING'
-> Parallel Full-Recording Rec Filename = 'SFR_FULLDATE_CUSTPHONE'
NOTE: (For every Campaign and In-Group you want these Stereo Recordings for, they will each need to have the above settings)
--------------------------------------------------------------------------------
EXAMPLE 3 REQUIREMENTS:
- Must NOT allow for Agent-Controlled stereo recording at all
- Must record customer-side-only of the entire call in a separate stereo recording
- Must record agent-side-only of the entire call in a separate stereo recording
EXAMPLE 3 SETTINGS:
- System Settings -> Allow Stereo Recordings = '1'
-> Enable Stereo Parallel Recordings = '1'
- Campaign Detail -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'NEVER'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
-> Parallel Stereo Recordings = 'CUSTOMER-ONLY_CUSTOMER-MUTED'
-> Parallel Customer-Only Rec Filename = 'SCO_FULLDATE_CUSTPHONE'
-> Parallel Customer-Muted Rec Filename = 'SCM_FULLDATE_CUSTPHONE'
- In-Group Modify -> Stereo Call Recordings = 'BOTH_CHANNELS'
-> Stereo Recording Agent Control = 'NEVER'
-> Stereo Rec Filename = 'S_FULLDATE_CUSTPHONE'
-> Parallel Stereo Recordings = 'CUSTOMER-ONLY_CUSTOMER-MUTED'
-> Parallel Customer-Only Rec Filename = 'SCO_FULLDATE_CUSTPHONE'
-> Parallel Customer-Muted Rec Filename = 'SCM_FULLDATE_CUSTPHONE'
NOTE: (For every Campaign and In-Group you want these Stereo Recordings for, they will each need to have the above settings)
STEREO CALL RECORDING SCENARIOS AND DB TABLE ACTIONS:
-------------------------------------------------------------------------------------------------
Parallel stereo call recordings enabled on the system and campaign/in-group:
- Record inserted into recording_log_parallel table and recording started in all cases
If campaign/in-group parallel is set to CUSTOMER-ONLY and/or CUSTOMER-MUTED and/or FULL-RECORDING:
- Records inserted into recording_live, recording_log and recording_log_stereo tables for the whole-call recordings
if campaign/in-group stereo_recording_agent is set to ALLCALLS or ALLFORCE:
- Records inserted into recording_live, recording_log and recording_log_stereo tables for the whole-call recordings
If campaign/in-group Stereo Recording Agent Control is set to ALLCALLS or ONDEMAND and agent starts a recording:
- Records inserted into recording_live, recording_log and recording_log_stereo tables for the partial-call agent recordings
After call is complete, recordings above are processed, original is put into monitorTRASH directory for deletion in 3 days
- Records in the recording_live database table are archived to the recording_live_log table within one hour of being "FINISHED"
-------------------------------------------------------------------------------------------------
List of recording_log.extension values with recording_log_stereo.recording_type values:
MONO_LEGACY
MONO_LEGACY_RIR
MONO_LEGACY_REMOTE
MONO_LEGACY_SURVEY
STEREO_AGENT
STEREO_DID
SPACBC STEREO_PARALLEL AGENT-CONTROLLED BOTH_CHANNELS
SPACCO STEREO_PARALLEL AGENT-CONTROLLED CUSTOMER_ONLY
SPACCM STEREO_PARALLEL AGENT-CONTROLLED CUSTOMER_MUTE
SACBC STEREO AGENT-CONTROLLED BOTH_CHANNELS
SACCO STEREO AGENT-CONTROLLED CUSTOMER_ONLY
SACCM STEREO AGENT-CONTROLLED CUSTOMER_MUTE
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
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
-------------------------------------------------------------------------------------------------
List of scripts modified/created for these new Stereo Call Recording features:
- agc/vicidial.php
- agc/vdc_db_query.php
- agc/manager_send.php
- agc/api.php
- vicidial/admin.php
- vicidial/admin_modify_lead.php
- install.pl
- AST_CRON_audio_1_move_VDonly.pl
- AST_CRON_audio_1_stereo.pl
- AST_CRON_audio_2_compress.pl
- AST_flush_DBqueue.pl
- ADMIN_keepalive_ALL.pl
- ADMIN_archive_log_tables.pl
- agi-VDAD_ALL_inbound.agi
- agi-VDAD_ALL_outbound.agi
-------------------------------------------------------------------------------------------------
New Database Tables (FOR REFERENCE ONLY!!!):
----------------- EXISTING:
ALTER TABLE system_settings ADD stereo_recording ENUM('0','1','2','3','4','5','6') default '0';
ALTER TABLE vicidial_campaigns ADD stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_manager MODIFY cmd_line_i VARCHAR(50);
ALTER TABLE vicidial_manager MODIFY cmd_line_j VARCHAR(50);
ALTER TABLE vicidial_manager MODIFY cmd_line_d VARCHAR(200);
CREATE TABLE recording_log_stereo (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
length_in_sec MEDIUMINT(8) UNSIGNED,
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
options VARCHAR(100),
processing_log TEXT,
index(filename),
index(lead_id),
index(start_time)
) ENGINE=MyISAM;
----------------- NEW:
ALTER TABLE system_settings ADD recording_dtmf_detection TINYINT(3) UNSIGNED default '0';
ALTER TABLE system_settings ADD recording_dtmf_muting TINYINT(3) UNSIGNED default '0';
ALTER TABLE system_settings ADD stereo_parallel_recording ENUM('0','1','2','3','4','5','6') default '0';
ALTER TABLE vicidial_campaigns MODIFY stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE') default 'ALLFORCE';
ALTER TABLE vicidial_campaigns ADD stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE';
ALTER TABLE vicidial_campaigns ADD stereo_parallel_recording VARCHAR(50) default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD parallel_rec_co_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD parallel_rec_cm_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD parallel_rec_fr_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD recording_dtmf_muting SMALLINT(3) UNSIGNED default '0';
ALTER TABLE vicidial_inbound_groups MODIFY stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE','DISABLED') default 'ALLFORCE';
ALTER TABLE vicidial_inbound_groups ADD stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE';
ALTER TABLE vicidial_inbound_groups ADD stereo_parallel_recording VARCHAR(50) default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_co_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_cm_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_fr_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD recording_dtmf_muting SMALLINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD dtmf_detected TINYINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD dtmf_muting TINYINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD parallel_recording_id INT(10) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD recording_status VARCHAR(20) default '';
CREATE INDEX rls_pr_id on recording_log_stereo(parallel_recording_id);
ALTER TABLE routing_initiated_recordings ADD rir_type VARCHAR(1) default '';
CREATE TABLE recording_log_parallel (
parallel_recording_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100),
server_ip VARCHAR(15),
extension VARCHAR(100),
start_time DATETIME,
end_time DATETIME,
length_in_sec MEDIUMINT(8) UNSIGNED,
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
vicidial_id VARCHAR(20),
recording_status VARCHAR(20) default '',
processing_log TEXT,
index(filename),
index(lead_id),
index(start_time),
index(vicidial_id)
) ENGINE=MyISAM;
CREATE TABLE recording_live (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_live_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
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;
+117 -7
View File
@@ -1134,8 +1134,15 @@ leave_3way_stop_recording ENUM('DISABLED','ALL_CALLS') default 'DISABLED',
manual_minimum_ring_seconds SMALLINT(5) default '0',
manual_minimum_attempt_seconds SMALLINT(5) default '0',
manual_minimum_answer_seconds SMALLINT(5) default '0',
stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED',
khomp_settings_container VARCHAR(40) DEFAULT 'KHOMPSETTINGS'
stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED',
khomp_settings_container VARCHAR(40) DEFAULT 'KHOMPSETTINGS',
stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE',
stereo_parallel_recording VARCHAR(50) default 'DISABLED',
parallel_rec_co_filename VARCHAR(50) default '',
parallel_rec_cm_filename VARCHAR(50) default '',
parallel_rec_fr_filename VARCHAR(50) default ''
recording_dtmf_muting SMALLINT(3) UNSIGNED default '0',
stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE') default 'ALLFORCE',
) ENGINE=MyISAM;
CREATE TABLE vicidial_lists (
@@ -1463,8 +1470,15 @@ third_alert_container VARCHAR(40) default 'DISABLED',
third_alert_only VARCHAR(40) default 'DISABLED',
agent_search_list VARCHAR(20) default '',
state_descriptions VARCHAR(40) default '---DISABLED---',
stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED',
modify_stamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED',
modify_stamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE',
stereo_parallel_recording VARCHAR(50) default 'DISABLED',
parallel_rec_co_filename VARCHAR(50) default '',
parallel_rec_cm_filename VARCHAR(50) default '',
parallel_rec_fr_filename VARCHAR(50) default ''
recording_dtmf_muting SMALLINT(3) UNSIGNED default '0',
stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE','DISABLED') default 'ALLFORCE'
) ENGINE=MyISAM;
CREATE TABLE vicidial_stations (
@@ -2056,7 +2070,10 @@ stereo_recording ENUM('0','1','2','3','4','5','6') default '0',
enhanced_agent_monitoring ENUM('0','1','2','3','4','5','6') default '0',
agent_hide_dial_fail ENUM('0','1','2','3','4','5','6') default '0',
agent_man_dial_filter VARCHAR(20) default '',
agent_3way_dial_filter VARCHAR(20) default ''
agent_3way_dial_filter VARCHAR(20) default '',
recording_dtmf_detection TINYINT(3) UNSIGNED default '0',
recording_dtmf_muting TINYINT(3) UNSIGNED default '0',
stereo_parallel_recording ENUM('0','1','2','3','4','5','6') default '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -3939,6 +3956,7 @@ lead_id INT(9) UNSIGNED,
vicidial_id VARCHAR(20),
user VARCHAR(20) DEFAULT NULL,
processed TINYINT(1) default '0',
rir_type VARCHAR(1) default '',
index(lead_id),
index(user),
index(processed)
@@ -5319,9 +5337,14 @@ filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
options VARCHAR(100),
processing_log TEXT,
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
parallel_recording_id INT(10) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(start_time)
index(start_time),
index(parallel_recording_id)
) ENGINE=MyISAM;
CREATE TABLE clr_log (
@@ -5338,6 +5361,90 @@ processing_log TEXT,
index(start_time)
) ENGINE=MyISAM;
CREATE TABLE recording_log_parallel (
parallel_recording_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100),
server_ip VARCHAR(15),
extension VARCHAR(100),
start_time DATETIME,
end_time DATETIME,
length_in_sec MEDIUMINT(8) UNSIGNED,
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
vicidial_id VARCHAR(20),
recording_status VARCHAR(20) default '',
processing_log TEXT,
index(filename),
index(lead_id),
index(start_time),
index(vicidial_id)
) ENGINE=MyISAM;
CREATE TABLE recording_live (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_live_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
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;
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
@@ -5550,6 +5657,9 @@ CREATE TABLE recording_log_archive LIKE recording_log;
ALTER TABLE recording_log_archive MODIFY recording_id INT(10) UNSIGNED UNIQUE NOT NULL;
ALTER TABLE recording_log_archive DROP PRIMARY KEY;
CREATE TABLE recording_log_parallel_archive LIKE recording_log_parallel;
CREATE TABLE recording_log_stereo_archive LIKE recording_log_stereo;
CREATE TABLE vicidial_drop_log_archive LIKE vicidial_drop_log;
DROP INDEX drop_date on vicidial_drop_log_archive;
CREATE UNIQUE INDEX vicidial_drop_log_archive_key on vicidial_drop_log_archive(drop_date, uniqueid);
@@ -5743,4 +5853,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='1728',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1729',db_schema_update_date=NOW(),reload_timestamp=NOW();
+122 -2
View File
@@ -2753,10 +2753,10 @@ UPDATE system_settings SET db_schema_version='1718',db_schema_update_date=NOW()
ALTER TABLE system_settings ADD stereo_recording ENUM('0','1','2','3','4','5','6') default '0';
ALTER TABLE vicidial_campaigns ADD stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD khomp_settings_container VARCHAR(40) DEFAULT 'KHOMPSETTINGS';
ALTER TABLE vicidial_inbound_groups ADD stereo_recording ENUM('DISABLED','CUSTOMER','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_manager MODIFY cmd_line_i VARCHAR(50);
ALTER TABLE vicidial_manager MODIFY cmd_line_j VARCHAR(50);
@@ -2887,3 +2887,123 @@ ALTER TABLE system_settings ADD agent_man_dial_filter VARCHAR(20) default '';
ALTER TABLE system_settings ADD agent_3way_dial_filter VARCHAR(20) default '';
UPDATE system_settings SET db_schema_version='1728',db_schema_update_date=NOW() where db_schema_version < 1728;
ALTER TABLE system_settings ADD recording_dtmf_detection TINYINT(3) UNSIGNED default '0';
ALTER TABLE system_settings ADD recording_dtmf_muting TINYINT(3) UNSIGNED default '0';
ALTER TABLE system_settings ADD stereo_parallel_recording ENUM('0','1','2','3','4','5','6') default '0';
ALTER TABLE vicidial_campaigns MODIFY stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE') default 'ALLFORCE';
ALTER TABLE vicidial_campaigns ADD stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE';
ALTER TABLE vicidial_campaigns ADD stereo_parallel_recording VARCHAR(50) default 'DISABLED';
ALTER TABLE vicidial_campaigns ADD parallel_rec_co_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD parallel_rec_cm_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD parallel_rec_fr_filename VARCHAR(50) default '';
ALTER TABLE vicidial_campaigns ADD recording_dtmf_muting SMALLINT(3) UNSIGNED default '0';
ALTER TABLE vicidial_inbound_groups MODIFY stereo_recording ENUM('DISABLED','BOTH_CHANNELS','CUSTOMER_ONLY','CUSTOMER_MUTE') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD stereo_recording_agent ENUM('NEVER','ONDEMAND','ALLCALLS','ALLFORCE','DISABLED') default 'ALLFORCE';
ALTER TABLE vicidial_inbound_groups ADD stereo_rec_filename VARCHAR(50) default 'S_FULLDATE_CUSTPHONE';
ALTER TABLE vicidial_inbound_groups ADD stereo_parallel_recording VARCHAR(50) default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_co_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_cm_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD parallel_rec_fr_filename VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD recording_dtmf_muting SMALLINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD dtmf_detected TINYINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD dtmf_muting TINYINT(3) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD parallel_recording_id INT(10) UNSIGNED default '0';
ALTER TABLE recording_log_stereo ADD recording_status VARCHAR(20) default '';
CREATE INDEX rls_pr_id on recording_log_stereo(parallel_recording_id);
ALTER TABLE routing_initiated_recordings ADD rir_type VARCHAR(1) default '';
CREATE TABLE recording_log_parallel (
parallel_recording_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
channel VARCHAR(100),
server_ip VARCHAR(15),
extension VARCHAR(100),
start_time DATETIME,
end_time DATETIME,
length_in_sec MEDIUMINT(8) UNSIGNED,
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
vicidial_id VARCHAR(20),
recording_status VARCHAR(20) default '',
processing_log TEXT,
index(filename),
index(lead_id),
index(start_time),
index(vicidial_id)
) ENGINE=MyISAM;
CREATE TABLE recording_live (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
index(recording_id),
index(dtmf_muting_end_time)
) ENGINE=MyISAM;
CREATE TABLE recording_live_log (
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
recording_type VARCHAR(40) default 'MONO_LEGACY',
server_ip VARCHAR(15),
start_time DATETIME,
end_time DATETIME,
channel VARCHAR(255),
filename VARCHAR(100),
lead_id INT(9) UNSIGNED,
user VARCHAR(20),
dtmf_detected TINYINT(3) UNSIGNED default '0',
dtmf_muting TINYINT(3) UNSIGNED default '0',
dtmf_muting_seconds TINYINT(3) UNSIGNED default '0',
dtmf_muting_end_time DATETIME,
mute_state TINYINT(3) UNSIGNED default '0',
recording_status VARCHAR(20) default '',
index(filename),
index(lead_id),
index(user),
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;
UPDATE system_settings SET db_schema_version='1729',db_schema_update_date=NOW() where db_schema_version < 1729;
+10
View File
@@ -53,6 +53,7 @@
# 230508-0809 - Added Asterisk 18 compatibility
# 240704-0830 - Added coldstorage DB entries
# 250103-1017 - Added ConfBridge conf files updates
# 250823-1411 - Added stereo recording directories
#
############################################
@@ -2780,6 +2781,15 @@ if ($WEBONLY < 1)
`mkdir -p $PATHmonitor`;
`chmod -R 0766 $PATHmonitor`;
}
# generate paths to asterisk stereo recordings directories:
$PATHmonitorS = $PATHmonitor."S";
$PATHmonitorP = $PATHmonitor."P";
$PATHmonitorTRASH = $PATHmonitor."TRASH";
if (!-e "$PATHmonitorS") {`mkdir -p $PATHmonitorS`; `chmod -R 0766 $PATHmonitorS`;}
if (!-e "$PATHmonitorP") {`mkdir -p $PATHmonitorP`; `chmod -R 0766 $PATHmonitorP`;}
if (!-e "$PATHmonitorTRASH") {`mkdir -p $PATHmonitorTRASH`; `chmod -R 0766 $PATHmonitorTRASH`;}
if (!-e "$PATHmonitor/MIX") {`mkdir -p $PATHmonitor/MIX`;}
if (!-e "$PATHDONEmonitor")
+138 -4
View File
@@ -1,7 +1,7 @@
<?php
# api.php
#
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed as an API(Application Programming Interface) to allow
# other programs to interact with the VICIDIAL Agent screen
@@ -117,10 +117,11 @@
# 240427-0809 - Added tw_check option for transfer_conference function
# 240429-2220 - Added PARK_XFER|GRAB_XFER options for park_call function
# 250122-1010 - Allow for letters in phone_number variable, for AGENTDIRECT transfers
# 250830-2102 - Added stereo_recording function
#
$version = '2.14-82';
$build = '250122-1010';
$version = '2.14-83';
$build = '250830-2102';
$php_script = 'api.php';
$startMS = microtime();
@@ -319,7 +320,7 @@ $pass = preg_replace("/'|\"|\\\\|;| /","",$pass);
#############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
$stmt = "SELECT use_non_latin,enable_languages,language_method,agent_debug_logging,outbound_cid_any,allow_web_debug,agent_notifications FROM system_settings;";
$stmt = "SELECT use_non_latin,enable_languages,language_method,agent_debug_logging,outbound_cid_any,allow_web_debug,agent_notifications,stereo_recording FROM system_settings;";
$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 ($DB) {echo "$stmt\n";}
@@ -334,6 +335,7 @@ if ($qm_conf_ct > 0)
$SSoutbound_cid_any = $row[4];
$SSallow_web_debug = $row[5];
$SSagent_notifications = $row[6];
$SSstereo_recording = $row[7];
}
if ($SSallow_web_debug < 1) {$DB=0;}
@@ -1280,6 +1282,138 @@ if ($function == 'recording')
################################################################################
### BEGIN - stereo_recording - send a start or stop stereo agent recording signal to agent screen
################################################################################
if ($function == 'stereo_recording')
{
if ( ( (!preg_match("/BEGIN/",$value)) and (!preg_match("/END/",$value)) and (!preg_match("/STATUS/",$value)) ) or ($SSstereo_recording < 1) or ( (strlen($agent_user)<1) and (strlen($alt_user)<2) ) )
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("stereo_recording not valid");
echo "$result: $result_reason - $value|$agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
if ( (!preg_match("/ $function /",$VUapi_allowed_functions)) and (!preg_match("/ALL_FUNCTIONS/",$VUapi_allowed_functions)) )
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("auth USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION");
echo "$result: $result_reason - $value|$user|$function|$VUuser_group\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
if (strlen($alt_user)>1)
{
$stmt = "select count(*) from vicidial_users where custom_three='$alt_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select user from vicidial_users where custom_three='$alt_user' order by user;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$agent_user = $row[0];
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("no user found");
echo "$result: $result_reason - $alt_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
$stmt = "select count(*) from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt = "select external_recording,server_ip,conf_exten,status from vicidial_live_agents where user='$agent_user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$AGENTserver_ip = $row[1];
$AGENTconf_exten = $row[2];
$AGENTstatus = $row[3];
$RECfilename = '';
$RECserver_ip = '';
$RECstart_time = '';
$stmt = "SELECT recording_id,filename,server_ip,start_time FROM recording_live where user='$agent_user' and recording_status='STARTED' and recording_type LIKE \"%AGENT-CONTROLLED%\" and end_time IS NULL order by start_time desc limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
$rl_ct = mysqli_num_rows($rslt);
if ($rl_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$recording_id = $row[0];
$RECfilename = $row[1];
$RECserver_ip = $row[2];
$RECstart_time = $row[3];
}
if ($value=='STATUS')
{
if ($rl_ct > 0)
{
$result = _QXZ("NOTICE");
$result_reason = _QXZ("stereo_recording active");
echo "$result: $result_reason - $agent_user|$recording_id|$RECfilename|$RECserver_ip|$RECstart_time|$AGENTserver_ip|$AGENTconf_exten|$AGENTstatus\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
else
{
$result = _QXZ("NOTICE");
$result_reason = _QXZ("not stereo_recording");
echo "$result: $result_reason - $agent_user|||||$AGENTserver_ip|$AGENTconf_exten|$AGENTstatus\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
if ( (preg_match("/END/",$value)) and ( ($recording_id=='END') or ($recording_id < 1) ) )
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("stop stereo_recording error");
echo "$result: $result_reason - $agent_user|$recording_id||||$AGENTserver_ip|$AGENTconf_exten|$AGENTstatus\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
exit;
}
if ( (strlen($stage)>0) and (preg_match("/BEGIN/",$value)) )
{
while (strlen($stage)>14) {$stage = preg_replace("/.$/",'',$stage);}
$value = "$value$stage";
}
$stmt="UPDATE vicidial_live_agents set external_recording='$value' where user='$agent_user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
$result = _QXZ("SUCCESS");
$result_reason = _QXZ("stereo_recording function sent");
echo "$result: $result_reason - $agent_user|$value||||$AGENTserver_ip|$AGENTconf_exten|$AGENTstatus\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
else
{
$result = _QXZ("ERROR");
$result_reason = _QXZ("agent_user is not logged in");
echo "$result: $result_reason - $agent_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
}
}
################################################################################
### END - stereo_recording
################################################################################
################################################################################
### BEGIN - webphone_url - display or launch the webphone url for the current agent's session
################################################################################
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+380 -11
View File
@@ -1,7 +1,7 @@
<?php
# manager_send.php version 2.14
#
# Copyright (C) 2024 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
@@ -158,10 +158,11 @@
# 240430-1046 - Allow for park/grab of xfer line through API
# 240709-2010 - Changes to input variable filtering
# 241122-1544 - Fix for DTMF issue #1525
# 250831-0839 - Added MonitorStereo/StopMonitorStereo functions
#
$version = '2.14-105';
$build = '241122-1544';
$version = '2.14-106';
$build = '250831-0839';
$php_script = 'manager_send.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=161;
@@ -285,7 +286,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 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 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";}
@@ -301,6 +302,8 @@ if ($qm_conf_ct > 0)
$meetme_enter_leave3way_filename = $row[5];
$SSagent_debug_logging = $row[6];
$SSallow_web_debug = $row[7];
$SSstereo_recording = $row[8];
$SSstereo_parallel_recording = $row[9];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -2494,7 +2497,6 @@ if ($ACTION=="Redirect")
}
######################
# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel
######################
@@ -2598,7 +2600,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename' order by start_epoch desc;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02071',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02071',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n";
@@ -2608,10 +2610,6 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
}
######################
# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference
######################
@@ -2633,7 +2631,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ($ACTION=="MonitorConf")
{
$stmt="SELECT recording_id,filename FROM routing_initiated_recordings where user='$user' and processed='0' order by launch_time desc limit 1;";
$stmt="SELECT recording_id,filename FROM routing_initiated_recordings where user='$user' and processed='0' and rir_type='' order by launch_time desc limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02139',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2818,6 +2816,11 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02079',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt = "UPDATE recording_live set end_time='$NOW_TIME',recording_status='FINISHED' where recording_id='$recording_id' and recording_status='STARTED';";
if ($DB) {echo "$stmt\n";}
$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);}
}
# find and hang up all recordings going on in this conference # and extension = '$exten'
@@ -2850,7 +2853,373 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
}
######################
# ACTION=MonitorStereo or StopMonitorStereo - insert Monitor/StopMonitor Manager statement to start recording on a customer channel
######################
if ( ($ACTION=="MonitorStereo") || ($ACTION=="StopMonitorStereo") )
{
$row=''; $rowx='';
$channel_live=1;
$uniqueidSQL='';
if ( (($ACTION=="MonitorStereo") && ((strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8))) || (($ACTION=="StopMonitorStereo") && ((strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<4))) )
{
$channel_live=0;
echo _QXZ("Channel %1s is not valid or exten %2s is not valid or filename: %3s is not valid, %4s command not inserted",0,'',$channel,$exten,$filename,$ACTION)."\n";
$stage .= " REC-Invalid $exten $filename $channel";
}
else
{
$VDvicidial_id='';
if ($ACTION=="MonitorStereo")
{
$stmt="SELECT recording_id,filename FROM routing_initiated_recordings where user='$user' and processed='0' and rir_type='S' order by launch_time desc limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02139',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$rir_ct = mysqli_num_rows($rslt);
if ($rir_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$recording_id = $row[0];
$filename = $row[1];
$stmt = "UPDATE routing_initiated_recordings SET processed='1' where recording_id='$recording_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02140',$user,$server_ip,$session_name,$one_mysql_log);}
$stage .= " RIR $recording_id";
}
else
{
if ($FROMvdc=='YES')
{
##### update vla recording record to blank
$stmt = "UPDATE vicidial_live_agents SET external_recording='' where user='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$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);}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02074',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VLA_inOUT_ct = mysqli_num_rows($rslt);
if ($VLA_inOUT_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VLA_inOUT = $row[0];
}
if ($VLA_inOUT == 'INBOUND')
{
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
##### look for the vicidial ID in the vicidial_closer_log table
$stmt="SELECT closecallid,campaign_id FROM vicidial_closer_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
}
else
{
##### look for the vicidial ID in the vicidial_log table
$stmt="SELECT uniqueid,campaign_id FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_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);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysqli_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VDvicidial_id = $row[0];
$VDcampaign_id = $row[1];
$stmt = "UPDATE recording_log SET vicidial_id='$VDvicidial_id' where recording_id='$recording_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02076',$user,$server_ip,$session_name,$one_mysql_log);}
}
##### 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';";
}
else
{
$stmt="SELECT stereo_recording,stereo_parallel_recording,stereo_rec_filename,stereo_recording_agent 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);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysqli_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$stereo_recording = $row[0];
$stereo_parallel_recording = $row[1];
$stereo_rec_filename = $row[2];
$stereo_recording_agent = $row[3];
}
}
if (preg_match("/CUSTOMER|BOTH/",$stereo_recording) )
{
if ( ($SSstereo_parallel_recording > 0) and (!preg_match("/DISABLED/i",$stereo_parallel_recording)) )
{
$stereo_exten = 'SPAC';
if (preg_match("/BOTH_CHANNELS/",$stereo_recording) )
{$stereo_exten='SPACBC';}
if (preg_match("/CUSTOMER_ONLY/",$stereo_recording) )
{$stereo_exten='SPACCO';}
if (preg_match("/CUSTOMER_MUTE/",$stereo_recording) )
{$stereo_exten='SPACCM';}
$stereo_ac = $stereo_exten.'-'.$stereo_recording_agent."\n";
}
else
{
$stereo_exten = 'SAC';
if (preg_match("/BOTH_CHANNELS/",$stereo_recording) )
{$stereo_exten='SACBC';}
if (preg_match("/CUSTOMER_ONLY/",$stereo_recording) )
{$stereo_exten='SACCO';}
if (preg_match("/CUSTOMER_MUTE/",$stereo_recording) )
{$stereo_exten='SACCM';}
$stereo_ac = $stereo_exten.'-'.$stereo_recording_agent."\n";
}
# if VENDORLEADCODE is used in the stereo recording filenames, look it up for this lead
if (preg_match("/VENDORLEADCODE/",$stereo_rec_filename))
{
$stmt="SELECT vendor_lead_code FROM vicidial_list where lead_id='$lead_id';";
$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 ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysqli_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$vendor_lead_code = $row[0];
}
}
$recdate = date("Ymd-His");
$tinydate = date("ymdHis");
$stereo_rec_filename = preg_replace("/CAMPAIGN/",$campaign,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/INGROUP/",$VDcampaign_id,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/CUSTPHONE/",$phone_number,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/FULLDATE/",$recdate,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/TINYDATE/",$tinydate,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/EPOCH/",$StarTtime,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/AGENT/",$user,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/VENDORLEADCODE/",$vendor_lead_code,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/LEADID/",$lead_id,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/CALLID/",$CalLCID,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/\"|\'/",'',$stereo_rec_filename);
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')";
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);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
$stereo_rec_filename = preg_replace("/RECID/","$recording_id",$stereo_rec_filename);
$stmt = "UPDATE recording_log SET filename='$stereo_rec_filename' where recording_id='$recording_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02134',$user,$server_ip,$session_name,$one_mysql_log);}
}
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')";
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);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
}
if ( ($SSstereo_parallel_recording > 0) and (!preg_match("/DISABLED/i",$stereo_parallel_recording)) )
{
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
$parallel_recording_id=0;
# gather parallel_recording_id from recording_log_parallel
$stmt="SELECT parallel_recording_id FROM recording_log_parallel where lead_id='$lead_id' and user='$user' and channel='$channel' and start_time > \"$four_hours_ago\" order by parallel_recording_id desc limit 1;";
$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 ($DB) {echo "$stmt\n";}
$PR_ct = mysqli_num_rows($rslt);
if ($PR_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$parallel_recording_id = $row[0];
}
# 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');";
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
$rslt=mysql_to_mysqli($stmtA, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'02XXX',$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 ($format=='debug') {echo "\n<!-- $stmtD -->";}
$rslt=mysql_to_mysqli($stmtD, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtD,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
}
else
{
### start the stereo recording
$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','','','','','','','');";
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');";
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
$rslt=mysql_to_mysqli($stmtA, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'02XXX',$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 ($format=='debug') {echo "\n<!-- $stmtD -->";}
$rslt=mysql_to_mysqli($stmtD, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtD,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
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','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$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 (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','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$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);}
}
}
$filename = $stereo_rec_filename;
}
$stage .= " AIR $recording_id $stereo_rec_filename";
}
}
##### BEGIN StopMonitorStereo steps #####
else
{
$recording_type='';
if ($FROMvdc=='YES')
{
##### update vla recording record to blank
$stmt = "UPDATE vicidial_live_agents SET external_recording='' where user='$user';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$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 ($uniqueid=='IN')
{
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
### find the value to put in the vicidial_id field if this was an inbound call
$stmt="SELECT closecallid from vicidial_closer_log where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02077',$user,$server_ip,$session_name,$one_mysql_log);}
$VAC_qm_ct = mysqli_num_rows($rslt);
if ($VAC_qm_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$uniqueidSQL = ",vicidial_id='$row[0]'";
}
}
else
{
if (strlen($uniqueid) > 8)
{$uniqueidSQL = ",vicidial_id='$uniqueid'";}
}
$rec_searchSQL = "filename='$filename'";
if (preg_match("/^ID:/",$filename))
{
$recording_id = $filename;
$recording_id = preg_replace("/^ID:/",'',$recording_id);
$rec_searchSQL = "recording_id='$recording_id'";
}
$stmt="SELECT recording_id,UNIX_TIMESTAMP(start_time),filename,recording_type FROM recording_live where channel='$channel' and user='$user' and recording_status='STARTED' and recording_type LIKE \"STEREO%\" and recording_type LIKE \"%AGENT-CONTROLLED%\" order by start_time desc;";
$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);
$recording_id = $row[0];
$start_time = $row[1];
$filename = $row[2];
$recording_type = $row[3];
$vmgr_callerid = substr($filename, 0, 17) . '...';
$length_in_sec = ($StarTtime - $start_time);
$length_in_min = ($length_in_sec / 60);
$length_in_min = sprintf("%8.2f", $length_in_min);
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' $uniqueidSQL where recording_id='$recording_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02079',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt = "UPDATE recording_log_stereo set end_time='$NOW_TIME',recording_status='FINISHED',length_in_sec=$length_in_sec where recording_id='$recording_id';";
if ($DB) {echo "$stmt\n";}
$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);}
$stmt = "UPDATE recording_live set end_time='$NOW_TIME',recording_status='FINISHED' where recording_id='$recording_id' and recording_status='STARTED';";
if ($DB) {echo "$stmt\n";}
$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);}
$stmt = "UPDATE routing_initiated_recordings set processed='1' where user='$user' and processed='0' and rir_type='S' order by launch_time desc limit 1;";
if ($DB) {echo "$stmt\n";}
$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 ($WeBRooTWritablE > 0)
# {
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|STEREO_START|$user|$channel|$rec_count|$stmt|\n");
# fclose($fp);
# }
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','','','','','','','','');";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$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);}
}
}
##### 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";
}
}
######################
+472 -69
View File
@@ -560,10 +560,11 @@
# 250326-1937 - Fix for missing vicidial_inbound_group_agents entries
# 250601-0843 - Fix for fronter/closer start/dispo URL variables
# 250723-2002 - Fix for issue #1548
# 250916-1918 - Added stereo recording features
#
$version = '2.14-453';
$build = '250723-2002';
$version = '2.14-454';
$build = '250916-1918';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913;
@@ -1089,7 +1090,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 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 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";}
@@ -1123,6 +1124,8 @@ if ($qm_conf_ct > 0)
$SSallow_web_debug = $row[23];
$SSabandon_check_queue = $row[24];
$SSinbound_credits = $row[25];
$SSstereo_recording = $row[26];
$SSstereo_parallel_recording = $row[27];
}
if ($SSallow_web_debug < 1) {$DB=0; $format='text';}
##### END SETTINGS LOOKUP #####
@@ -5391,6 +5394,8 @@ if ($ACTION == 'manDiaLnextCaLL')
$stage .= "|RIR";
}
# NOTE: Do NOT start stereo call recording yet, since the customer channel hasn't Answered and resolved yet
### Skip logging and list overrides if dial in-group is used
if (strlen($dial_ingroup) < 1)
{
@@ -7431,6 +7436,8 @@ if ($ACTION == 'manDiaLonly')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00741',$user,$server_ip,$session_name,$one_mysql_log);}
# NOTE: Do NOT start stereo call recording yet, since the customer channel hasn't Answered and resolved yet
$stage .= "|RIR";
}
@@ -8100,6 +8107,7 @@ if ($ACTION == 'manDiaLlookCaLL')
if ($call_good > 0)
{
$stereo_ac="\n";
if ($stage != "YES")
{
$wait_sec=0;
@@ -8134,46 +8142,365 @@ if ($ACTION == 'manDiaLlookCaLL')
if ( ($routing_initiated_recording == 'Y') and (preg_match("/^M/",$MDnextCID)) )
{
if (preg_match("/CUSTOMER/",$stereo_recording))
{
$stmt="SELECT conf_engine FROM servers where server_ip='$server_ip';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
if ( $row[0] == 'CONFBRIDGE' )
{
if ( (strlen($recording_filename) < 1) or (strlen($recording_id) < 1) )
{
$stmt = "SELECT recording_id,filename from recording_log where lead_id='$lead_id' and vicidial_id='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$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);}
$RL_ct = mysqli_num_rows($rslt);
if ($RL_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$recording_id = $row[0];
$recording_filename = $row[1];
}
}
$tempMDnextCID = $MDnextCID;
$tempMDnextCID = preg_replace("/^../",'SR',$tempMDnextCID);
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','MixMonitor','$tempMDnextCID','ActionID: $tempMDnextCID','Channel: $channel','options: r(../monitorS/$recording_filename-in.wav)t(../monitorS/$recording_filename-out.wav)','','','','','','','');";
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);}
$stmt="INSERT INTO recording_log_stereo (recording_id,server_ip,start_time,length_in_sec,filename,lead_id,options,processing_log) values('$recording_id','$server_ip','$NOW_TIME','0','$recording_filename','$lead_id','$stereo_recording $campaign','start: $NOW_TIME|vicidial_id: $uniqueid|user: $user|channel: $channel|CID: $MDnextCID|');";
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);}
}
}
$stmt="UPDATE recording_log set vicidial_id='$uniqueid' where lead_id='$lead_id' and vicidial_id='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00742',$user,$server_ip,$session_name,$one_mysql_log);}
}
if ( (preg_match("/CUSTOMER|BOTH/",$stereo_recording)) and (preg_match("/^M/",$MDnextCID)) and ($SSstereo_recording > 0) )
{
$stmt="SELECT conf_engine FROM servers where server_ip='$server_ip';";
$rslt=mysql_to_mysqli($stmt, $link);
$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';";
$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 ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysqli_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$stereo_recording = $row[0];
$stereo_parallel_recording = $row[1];
$stereo_rec_filename = $row[2];
$stereo_recording_agent = $row[3];
$parallel_rec_co_filename = $row[4];
$parallel_rec_cm_filename = $row[5];
$parallel_rec_fr_filename = $row[6];
}
if ( (preg_match("/CUSTOMER|BOTH/",$stereo_recording) ) and (strlen($stereo_rec_filename) > 5) )
{
# if VENDORLEADCODE is used in any of the stereo recording filenames, look it up for this lead
if ( (preg_match("/VENDORLEADCODE/",$stereo_rec_filename)) or (preg_match("/VENDORLEADCODE/",$parallel_rec_co_filename)) or (preg_match("/VENDORLEADCODE/",$parallel_rec_cm_filename)) or (preg_match("/VENDORLEADCODE/",$parallel_rec_fr_filename)) )
{
$stmt="SELECT vendor_lead_code FROM vicidial_list where lead_id='$lead_id';";
$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 ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysqli_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$vendor_lead_code = $row[0];
}
}
$recdate = date("Ymd-His");
$tinydate = date("ymdHis");
$stereo_rec_filename = preg_replace("/CAMPAIGN/",$campaign,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/INGROUP/",$campaign,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/CUSTPHONE/",$phone_number,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/FULLDATE/",$recdate,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/TINYDATE/",$tinydate,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/EPOCH/",$StarTtime,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/AGENT/",$user,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/VENDORLEADCODE/",$vendor_lead_code,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/LEADID/",$lead_id,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/CALLID/",$MDnextCID,$stereo_rec_filename);
$stereo_rec_filename = preg_replace("/\"|\'/",'',$stereo_rec_filename);
$PATHmonitorS = '/var/spool/asterisk/monitorS';
$PATHmonitorP = '/var/spool/asterisk/monitorP';
$PATHmonitorT = $PATHmonitorS;
if ( ($SSstereo_parallel_recording > 0) && (preg_match("/CUSTOMER|FULL/",$stereo_parallel_recording)) )
{
$PATHmonitorT = $PATHmonitorP;
$filename = "PL$stereo_rec_filename";
$stmt = "INSERT INTO recording_log_parallel (channel,server_ip,extension,start_time,length_in_sec,filename,lead_id,user,vicidial_id,recording_status) values('$channel','$server_ip','','$NOW_TIME','0','$filename','$lead_id','$user','$uniqueid','START');";
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);}
$PRLaffected_rows = mysqli_affected_rows($link);
if ($PRLaffected_rows > 0)
{
$parallel_recording_id = mysqli_insert_id($link);
}
$vmgr_callerid = substr($filename, 0, 17) . '...';
$stereo_recording_options = "r($PATHmonitorT/$filename-out.wav)t($PATHmonitorT/$filename-in.wav)";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ((preg_match("/CUSTOMER-ONLY/",$stereo_parallel_recording)))
{
$temp_parallel_rec_co_filename = "CO".$stereo_rec_filename;
if (strlen($parallel_rec_co_filename) > 0)
{
$temp_parallel_rec_co_filename = $parallel_rec_co_filename;
$temp_parallel_rec_co_filename = preg_replace("/CAMPAIGN/",$campaign,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/INGROUP/",$campaign,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/CUSTPHONE/",$phone_number,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/FULLDATE/",$recdate,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/TINYDATE/",$tinydate,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/EPOCH/",$StarTtime,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/AGENT/",$user,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/VENDORLEADCODE/",$vendor_lead_code,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/LEADID/",$lead_id,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/CALLID/",$MDnextCID,$temp_parallel_rec_co_filename);
$temp_parallel_rec_co_filename = preg_replace("/\"|\'/",'',$temp_parallel_rec_co_filename);
}
### 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','SPCO','$NOW_TIME','$StarTtime','$temp_parallel_rec_co_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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
if (preg_match("/RECID/",$temp_parallel_rec_co_filename))
{
$temp_parallel_rec_co_filename = preg_replace("/RECID/",$recording_id,$temp_parallel_rec_co_filename);
$stmt = "UPDATE recording_log SET filename='$temp_parallel_rec_co_filename' where recording_id='$recording_id';";
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);}
}
### insert record into recording_log_stereo table ###
$stmt = "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','$server_ip','$NOW_TIME','0','$temp_parallel_rec_co_filename','$lead_id','$campaign STEREO_PARALLEL CUSTOMER-ONLY $stereo_recording','vicidial_id: $uniqueid|user: $user|channel: $channel|','$parallel_recording_id','PARALLEL START');";
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);}
### 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');";
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 ((preg_match("/CUSTOMER-MUTED/",$stereo_parallel_recording)))
{
$temp_parallel_rec_cm_filename = "CM".$stereo_rec_filename;
if (strlen($parallel_rec_cm_filename) > 0)
{
$temp_parallel_rec_cm_filename = $parallel_rec_cm_filename;
$temp_parallel_rec_cm_filename = preg_replace("/CAMPAIGN/",$campaign,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/INGROUP/",$campaign,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/CUSTPHONE/",$phone_number,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/FULLDATE/",$recdate,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/TINYDATE/",$tinydate,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/EPOCH/",$StarTtime,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/AGENT/",$user,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/VENDORLEADCODE/",$vendor_lead_code,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/LEADID/",$lead_id,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/CALLID/",$MDnextCID,$temp_parallel_rec_cm_filename);
$temp_parallel_rec_cm_filename = preg_replace("/\"|\'/",'',$temp_parallel_rec_cm_filename);
}
### 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','SPCM','$NOW_TIME','$StarTtime','$temp_parallel_rec_cm_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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
if (preg_match("/RECID/",$temp_parallel_rec_cm_filename))
{
$temp_parallel_rec_cm_filename = preg_replace("/RECID/",$recording_id,$temp_parallel_rec_cm_filename);
$stmt = "UPDATE recording_log SET filename='$temp_parallel_rec_cm_filename' where recording_id='$recording_id';";
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);}
}
### insert record into recording_log_stereo table ###
$stmt = "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','$server_ip','$NOW_TIME','0','$temp_parallel_rec_cm_filename','$lead_id','$campaign STEREO_PARALLEL CUSTOMER-MUTED $stereo_recording','vicidial_id: $uniqueid|user: $user|channel: $channel|','$parallel_recording_id','PARALLEL START');";
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);}
### 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');";
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 ((preg_match("/FULL-RECORDING/",$stereo_parallel_recording)))
{
$temp_parallel_rec_fr_filename = "FR".$stereo_rec_filename;
if (strlen($parallel_rec_fr_filename) > 0)
{
$temp_parallel_rec_fr_filename = $parallel_rec_fr_filename;
$temp_parallel_rec_fr_filename = preg_replace("/CAMPAIGN/",$campaign,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/INGROUP/",$campaign,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/CUSTPHONE/",$phone_number,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/FULLDATE/",$recdate,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/TINYDATE/",$tinydate,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/EPOCH/",$StarTtime,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/AGENT/",$user,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/VENDORLEADCODE/",$vendor_lead_code,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/LEADID/",$lead_id,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/CALLID/",$MDnextCID,$temp_parallel_rec_fr_filename);
$temp_parallel_rec_fr_filename = preg_replace("/\"|\'/",'',$temp_parallel_rec_fr_filename);
}
### 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','SPFR','$NOW_TIME','$StarTtime','$temp_parallel_rec_fr_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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
if (preg_match("/RECID/",$temp_parallel_rec_fr_filename))
{
$temp_parallel_rec_fr_filename = preg_replace("/RECID/",$recording_id,$temp_parallel_rec_fr_filename);
$stmt = "UPDATE recording_log SET filename='$temp_parallel_rec_fr_filename' where recording_id='$recording_id';";
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);}
}
### insert record into recording_log_stereo table ###
$stmt = "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','$server_ip','$NOW_TIME','0','$temp_parallel_rec_fr_filename','$lead_id','$campaign STEREO_PARALLEL FULL-RECORDING $stereo_recording','vicidial_id: $uniqueid|user: $user|channel: $channel|','$parallel_recording_id','PARALLEL START');";
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);}
### 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');";
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);}
}
# insert logs for agent-controlled stereo call recordings while parallel recordings are enabled
if ((preg_match("/ALLCALLS|ALLFORCE/",$stereo_recording_agent)))
{
$stereo_exten='SPAC';
if (preg_match("/BOTH_CHANNELS/",$stereo_recording) )
{$stereo_exten='SPACBC';}
if (preg_match("/CUSTOMER_ONLY/",$stereo_recording) )
{$stereo_exten='SPACCO';}
if (preg_match("/CUSTOMER_MUTE/",$stereo_recording) )
{$stereo_exten='SPACCM';}
$stereo_ac = $stereo_exten.'-'.$stereo_recording_agent."\n";
$temp_parallel_rec_ag_filename = $stereo_rec_filename;
### 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','$stereo_exten','$NOW_TIME','$StarTtime','$temp_parallel_rec_ag_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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
if (preg_match("/RECID/",$temp_parallel_rec_fr_filename))
{
$temp_parallel_rec_fr_filename = preg_replace("/RECID/",$recording_id,$temp_parallel_rec_fr_filename);
$stmt = "UPDATE recording_log SET filename='$temp_parallel_rec_ag_filename' where recording_id='$recording_id';";
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);}
}
### insert record into recording_log_stereo table ###
$stmt = "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','$server_ip','$NOW_TIME','0','$temp_parallel_rec_ag_filename','$lead_id','$campaign STEREO_PARALLEL AGENT-CONTROLLED $stereo_recording','vicidial_id: $uniqueid|user: $user|channel: $channel|','$parallel_recording_id','PARALLEL START');";
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);}
### 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');";
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 ((preg_match("/ONDEMAND/",$stereo_recording_agent)))
{
$stereo_ac='SOD-'.$stereo_recording_agent."\n";
}
}
else
{
if ((preg_match("/ALLCALLS|ALLFORCE/",$stereo_recording_agent)))
{
$stereo_ac='SAC-'.$stereo_recording_agent."\n";
## 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')";
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);}
$RLaffected_rows = mysqli_affected_rows($link);
if ($RLaffected_rows > 0)
{
$recording_id = mysqli_insert_id($link);
}
if (preg_match("/RECID/",$stereo_rec_filename))
{
$stereo_rec_filename = preg_replace("/RECID/",$recording_id,$stereo_rec_filename);
$stmt = "UPDATE recording_log SET filename='$stereo_rec_filename' where recording_id='$recording_id';";
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);}
}
$vmgr_callerid = substr($stereo_rec_filename, 0, 17) . '...';
$stereo_recording_options = "r($PATHmonitorT/$stereo_rec_filename-out.wav)t($PATHmonitorT/$stereo_rec_filename-in.wav)";
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
### insert record into recording_log_stereo table ###
$stmt = "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','$server_ip','$NOW_TIME','0','$stereo_rec_filename','$lead_id','$campaign STEREO AGENT-CONTROLLED $stereo_recording','vicidial_id: $uniqueid|user: $user|channel: $channel|','$parallel_recording_id','START');";
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);}
### 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');";
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 (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','','','','','','');";
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 (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','','','','','','');";
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 ((preg_match("/ONDEMAND/",$stereo_recording_agent)))
{
$stereo_ac='SOD-'.$stereo_recording_agent."\n";
}
}
}
}
}
if ($SSabandon_check_queue > 0)
{
$stmt="UPDATE vicidial_abandon_check_queue SET check_status='CONNECTED' where lead_id='$lead_id' and check_status IN('NEW','QUEUE','PROCESSING','COMPLETE') and abandon_time > \"$twentyfour_hours_ago\" order by abandon_time desc limit 1;";
@@ -8338,7 +8665,7 @@ if ($ACTION == 'manDiaLlookCaLL')
}
##### END SIP event logging, if enabled in the system #####
echo "$call_output$sip_event_action_output";
echo "$call_output$sip_event_action_output$stereo_ac";
$stage .= " $uniqueid $channel";
}
@@ -8389,10 +8716,10 @@ if ($stage == "start")
{
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "w");
# fwrite ($fp, "$NOW_TIME|VL_LOG_0|$uniqueid|$lead_id|$user|$list_id|$campaign|$start_epoch|$phone_number|$agent_log_id|\n");
fwrite ($fp, "$NOW_TIME|VL_LOG_0|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|VL_LOG_0|\n");
# fclose($fp);
}
echo "LOG NOT ENTERED\n";
@@ -8526,10 +8853,10 @@ if ($stage == "end")
if ( (strlen($uniqueid)<1) and ($VLA_inOUT == 'INBOUND') )
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|INBND_LOG_0|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$start_epoch|$phone_number|$agent_log_id|\n");
fwrite ($fp, "$NOW_TIME|INBND_LOG_0|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND_LOG_0|\n");
# fclose($fp);
$uniqueid='6666.1';
}
@@ -8602,10 +8929,10 @@ if ($stage == "end")
if ( ($length_in_sec < 1) and ($VLA_inOUT == 'INBOUND') )
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|INBND_LOG_1|$uniqueid|$lead_id|$user|$inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$start_epoch|\n");
fwrite ($fp, "$NOW_TIME|INBND_LOG_1|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND_LOG_1|\n");
# fclose($fp);
##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log
$stmt="SELECT start_epoch,term_reason,campaign_id,status FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id' and called_count='$called_count' order by call_date desc limit 1;";
@@ -8664,10 +8991,10 @@ if ($stage == "end")
}
else
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|INBND_LOG_2|$uniqueid|$lead_id|$user|$inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$start_epoch|\n");
fwrite ($fp, "$NOW_TIME|INBND_LOG_2|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND_LOG_2|\n");
# fclose($fp);
}
}
@@ -9648,7 +9975,7 @@ if ($stage == "end")
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00095',$user,$server_ip,$session_name,$one_mysql_log);}
if ($rslt) {$rec_list = mysqli_num_rows($rslt);}
while ($rec_list>$loop_count)
while ($rec_list>$loop_count)
{
$row=mysqli_fetch_row($rslt);
if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0]))
@@ -9679,7 +10006,7 @@ if ($stage == "end")
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00548',$user,$server_ip,$session_name,$one_mysql_log);}
if ($rslt) {$rec_list = mysqli_num_rows($rslt);}
while ($rec_list>$loop_count)
while ($rec_list>$loop_count)
{
$row=mysqli_fetch_row($rslt);
if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0]))
@@ -9704,6 +10031,73 @@ if ($stage == "end")
$loop_count++;
}
### if stereo_recording enabled, then halt recording on the customer channel and look for recording logs to update
if ($SSstereo_recording > 0)
{
if ($WeBRooTWritablE > 0)
{
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|SR_LOG_0|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$SSstereo_recording|$server_ip|$channel|\n");
# fclose($fp);
}
# stop stereo recording on customer channel
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','StopMixMonitor','SH123467$StarTtime','ActionID: SH123467$StarTtime','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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
### gather live recordings tied to this customer channel
$stmt="SELECT recording_id,filename,start_time,UNIX_TIMESTAMP(start_time) from recording_live where channel='$channel' and lead_id='$lead_id' and recording_status='STARTED' and user='$user' and recording_type LIKE \"STEREO%\" limit 10;";
$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);}
$ST_rec_ct = mysqli_num_rows($rslt);
$st=0;
while ($ST_rec_ct > $st)
{
$row=mysqli_fetch_row($rslt);
$STrecording_id[$st] = $row[0];
$STfilename[$st] = $row[1];
$STstart_time[$st] = $row[2];
$STstart_epoch[$st] = $row[3];
$st++;
}
$st=0;
while ($ST_rec_ct > $st)
{
$length_in_sec = ($StarTtime - $STstart_epoch[$st]);
$length_in_min = ($length_in_sec / 60);
$length_in_min = sprintf("%8.2f", $length_in_min);
### update record in recording_live table ###
$stmt = "UPDATE recording_live SET end_time=NOW(),recording_status='FINISHED END-CALL' where recording_id='$STrecording_id[$st]';";
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 record in recording_log table ###
$stmt = "UPDATE recording_log SET end_time=NOW(),end_epoch='$StarTtime',length_in_sec='$length_in_sec',length_in_min='$length_in_min' where recording_id='$STrecording_id[$st]';";
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 record in recording_log_stereo table ###
$stmt = "UPDATE recording_log_stereo SET end_time=NOW(),recording_status='FINISHED END-CALL',length_in_sec='$length_in_sec' where recording_id='$STrecording_id[$st]';";
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);}
$st++;
}
if ($WeBRooTWritablE > 0)
{
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|SR_LOG_1|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$SSstereo_recording|$st|$STrecording_id[$st]|$STfilename[$st]|$stmt|\n");
# fwrite ($fp, "$NOW_TIME|INBND_LOG_3|\n");
# fclose($fp);
}
}
### if a conference call or 3way call was attempted, then hangup all channels except for the agentchannel
if ( ( ($conf_dialed > 0) or ($hangup_all_non_reserved > 0) ) and ($leaving_threeway < 1) and ($blind_transfer < 1) )
@@ -9781,10 +10175,10 @@ if ($stage == "end")
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "w");
# fwrite ($fp, "$NOW_TIME|INBND_LOG_3|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|\n");
fwrite ($fp, "$NOW_TIME|INBND_LOG_3|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND_LOG_3|\n");
# fclose($fp);
}
}
}
@@ -9797,6 +10191,11 @@ if ($stage == "end")
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00100',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt = "UPDATE recording_live set end_time='$NOW_TIME',recording_status='FINISHED END-CALL' where filename='$filename[$loop_count]' and recording_status='STARTED';";
if ($DB) {echo "$stmt\n";}
$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);}
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
@@ -10208,7 +10607,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$CBcomments = trim("$row[3]");
}
}
$stmt="SELECT owner_populate,user_group_script,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions FROM vicidial_campaigns where campaign_id='$campaign';";
$stmt="SELECT owner_populate,user_group_script,custom_one,custom_two,custom_three,custom_four,custom_five,state_descriptions,stereo_recording,stereo_recording_agent FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00444',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -10224,6 +10623,8 @@ if ($ACTION == 'VDADcheckINCOMING')
$camp_custom_four = $row[5];
$camp_custom_five = $row[6];
$state_descriptions = $row[7];
$stereo_recording = $row[8];
$stereo_recording_agent = $row[9];
}
$ownerSQL='';
if ( ($owner_populate=='ENABLED') and ( (strlen($owner) < 1) or ($owner=='NULL') ) )
@@ -10376,10 +10777,10 @@ if ($ACTION == 'VDADcheckINCOMING')
}
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "w");
# fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|$VDADchannel_group|$call_type|$dialed_number|$dialed_label|$INclosecallid|$INxfercallid|\n");
fwrite ($fp, "$NOW_TIME|INBND|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND|\n");
# fclose($fp);
}
}
@@ -10523,7 +10924,7 @@ if ($ACTION == 'VDADcheckINCOMING')
}
}
echo "$VDCL_group_web|$VDCL_group_name||||$VDCL_campaign_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|X|X||||$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_timer_action_destination|||||||$VDCL_group_web_three|$VDCL_ingroup_script_color|||$VDCL_campaign_script_two|$VDCL_ingroup_script_color_two|\n|\n";
echo "$VDCL_group_web|$VDCL_group_name||||$VDCL_campaign_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|X|X||||$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_timer_action_destination|||||||$VDCL_group_web_three|$VDCL_ingroup_script_color|||$VDCL_campaign_script_two|$VDCL_ingroup_script_color_two|||$stereo_recording|$stereo_recording_agent|\n|\n";
if (preg_match('/X/',$dialed_label))
{
@@ -10643,7 +11044,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 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 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);}
@@ -10688,6 +11089,8 @@ if ($ACTION == 'VDADcheckINCOMING')
$ig_custom_four = $row[35];
$ig_custom_five = $row[36];
$ig_state_descriptions = $row[37];
$stereo_recording = $row[38];
$stereo_recording_agent = $row[39];
$status_group_gather_data = status_group_gather($row[27],'INGROUP');
@@ -11041,8 +11444,8 @@ if ($ACTION == 'VDADcheckINCOMING')
}
### 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|\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|\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|\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|\n";}
if (strlen($fronter) < 2) {$fronter = $tsr;}
$stmt = "SELECT full_name from vicidial_users where user='$fronter';";
@@ -13619,10 +14022,10 @@ if ($ACTION == 'LeaDSearcHSelecTUpdatE')
}
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "w");
# fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|$VDADchannel_group|$call_type|$dialed_number|$dialed_label|$INclosecallid|$INxfercallid|\n");
fwrite ($fp, "$NOW_TIME|INBND|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|INBND|\n");
# fclose($fp);
}
$stmt="INSERT INTO vicidial_sessions_recent SET lead_id='$lead_id',server_ip='$server_ip',call_date=NOW(),user='$user',campaign_id='$VDADchannel_group',conf_exten='$conf_exten',call_type='S';";
@@ -21051,10 +21454,10 @@ if ($ACTION == 'CALLSINQUEUEgrab')
$row=mysqli_fetch_row($rslt);
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "w");
# $fp = fopen ("./vicidial_debug.txt", "w");
# fwrite ($fp, "$NOW_TIME|GRAB_CALL |$stmtU|$VACaffected_rows|$stmtD|$row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|$row[14]|$row[15]|$row[16]|$row[17]|$row[18]|\n");
fwrite ($fp, "$NOW_TIME|GRAB_CALL|\n");
fclose($fp);
# fwrite ($fp, "$NOW_TIME|GRAB_CALL|\n");
# fclose($fp);
}
}
if ($SSagent_debug_logging > 0) {vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt);}
+238 -7
View File
@@ -748,10 +748,11 @@
# 250326-2032 - Added agent_hide_dial_fail system_setting
# 250806-0859 - Added manual_dial_lead_id 'ONLY' option and user override setting
# 250808-1322 - Added agent_man_dial_filter & agent_3way_dial_filter system settings
# 250916-2055 - Added stereo recording features
#
$version = '2.14-714c';
$build = '250808-1322';
$version = '2.14-715c';
$build = '250916-2055';
$php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=103;
@@ -3154,7 +3155,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 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 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";}
@@ -3358,6 +3359,7 @@ else
$manual_minimum_answer_seconds =$row[196];
$CAMPsip_event_logging = $row[197];
$stereo_recording = $row[198];
$stereo_recording_agent = $row[199];
if ( (!preg_match("/DISABLED/",$VU_manual_dial_lead_id)) and (strlen($VU_manual_dial_lead_id) > 0) )
{
@@ -3365,7 +3367,7 @@ else
$manual_dial_lead_id = $VU_manual_dial_lead_id;
}
if ($SSstereo_recording < 1) {$stereo_recording='DISABLED';}
if ($SSstereo_recording < 1) {$stereo_recording='DISABLED'; $stereo_recording_agent='NEVER';}
if ( ($manual_minimum_ring_seconds > 0) and ($SSsip_event_logging < 1) )
{
@@ -5691,6 +5693,10 @@ $start_recording_GIF = 'vdc_LB_startrecording.gif';
$start_recording_GIF_off = 'vdc_LB_startrecording_OFF.gif';
$stop_recording_GIF = 'vdc_LB_stoprecording.gif';
$stop_recording_GIF_off = 'vdc_LB_stoprecording_OFF.gif';
$STstart_recording_GIF = 'vdc_LB_STstartrecording.gif';
$STstart_recording_GIF_off = 'vdc_LB_STstartrecording_OFF.gif';
$STstop_recording_GIF = 'vdc_LB_STstoprecording.gif';
$STstop_recording_GIF_off = 'vdc_LB_STstoprecording_OFF.gif';
if (preg_match("/RECORDING/",$SSrecording_buttons))
{
if (preg_match("/2xHEIGHT/",$SSrecording_buttons))
@@ -5699,6 +5705,10 @@ if (preg_match("/RECORDING/",$SSrecording_buttons))
$start_recording_GIF_off = 'vdc_LB_startrecording_altx2_OFF.gif';
$stop_recording_GIF = 'vdc_LB_stoprecording_altx2.gif';
$stop_recording_GIF_off = 'vdc_LB_stoprecording_altx2_OFF.gif';
$STstart_recording_GIF = 'vdc_LB_STstartrecording_altx2.gif';
$STstart_recording_GIF_off = 'vdc_LB_STstartrecording_altx2_OFF.gif';
$STstop_recording_GIF = 'vdc_LB_STstoprecording_altx2.gif';
$STstop_recording_GIF_off = 'vdc_LB_STstoprecording_altx2_OFF.gif';
}
else
{
@@ -5706,6 +5716,10 @@ if (preg_match("/RECORDING/",$SSrecording_buttons))
$start_recording_GIF_off = 'vdc_LB_startrecording_alt_OFF.gif';
$stop_recording_GIF = 'vdc_LB_stoprecording_alt.gif';
$stop_recording_GIF_off = 'vdc_LB_stoprecording_alt_OFF.gif';
$STstart_recording_GIF = 'vdc_LB_STstartrecording_alt.gif';
$STstart_recording_GIF_off = 'vdc_LB_STstartrecording_alt_OFF.gif';
$STstop_recording_GIF = 'vdc_LB_STstoprecording_alt.gif';
$STstop_recording_GIF_off = 'vdc_LB_STstoprecording_alt_OFF.gif';
}
}
@@ -6261,6 +6275,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var campaign_rec_filename = '<?php echo $campaign_rec_filename ?>';
var LIVE_campaign_recording = '<?php echo $campaign_recording ?>';
var LIVE_campaign_rec_filename = '<?php echo $campaign_rec_filename ?>';
var STcampaign_recording = '<?php echo $stereo_recording_agent ?>';
var STcampaign_rec_filename = '<?php echo $stereo_rec_filename ?>';
var VDICstereo_recording = '<?php echo $stereo_recording ?>';
var VDICstereo_recording_agent = '<?php echo $stereo_recording_agent ?>';
var LIVE_STcampaign_recording = '<?php echo $stereo_recording_agent ?>';
var LIVE_STcampaign_rec_filename = '<?php echo $stereo_rec_filename ?>';
var LIVE_default_group_alias = '<?php echo $default_group_alias ?>';
var LIVE_caller_id_number = '<?php echo $default_group_alias_cid ?>';
var LIVE_web_vars = '<?php echo $default_web_vars ?>';
@@ -6488,6 +6508,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var external_igb_set_name='';
var recording_filename='';
var recording_id='';
var STrecording_filename='';
var STrecording_id='';
var delayed_script_load='';
var script_recording_delay='';
var VDRP_stage='PAUSED';
@@ -6656,6 +6678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var mrglock_ig_select_ct='<?php echo $mrglock_ig_select_ct ?>';
var agent_select_territories_skip_count=0;
var last_recording_filename='';
var STlast_recording_filename='';
var dead_max='<?php echo $dead_max ?>';
var dead_max_dispo='<?php echo $dead_max_dispo ?>';
var dead_to_dispo='<?php echo $dead_to_dispo ?>';
@@ -6746,6 +6769,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var MD_dial_timed_out=0;
var routing_initiated_recording='<?php echo $routing_initiated_recording ?>';
var stereo_recording='<?php echo $stereo_recording ?>';
var SSstereo_recording=<?php echo $SSstereo_recording ?>;
var stereo_recording_agent='<?php echo $stereo_recording_agent ?>';
var dead_trigger_count=0;
var dead_recording_triggered=0;
var dead_trigger_first_ran=0;
@@ -6803,6 +6828,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var user_pass_webform = '<?php echo $user_pass_webform ?>';
var phone_login_webform = '<?php echo $phone_login_webform ?>';
var recording_active=0;
var STrecording_active=0;
var pause_max_url_trigger = '<?php echo $pause_max_url_trigger ?>';
var agent_hide_hangup_ACTIVE = '<?php $agent_hide_hangup_ACTIVE ?>';
var agent_datetime='';
@@ -6874,6 +6900,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
image_LB_stoprecording.src="./images/<?php echo _QXZ("$stop_recording_GIF") ?>";
var image_LB_startrecording = new Image();
image_LB_startrecording.src="./images/<?php echo _QXZ("$start_recording_GIF") ?>";
var image_LB_STstoprecording = new Image();
image_LB_STstoprecording.src="./images/<?php echo _QXZ("$STstop_recording_GIF") ?>";
var image_LB_STstartrecording = new Image();
image_LB_STstartrecording.src="./images/<?php echo _QXZ("$STstart_recording_GIF") ?>";
var image_LB_paused = new Image();
image_LB_paused.src="./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>";
var image_LB_active = new Image();
@@ -6898,6 +6928,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
image_LB_stoprecording_OFF.src="./images/<?php echo _QXZ("$stop_recording_GIF_off") ?>";
var image_LB_startrecording_OFF = new Image();
image_LB_startrecording_OFF.src="./images/<?php echo _QXZ("$start_recording_GIF_off") ?>";
var image_LB_STstoprecording_OFF = new Image();
image_LB_STstoprecording_OFF.src="./images/<?php echo _QXZ("$STstop_recording_GIF_off") ?>";
var image_LB_STstartrecording_OFF = new Image();
image_LB_STstartrecording_OFF.src="./images/<?php echo _QXZ("$STstart_recording_GIF_off") ?>";
var image_LB_senddtmf_OFF = new Image();
image_LB_senddtmf_OFF.src="./images/<?php echo _QXZ("vdc_LB_senddtmf_OFF.gif") ?>";
var image_LB_ivrgrabparkedcall = new Image();
@@ -8358,6 +8392,21 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
conf_send_recording('StopMonitorConf', session_id, recording_filename,'1','','YES');
}
var regAPIrec = new RegExp("BEGIN","g");
if (api_recording.match(regAPIrec))
{
var APIrec_append = api_recording;
if (APIrec_append.length > 5)
{APIrec_append = APIrec_append.replace(regAPIrec, '');}
else
{APIrec_append='';}
conf_send_stereo_recording('MonitorStereo', session_id,'','1', APIrec_append,'YES');
}
if (api_recording=='END')
{
conf_send_stereo_recording('StopMonitorStereo', session_id, recording_filename,'1','','YES');
}
if (api_transferconf_function.length > 0)
{
if (api_transferconf_ID == api_transferconf_values_array[7])
@@ -8729,6 +8778,12 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
parked_hangup='1';
}
if ( (SSstereo_recording > 0) && ( (VDICstereo_recording == 'BOTH_CHANNELS') || (VDICstereo_recording == 'CUSTOMER_ONLY') || (VDICstereo_recording == 'CUSTOMER_MUTE') ) )
{
// call is dead set stereo recording button to disabled
var conf_rec_start_html = "<img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF_off") ?>\" border=\"0\" alt=\"Start Stereo Recording\" />";
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
}
}
if ( (CheckDEADcall > 0) && (VD_live_customer_call==1) && (VD_live_call_secondS > 5) && ((CalL_AutO_LauncH == 'CHAT')) && (currently_in_email_or_chat > 0) )
@@ -9172,6 +9227,117 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
}
// ################################################################################
// Send MonitorStereo/StopMonitorStereo command for stereo_recording of conferences
function conf_send_stereo_recording(taskconfrectype,taskconfrec,taskconffile,taskfromapi,taskapiappend,CSRclick)
{
if (CSRclick=='YES')
{button_click_log = button_click_log + "" + SQLdate + "-----conf_send_stereo_recording---" + taskconfrectype + " " + taskconfrec + " " + taskconffile + " " + taskfromapi + " " + taskapiappend + "|";}
else
{button_click_log = button_click_log + "" + SQLdate + "-----conf_send_stereo_recordingAUTO---" + taskconfrectype + " " + taskconfrec + " " + taskconffile + " " + taskfromapi + " " + taskapiappend + " " + all_record + "|";}
if (inOUT == 'OUT')
{
tmp_vicidial_id = document.vicidial_form.uniqueid.value;
}
else
{
tmp_vicidial_id = 'IN';
}
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
if (taskconfrectype == 'MonitorStereo')
{
recording_active=1;
var REGrecCLEANvlc = new RegExp(" ","g");
var recVendorLeadCode = document.vicidial_form.vendor_lead_code.value;
recVendorLeadCode = recVendorLeadCode.replace(REGrecCLEANvlc, '');
var recLeadID = document.vicidial_form.lead_id.value;
var query_recording_exten = recording_exten;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('StopMonitorStereo','" + taskconfrec + "','" + filename + "','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" /></a>";
if (VDICstereo_recording_agent == 'ALLFORCE')
{
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF_off") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" />";
}
else
{
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
}
if (taskconfrectype == 'StopMonitorStereo')
{
recording_active=0;
filename = taskconffile;
var query_recording_exten = session_id;
var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context;
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('MonitorStereo','" + taskconfrec + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF") ?>\" border=\"0\" alt=\"Start Stereo Recording\" /></a>";
if (VDICstereo_recording_agent == 'ALLFORCE')
{
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF_off") ?>\" border=\"0\" alt=\"Start Stereo Recording\" />";
}
else
{
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;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(confmonitor_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var RClookResponse = null;
// document.getElementById("busycallsdebug").innerHTML = confmonitor_query;
// alert(confmonitor_query);
// alert(xmlhttp.responseText);
RClookResponse = xmlhttp.responseText;
var RClookResponse_array=RClookResponse.split("\n");
var RClookFILE = RClookResponse_array[1];
var RClookID = RClookResponse_array[2];
var RClookFILE_array = RClookFILE.split("Filename: ");
var RClookID_array = RClookID.split("RecorDing_ID: ");
if (taskconfrectype == 'MonitorStereo')
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('StopMonitorStereo','" + taskconfrec + "','ID:" + recording_id + "','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" /></a>";
if (VDICstereo_recording_agent == 'ALLFORCE')
{
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF_off") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" />";
}
else
{
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
}
}
}
delete xmlhttp;
}
}
// ################################################################################
// Send Redirect command for live call to Manager sends phone name where call is going to
// Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL
@@ -9821,6 +9987,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
{
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + session_id + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$start_recording_GIF") ?>\" border=\"0\" alt=\"Start Recording\" /></a>";
var conf_rec_mute_html = "<img src=\"./images/<?php echo _QXZ("vdc_LB_mute_recording_DISABLED.gif") ?>\" border=\"0\" alt=\"Mute Recording Disabled\" /><br />";
var STconf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('MonitorStereo','" + session_id + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF") ?>\" border=\"0\" alt=\"Start Stereo Recording\" /></a>";
if ( (LIVE_campaign_recording == 'NEVER') || (LIVE_campaign_recording == 'ALLFORCE') )
{
document.getElementById("RecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$start_recording_GIF_off") ?>\" border=\"0\" alt=\"Start Recording\" />";
@@ -9832,6 +9999,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.getElementById("RecorDMute").innerHTML = conf_rec_mute_html;
}
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF_off") ?>\" border=\"0\" alt=\"Start Stereo Recording\" />";
MDlogRecorDings = MDlogResponse_array[3];
if (window.MDlogRecorDings)
{
@@ -11449,7 +11618,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
debug_response = debug_response.replace(REGcommentsDBNL, "<br>");
// document.getElementById("debugbottomspan").innerHTML = "<br>|" + manDiaLlook_query + "|<br>\n" + debug_response;
MDlookResponse = xmlhttp.responseText;
var MDlookResponse_array=MDlookResponse.split("\n");
var MDlookCID = MDlookResponse_array[0];
@@ -11508,6 +11676,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
button_click_log = button_click_log + "" + SQLdate + "-----DiaLAlerT---Call-Rejected" + XDerrorDesc + "|";
agent_events('agent_alert', "Call Rejected: " + XDerrorDesc + ' ' + XDerrorDescSIP, aec); aec++;
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -11586,8 +11755,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{
custchannellive=1;
document.vicidial_form.uniqueid.value = MDlookResponse_array[0];
document.vicidial_form.uniqueid.value = MDlookResponse_array[0];
document.getElementById("callchannel").innerHTML = MDlookResponse_array[1];
var stereo_info = MDlookResponse_array[2];
lastcustchannel = MDlookResponse_array[1];
if( document.images ) { document.images['livecall'].src = image_livecall_ON.src;}
document.vicidial_form.SecondS.value = 0;
@@ -11608,6 +11778,32 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.getElementById("MainStatuSSpan").innerHTML = " <?php echo _QXZ("Called:"); ?> " + status_display_number + " " + status_display_content + " &nbsp;";
var regSRC = new RegExp("^SAC|^SPAC","ig");
var regSRD = new RegExp("^SOD","ig");
var regSRAF = new RegExp("ALLFORCE","ig");
if (stereo_info.match(regSRC))
{
// stereo recording was started
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('StopMonitorStereo','" + session_id + "','" + filename + "','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" /></a>";
if (stereo_info.match(regSRAF))
{
// Agent-control is ALLFORCE, use disabled button
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF_off") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" />";
}
else
{
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
}
if (stereo_info.match(regSRD))
{
// stereo recording not started, but set to ONDEMAND
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_stereo_recording('MonitorStereo','" + session_id + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF") ?>\" border=\"0\" alt=\"Start Stereo Recording\" /></a>";
document.getElementById("StRecorDControl").innerHTML = conf_rec_start_html;
}
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_parkcall.gif"); ?>\" border=\"0\" alt=\"Park Call\" /></a>";
if ( (ivr_park_call=='ENABLED') || (ivr_park_call=='ENABLED_PARK_ONLY') )
{
@@ -14100,6 +14296,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
browser_alert_sound = VDIC_data_VDIG[40];
browser_alert_volume = VDIC_data_VDIG[41];
}
VDICstereo_recording = VDIC_data_VDIG[42];
VDICstereo_recording_agent = VDIC_data_VDIG[43];
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
@@ -14460,6 +14658,30 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
document.getElementById("MainStatuSSpan").innerHTML = " <?php echo _QXZ("Incoming:"); ?> " + dial_display_number + " " + custom_call_id + " " + temp_status_display_ingroup + "&nbsp; " + VDIC_fronter + " " + status_display_content;
}
if ( (SSstereo_recording > 0) && ( (VDICstereo_recording == 'BOTH_CHANNELS') || (VDICstereo_recording == 'CUSTOMER_ONLY') || (VDICstereo_recording == 'CUSTOMER_MUTE') ) )
{
if (VDICstereo_recording_agent == 'ALLCALLS')
{
// stereo recording was started, allow agent to stop it
document.getElementById("StRecorDControl").innerHTML = "<a href=\"#\" onclick=\"conf_send_stereo_recording('StopMonitorStereo','" + session_id + "','" + filename + "','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" /></a>";
}
if (VDICstereo_recording_agent == 'ALLFORCE')
{
// Agent-control is ALLFORCE, use disabled button
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstop_recording_GIF_off") ?>\" border=\"0\" alt=\"Stop Stereo Recording\" />";
}
if (VDICstereo_recording_agent == 'ONDEMAND')
{
// stereo recording not started, but agent control set to ONDEMAND
document.getElementById("StRecorDControl").innerHTML = "<a href=\"#\" onclick=\"conf_send_stereo_recording('MonitorStereo','" + session_id + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF") ?>\" border=\"0\" alt=\"Start Stereo Recording\" /></a>";
}
if (VDICstereo_recording_agent == 'NEVER')
{
// stereo recording not started, and agent control set to NEVER
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF_off") ?>\" border=\"0\" alt=\"Start Stereo Recording\" />";
}
}
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_parkcall.gif"); ?>\" border=\"0\" alt=\"Park Call\" /></a>";
if ( (ivr_park_call=='ENABLED') || (ivr_park_call=='ENABLED_PARK_ONLY') )
{
@@ -21669,6 +21891,8 @@ function phone_number_format(formatphone) {
hideDiv('InvalidOpenerSpan');
hideDiv('OtherTabCommentsSpan');
hideDiv('AgentTimeDisplayBox');
if ( (SSstereo_recording < 1) || (stereo_recording == 'DISABLED') )
{hideDiv('StRecorDControl');}
if (launch_scb_force_dial < 1)
{hideDiv('SCForceDialBox');}
else
@@ -21759,6 +21983,9 @@ function phone_number_format(formatphone) {
var conf_rec_mute_html = "<img src=\"./images/<?php echo _QXZ("vdc_LB_mute_recording_DISABLED.gif") ?>\" border=\"0\" alt=\"Mute Recording Disabled\" /><br />";
document.getElementById("RecorDMute").innerHTML = conf_rec_mute_html;
}
document.getElementById("StRecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("$STstart_recording_GIF_off"); ?>\" border=\"0\" alt=\"Start Stereo Recording\" />";
if (INgroupCOUNT > 0)
{
if (VU_closer_default_blended == 1)
@@ -23570,7 +23797,11 @@ $zi=2;
<!-- <a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + head_conf + "','','','');return false;\">Record</a> -->
<span style="background-color: <?php echo $MAIN_COLOR ?>" id="RecorDControl"><a href="#" onclick="conf_send_recording('MonitorConf',session_id,'','','','YES');return false;"><img src="./images/<?php echo _QXZ("$start_recording_GIF"); ?>" border="0" alt="Start Recording" /></a></span><br />
<span style="background-color: <?php echo $MAIN_COLOR ?>" id="RecorDMute"></span>
<?php
<?php
if ($SSstereo_recording > 0)
{echo "<span style=\"background-color:$MAIN_COLOR\" id=\"StRecorDControl\"><img src=\"./images/"._QXZ("$STstart_recording_GIF_off")."\" border=\"0\" alt=\"Start Stereo Recording\" /></span><br />";}
else
{echo "<span style=\"background-color:$MAIN_COLOR\" id=\"StRecorDControl\"></span>";}
if (!preg_match("/NOGAP/",$SSrecording_buttons))
{echo "<span id=\"SpacerSpanA\"><img src=\"./images/"._QXZ("blank.gif")."\" width=\"145px\" height=\"16px\" border=\"0\" /></span><br />\n";}
if ($SSenable_first_webform > 0)
+104 -44
View File
@@ -136,6 +136,7 @@
# 250103-0929 - Added enhanced_agent_monitoring code
# 250130-1130 - Changed vicidial_daily_rt_monitor_log to vicidial_daily_rt_monitorING_log to match SQL file, also added sort clause to WHISPER
# 250320-2307 - Added "3-WAYD" status for dead 3way call agent
# 250523-1730 - Added inbound calls counting capability
#
$version = '2.14-120';
@@ -258,6 +259,8 @@ if (isset($_GET["user_group_filter"])) {$user_group_filter=$_GET["user_group_
elseif (isset($_POST["user_group_filter"])) {$user_group_filter=$_POST["user_group_filter"];}
if (isset($_GET["ingroup_filter"])) {$ingroup_filter=$_GET["ingroup_filter"];}
elseif (isset($_POST["ingroup_filter"])) {$ingroup_filter=$_POST["ingroup_filter"];}
if (isset($_GET["inbound_calls_filter"])) {$inbound_calls_filter=$_GET["inbound_calls_filter"];}
elseif (isset($_POST["inbound_calls_filter"])) {$inbound_calls_filter=$_POST["inbound_calls_filter"];}
if (isset($_GET["droppedOFtotal"])) {$droppedOFtotal=$_GET["droppedOFtotal"];}
elseif (isset($_POST["droppedOFtotal"])) {$droppedOFtotal=$_POST["droppedOFtotal"];}
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
@@ -337,6 +340,7 @@ if (!isset($group)) {$group='ALL-ACTIVE';}
if (!is_array($groups)) {$groups=array();}
if (!is_array($user_group_filter)) {$user_group_filter=array();}
if (!is_array($ingroup_filter)) {$ingroup_filter=array();}
if (!is_array($inbound_calls_filter)) {$inbound_calls_filter=array();}
if (!isset($usergroup)) {$usergroup='';}
if (!isset($UGdisplay)) {$UGdisplay=0;} # 0=no, 1=yes
if (!isset($UidORname)) {$UidORname=1;} # 0=id, 1=name
@@ -761,6 +765,20 @@ while($i < $ingroup_ct)
$ingroup_SQL = preg_replace('/,$/i', '',$ingroup_SQL);
#if ($DB > 0) {echo "INBOUND INPUT DEBUG: |$ingroup_ct|$ingroup_string|\n";}
$i=0;
$inbound_calls_string='|';
$inbound_calls_ct = count($inbound_calls_filter);
while($i < $inbound_calls_ct)
{
$inbound_calls_filter[$i] = preg_replace('/[^-_0-9a-zA-Z]/', '', $inbound_calls_filter[$i]);
$inbound_calls_string .= "$inbound_calls_filter[$i]|";
$inbound_calls_SQL .= "'$inbound_calls_filter[$i]',";
$inbound_callsQS .= "&inbound_calls_filter[]=$inbound_calls_filter[$i]";
$i++;
}
$inbound_calls_SQL = preg_replace('/,$/i', '',$inbound_calls_SQL);
### if no campaigns selected, display all
if ( ($group_ct < 1) or (strlen($group_string) < 2) )
{
@@ -785,6 +803,15 @@ if ( ($ingroup_ct < 1) or (strlen($ingroup_string) < 2) )
$ingroupQS .= "&ingroup_filter[]=ALL-INGROUPS";
$ingroup_none=1;
}
### if no inbound call counts selected, display all
$inbound_calls_none=0;
if ( ($inbound_calls_ct < 1) or (strlen($inbound_calls_string) < 2) )
{
$inbound_calls_filter[0] = 'ALL-INGROUPS';
$inbound_calls_string = '|ALL-INGROUPS|';
$inbound_callsQS .= "&inbound_calls_filter[]=ALL-INGROUPS";
$inbound_calls_none=1;
}
if ( (preg_match('/\s\-\-NONE\-\-\s/',$group_string) ) or ($group_ct < 1) )
{
@@ -846,6 +873,25 @@ else
$all_active_ingroups = 0;
}
if ( (preg_match('/\s\-\-NONE\-\-\s/',$inbound_calls_string) ) or ($inbound_calls_ct < 1) )
{
$all_active_inbound_call_groups = 0;
$inbound_calls_SQL = "''";
}
elseif ( preg_match('/ALL\-INGROUPS/i',$inbound_calls_string) )
{
if (preg_match('/\-\-\-ALL\-\-\-/', $LOGadmin_viewable_groups))
{
$all_active_inbound_calls = 1;
}
else
{
$inbound_calls_SQL = "'$rawLOGadmin_viewable_groupsSQL'";
$inbound_calls_SQLand = "and campaign_id IN($rawLOGadmin_viewable_groupsSQL)";
$inbound_calls_SQLwhere = "where campaign_id IN($rawLOGadmin_viewable_groupsSQL)";
}
}
$stmt="SELECT user_group from vicidial_user_groups $whereLOGadmin_viewable_groupsSQL order by user_group;";
$rslt=mysql_to_mysqli($stmt, $link);
if (!isset($DB)) {$DB=0;}
@@ -1480,7 +1526,7 @@ else
<?php
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo"<META HTTP-EQUIV=Refresh CONTENT=\"$RR; URL=$PHP_SELF?RR=$RR&DB=$DB$usergroupQS$groupQS$ingroupQS&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">\n";
echo"<META HTTP-EQUIV=Refresh CONTENT=\"$RR; URL=$PHP_SELF?RR=$RR&DB=$DB$usergroupQS$groupQS$ingroupQ$inbcallsQS&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">\n";
echo "<TITLE>$report_name: $group</TITLE></HEAD><BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
$short_header=1;
@@ -1538,9 +1584,9 @@ if ($RTajax < 1)
echo "<span style=\"position:absolute;left:10px;top:120px;z-index:18;\" id=agent_ingroup_display>\n";
echo " &nbsp; ";
echo "</span>\n";
echo "<a href=\"$PHP_SELF?RR=4000$usergroupQS$groupQS$ingroupQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("STOP")."</a> | ";
echo "<a href=\"$PHP_SELF?RR=40$usergroupQS$groupQS$ingroupQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SLOW")."</a> | ";
echo "<a href=\"$PHP_SELF?RR=4$usergroupQS$groupQS$ingroupQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("GO")."</a>";
echo "<a href=\"$PHP_SELF?RR=4000$usergroupQS$groupQS$ingroupQS$inbcallsQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("STOP")."</a> | ";
echo "<a href=\"$PHP_SELF?RR=40$usergroupQS$groupQS$ingroupQS$inbcallsQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SLOW")."</a> | ";
echo "<a href=\"$PHP_SELF?RR=4$usergroupQS$groupQS$ingroupQS$inbcallsQS&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("GO")."</a>";
if (preg_match('/ALL\-ACTIVE/i',$group_string))
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"./admin.php?ADD=10\">"._QXZ("MODIFY")."</a> | \n";
@@ -2296,7 +2342,7 @@ else
if ($adastats>1)
{
$min_link='<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=4&DB=$DB&adastats=1\"><font class=\"top_settings_val\">- min </font></a>';
$min_link='<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=4&DB=$DB&adastats=1\"><font class=\"top_settings_val\">- min </font></a>';
if ($RTajax > 0)
{$min_link='';}
@@ -2474,71 +2520,71 @@ if ( ($report_display_type!='WALL_1') and ($report_display_type!='WALL_2') and (
{
if ($adastats<2)
{
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">+ "._QXZ("VIEW MORE")."</font></a>";
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=2&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">+ "._QXZ("VIEW MORE")."</font></a>";
}
else
{
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=1&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">- "._QXZ("VIEW LESS")."</font></a>";
echo "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=1&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">- "._QXZ("VIEW LESS")."</font></a>";
}
}
if ($UGdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=0&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE USER GROUP")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=0&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE USER GROUP")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=1&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("VIEW USER GROUP")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=1&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("VIEW USER GROUP")."</font></a>";
}
if ($SERVdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=0&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE SERVER INFO")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=0&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE SERVER INFO")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=1&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW SERVER INFO")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=1&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW SERVER INFO")."</font></a>";
}
if ($CALLSdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE WAITING CALLS")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=0&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE WAITING CALLS")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW WAITING CALLS")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=1&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW WAITING CALLS")."</font></a>";
}
if ($ALLINGROUPstats>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=0&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE IN-GROUP STATS")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=0&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE IN-GROUP STATS")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=1&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW IN-GROUP STATS")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=1&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW IN-GROUP STATS")."</font></a>";
}
if ($PHONEdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=0&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE PHONES")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=0&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE PHONES")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=1&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW PHONES")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=1&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW PHONES")."</font></a>";
}
if ($CUSTPHONEdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=0&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE CUSTPHONES")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=0&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE CUSTPHONES")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=1&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW CUSTPHONES")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&CUSTPHONEdisplay=1&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW CUSTPHONES")."</font></a>";
}
if ($LOGuser_level>=9)
{
if ($CUSTINFOdisplay>0)
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=0&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE FULL CUST INFO")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=0&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("HIDE FULL CUST INFO")."</font></a>";
}
else
{
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=1&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW FULL CUST INFO")."</font></a>";
echo " &nbsp; &nbsp; &nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=1&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class=\"top_settings_val\">"._QXZ("SHOW FULL CUST INFO")."</font></a>";
}
}
}
@@ -3100,12 +3146,12 @@ if ($report_display_type=='TEXT')
$HDstation = "----------------+";
$HTstation = " "._QXZ("STATION", 14)." |";
$HDphone = "-------------------+";
$HTphone = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("PHONE",11)."</a> |";
$HTphone = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("PHONE",11)."</a> |";
if ($RTajax > 0)
{$HTphone = " <a href=\"#\" onclick=\"update_variables('orderby','phone');\">"._QXZ("PHONE",11)."</a> |";}
$HDuser = "------------------------+";
$HTuser = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("USER",5)."</a> ";
$HTuser = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("USER",5)."</a> ";
if ($RTajax > 0)
{$HTuser = " <a href=\"#\" onclick=\"update_variables('orderby','user');\">"._QXZ("USER",5)."</a> ";}
if ($UidORname>0)
@@ -3114,7 +3160,7 @@ if ($report_display_type=='TEXT')
{$HTuser .= "<a href=\"#\" onclick=\"update_variables('UidORname','');\">"._QXZ("SHOW ID",8)."</a> ";}
else
{
$HTuser .= "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SHOW ID",8)."</a> ";
$HTuser .= "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SHOW ID",8)."</a> ";
}
}
else
@@ -3123,13 +3169,13 @@ if ($report_display_type=='TEXT')
{$HTuser .= "<a href=\"#\" onclick=\"update_variables('UidORname','');\">"._QXZ("SHOW NAME",9)."</a>";}
else
{
$HTuser .= "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SHOW NAME",9)."</a>";
$HTuser .= "<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("SHOW NAME",9)."</a>";
}
}
$HTuser .= " "._QXZ("INFO",6)." |";
$HDusergroup = "--------------+";
$HTusergroup = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("USER GROUP",12)."</a> |";
$HTusergroup = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("USER GROUP",12)."</a> |";
if ($RTajax > 0)
{$HTusergroup = " <a href=\"#\" onclick=\"update_variables('orderby','group');\">"._QXZ("USER GROUP",12)."</a> |";}
$HDsessionid = "-----------+";
@@ -3153,15 +3199,17 @@ if ($report_display_type=='TEXT')
$HDcall_server_ip = "-----------------+";
$HTcall_server_ip = " "._QXZ("CALL SERVER IP",15)." |";
$HDtime = "---------+";
$HTtime = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">MM:SS</a> |";
$HTtime = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">MM:SS</a> |";
if ($RTajax > 0)
{$HTtime = " <a href=\"#\" onclick=\"update_variables('orderby','time');\">MM:SS</a> |";}
$HDcampaign = "------------+";
$HTcampaign = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("CAMPAIGN",10)."</a> |";
$HTcampaign = " <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\">"._QXZ("CAMPAIGN",10)."</a> |";
if ($RTajax > 0)
{$HTcampaign = " <a href=\"#\" onclick=\"update_variables('orderby','campaign');\">"._QXZ("CAMPAIGN",10)."</a> |";}
$HDcalls = "-------+";
$HTcalls = " "._QXZ("CALLS",5)." |";
$HDinbcalls = "-----------+";
$HTinbcalls = " "._QXZ("INB CALLS",9)." |";
$HDpause = '';
$HTpause = '';
$HDigcall = "------+-------------------";
@@ -3222,12 +3270,12 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') )
$HDstation = "";
$HTstation = "<td NOWRAP><font class='top_head_key'>&nbsp; "._QXZ("STATION")." </td>";
$HDphone = "";
$HTphone = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("PHONE")."</a>&nbsp;</td>";
$HTphone = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$phoneord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("PHONE")."</a>&nbsp;</td>";
if ($RTajax > 0)
{$HTphone = "<td NOWRAP>&nbsp;<a href=\"#\" onclick=\"update_variables('orderby','phone');\"><font class='top_head_key'>"._QXZ("PHONE")."</a>&nbsp;</td>";}
$HDuser = "";
$HTuser = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("USER")."</a> ";
$HTuser = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$userord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("USER")."</a> ";
if ($RTajax > 0)
{$HTuser = "<td NOWRAP>&nbsp;<a href=\"#\" onclick=\"update_variables('orderby','user');\"><font class='top_head_key'>&nbsp; "._QXZ("USER")."</a> ";}
if ($UidORname>0)
@@ -3236,7 +3284,7 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') )
{$HTuser .= "&nbsp;<a href=\"#\" onclick=\"update_variables('UidORname','');\"><font class='top_head_key'>"._QXZ("SHOW ID")."</a> ";}
else
{
$HTuser .= "&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("SHOW ID")."</a> ";
$HTuser .= "&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=0&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("SHOW ID")."</a> ";
}
}
else
@@ -3245,13 +3293,13 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') )
{$HTuser .= "&nbsp;<a href=\"#\" onclick=\"update_variables('UidORname','');\"><font class='top_head_key'>"._QXZ("SHOW NAME")."</a> ";}
else
{
$HTuser .= "&nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("SHOW NAME")."</a> ";
$HTuser .= "&nbsp; <a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=1&orderby=$orderby&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("SHOW NAME")."</a> ";
}
}
$HTuser .= "&nbsp;<font class='top_head_key'>"._QXZ("INFO",6)."&nbsp;</td>";
$HDusergroup = "";
$HTusergroup = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("USER GROUP")."</a>&nbsp;</td>";
$HTusergroup = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$groupord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("USER GROUP")."</a>&nbsp;</td>";
if ($RTajax > 0)
{$HTusergroup = "<td NOWRAP>&nbsp;<a href=\"#\" onclick=\"update_variables('orderby','group');\"><font class='top_head_key'>"._QXZ("USER GROUP")."</a>&nbsp;</td>";}
$HDsessionid = "";
@@ -3275,15 +3323,17 @@ if ( ($report_display_type=='HTML') or ($report_display_type=='LIMITED') )
$HDcall_server_ip = "";
$HTcall_server_ip = "<td NOWRAP><font class='top_head_key'>&nbsp; "._QXZ("CALL SERVER IP")." </td>";
$HDtime = "";
$HTtime = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>MM:SS</a>&nbsp;</td>";
$HTtime = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$timeord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>MM:SS</a>&nbsp;</td>";
if ($RTajax > 0)
{$HTtime = "<td NOWRAP>&nbsp;<a href=\"#\" onclick=\"update_variables('orderby','time');\"><font class='top_head_key'>MM:SS</a>&nbsp;</td>";}
$HDcampaign = "";
$HTcampaign = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("CAMPAIGN")."</a>&nbsp;</td>";
$HTcampaign = "<td NOWRAP>&nbsp;<a href=\"$PHP_SELF?$usergroupQS$groupQS$ingroupQS$inbcallsQS&RR=$RR&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$campaignord&SERVdisplay=$SERVdisplay&CALLSdisplay=$CALLSdisplay&PHONEdisplay=$PHONEdisplay&MONITORdisplay=$MONITORdisplay&CUSTPHONEdisplay=$CUSTPHONEdisplay&CUSTINFOdisplay=$CUSTINFOdisplay&with_inbound=$with_inbound&monitor_active=$monitor_active&monitor_phone=$monitor_phone&ALLINGROUPstats=$ALLINGROUPstats&DROPINGROUPstats=$DROPINGROUPstats&NOLEADSalert=$NOLEADSalert&ShowCustPhoneCode=$ShowCustPhoneCode&CARRIERstats=$CARRIERstats&PRESETstats=$PRESETstats&AGENTtimeSTATS=$AGENTtimeSTATS&AGENTlatency=$AGENTlatency&parkSTATS=$parkSTATS&SLAinSTATS=$SLAinSTATS&INGROUPcolorOVERRIDE=$INGROUPcolorOVERRIDE&droppedOFtotal=$droppedOFtotal&report_display_type=$report_display_type\"><font class='top_head_key'>"._QXZ("CAMPAIGN")."</a>&nbsp;</td>";
if ($RTajax > 0)
{$HTcampaign = "<td NOWRAP>&nbsp;<a href=\"#\" onclick=\"update_variables('orderby','campaign');\"><font class='top_head_key'>"._QXZ("CAMPAIGN",10)."</a>&nbsp;</td>";}
$HDcalls = "";
$HTcalls = "<td NOWRAP><font class='top_head_key'>&nbsp; "._QXZ("CALLS")." </td>";
$HDinbcalls = "";
$HTinbcalls = "<td NOWRAP><font class='top_head_key'>&nbsp; "._QXZ("INB CALLS")." </td>";
$HDpause = '';
$HTpause = '';
$HDigcall = "";
@@ -3382,13 +3432,13 @@ if ($SERVdisplay < 1)
if ($realtime_block_user_info > 0)
{
$Aline = "$HDbegin$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall$</tr>\n";
$Bline = "$HTbegin$HTusergroup$HTsessionid$HDlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall</tr>\n";
$Aline = "$HDbegin$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDinbcalls$HDlatency$HDastcall$HDigcall$</tr>\n";
$Bline = "$HTbegin$HTusergroup$HTsessionid$HDlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTinbcalls$HTlatency$HTastcall$HTigcall</tr>\n";
}
else
{
$Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDlatency$HDastcall$HDigcall</tr>\n";
$Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTlatency$HTastcall$HTigcall</tr>\n";
$Aline = "$HDbegin$HDstation$HDphone$HDuser$HDusergroup$HDsessionid$HDlisten$HDbarge$HDwhisper$HDmonitor$HDstatus$HDpause$HDcustphone$HDcustinfo$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign$HDcalls$HDinbcalls$HDlatency$HDastcall$HDigcall</tr>\n";
$Bline = "$HTbegin$HTstation$HTphone$HTuser$HTusergroup$HTsessionid$HTlisten$HTbarge$HTwhisper$HTmonitor$HTstatus$HTpause$HTcustphone$HTcustinfo$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign$HTcalls$HTinbcalls$HTlatency$HTastcall$HTigcall</tr>\n";
}
$Aecho .= "$Aline";
$Aecho .= "$Bline";
@@ -3491,7 +3541,6 @@ if ($MONITORdisplay)
# select * from live_channels where
########################
$stmt="SELECT extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id,UNIX_TIMESTAMP(last_state_change),on_hook_agent,ring_callerid,agent_log_id,vicidial_live_agents.closer_campaigns from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and vicidial_users.user_hide_realtime='0' $UgroupSQL $usergroupSQL $user_group_filter_SQL order by $orderSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
@@ -3501,6 +3550,16 @@ if ($talking_to_print > 0)
$i=0;
$va=0;
$mc=0;
# Get inbound call counts
$inbound_call_counts=array();
$inb_call_stmt="select user, count(*) from vicidial_closer_log where call_date>=date(now()) ".($all_active_inbound_calls ? "" : "and campaign_id in ($inbound_calls_SQL)")." group by user";
$inb_call_rslt=mysql_to_mysqli($inb_call_stmt, $link);
while ($inb_call_row=mysqli_fetch_row($inb_call_rslt))
{
$inbound_call_counts["$inb_call_row[0]"]=$inb_call_row[1];
}
while ($i < $talking_to_print)
{
$row=mysqli_fetch_row($rslt);
@@ -3864,6 +3923,7 @@ if ($talking_to_print > 0)
$campaign_id = sprintf("%-10s", $Acampaign_id[$i]);
$comments= $Acomments[$i];
$calls_today = sprintf("%-5s", $Acalls_today[$i]);
$inb_calls_today = sprintf("%-9s", ($inbound_call_counts["$Auser[$i]"]+0));
$monitor_info = sprintf("%-15s", $Amonitors[$i]);
$monitor_type = sprintf("%-8s", $Amonitor_types[$i]);
@@ -4373,11 +4433,11 @@ if ($talking_to_print > 0)
{
if ($realtime_block_user_info > 0)
{
$Aecho .= "|$UGD $G$sessionid$EG$L$R$Aring_note[$i]|$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n";
$Aecho .= "|$UGD $G$sessionid$EG$L$R$Aring_note[$i]|$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG | $G$inb_calls_today$EG |$LATENCY$ASTCT$INGRP\n";
}
if ($realtime_block_user_info < 1)
{
$Aecho .= "| $G$extension$EG$Aring_note[$i]|$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">+</a> |$UGD $G$sessionid$EG$L$R |$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG |$LATENCY$ASTCT$INGRP\n";
$Aecho .= "| $G$extension$EG$Aring_note[$i]|$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">+</a> |$UGD $G$sessionid$EG$L$R |$MO $G"._QXZ("$status",6)."$EG $CM $pausecode|$CP$CI$SVD$G$call_time_MS$EG | $G$campaign_id$EG | $G$calls_today$EG | $G$inb_calls_today$EG |$LATENCY$ASTCT$INGRP\n";
}
}
@@ -4571,11 +4631,11 @@ if ($talking_to_print > 0)
{
if ($realtime_block_user_info > 0)
{
$Aecho .= "<tr class='$tr_class'><td NOWRAP>$UGD $G$sessionid$EG$L$R$Aring_note[$i]</td><td NOWRAP align=center>$MO $G"._QXZ("$status",6)."$EG</td><td bgcolor=white align=center><font class='Hblank'>$CM</td>$pausecodeHTML<td NOWRAP align=right>$CP$CI$SVD$G$call_time_MS$EG </td><td NOWRAP align=right> $G$campaign_id$EG </td><td NOWRAP align=right> $G$calls_today$EG </td>$LATENCY$ASTCT$INGRP</tr>\n";
$Aecho .= "<tr class='$tr_class'><td NOWRAP>$UGD $G$sessionid$EG$L$R$Aring_note[$i]</td><td NOWRAP align=center>$MO $G"._QXZ("$status",6)."$EG</td><td bgcolor=white align=center><font class='Hblank'>$CM</td>$pausecodeHTML<td NOWRAP align=right>$CP$CI$SVD$G$call_time_MS$EG </td><td NOWRAP align=right> $G$campaign_id$EG </td><td NOWRAP align=right> $G$calls_today$EG </td><td NOWRAP align=right> $G$inb_calls_today$EG </td>$LATENCY$ASTCT$INGRP</tr>\n";
}
if ($realtime_block_user_info < 1)
{
$Aecho .= "<tr class='$tr_class'><td NOWRAP> $G$extension$EG$Aring_note[$i]</td><td NOWRAP>$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">$G+$EG</a> </td><td NOWRAP align=right>$UGD $G$sessionid$EG$L$R </td><td NOWRAP align=center>$MO $G"._QXZ("$status",6)."$EG</td><td bgcolor=white align=center><font class='Hblank'>$CM</td>$pausecodeHTML<td NOWRAP align=right>$CP$CI$SVD$G$call_time_MS$EG </td><td NOWRAP align=right> $G$campaign_id$EG </td><td NOWRAP align=right> $G$calls_today$EG </td>$LATENCY$ASTCT$INGRP</tr>\n";
$Aecho .= "<tr class='$tr_class'><td NOWRAP> $G$extension$EG$Aring_note[$i]</td><td NOWRAP>$phoneD<a href=\"./user_status.php?user=$Luser\" target=\"_blank\">$G$user$EG</a> <a href=\"javascript:ingroup_info('$Luser','$j');\">$G+$EG</a> </td><td NOWRAP align=right>$UGD $G$sessionid$EG$L$R </td><td NOWRAP align=center>$MO $G"._QXZ("$status",6)."$EG</td><td bgcolor=white align=center><font class='Hblank'>$CM</td>$pausecodeHTML<td NOWRAP align=right>$CP$CI$SVD$G$call_time_MS$EG </td><td NOWRAP align=right> $G$campaign_id$EG </td><td NOWRAP align=right> $G$calls_today$EG </td><td NOWRAP align=right> $G$inb_calls_today$EG </td>$LATENCY$ASTCT$INGRP</tr>\n";
}
}
}
+198 -14
View File
File diff suppressed because one or more lines are too long
+18 -5
View File
@@ -120,6 +120,7 @@
# 240704-2329 - Added coldstorage log view option
# 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
#
require("dbconnect_mysqli.php");
@@ -281,7 +282,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 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 FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
@@ -308,6 +309,7 @@ if ($qm_conf_ct > 0)
$SScoldstorage_login = $row[17];
$SScoldstorage_pass = $row[18];
$SScoldstorage_port = $row[19];
$SSstereo_recording = $row[20];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
@@ -4003,12 +4005,17 @@ else
$mute_column='';
if ($SSmute_recordings > 0)
{
$mute_column = "<td align=left><font size=2>"._QXZ("MUTE")."</td>";
$mute_column = "<td align=left NOWRAP><font size=1>"._QXZ("MUTE")." &nbsp; </td>";
}
$stereo_column='';
if ($SSstereo_recording > 0)
{
$stereo_column = "<td align=left NOWRAP><font size=1>"._QXZ("STEREO")."</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<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<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);
@@ -4024,7 +4031,8 @@ else
else
{$bgcolor="bgcolor=\"#$SSstd_row1_background\"";}
$location = $row[11];
$stereo_flag = $row[3];
$location = $row[11];
if (strlen($location)>2)
{
@@ -4098,7 +4106,12 @@ else
if ($SSmute_recordings > 0)
{
if ($mute_events < 1) {$mute_events='';}
echo "<td align=center><font size=2> $mute_events &nbsp; </td>\n";
echo "<td align=center><font size=1> $mute_events &nbsp; </td>\n";
}
if ($SSstereo_recording > 0)
{
if (!preg_match("/^S/",$stereo_flag)) {$stereo_flag='';}
echo "<td align=center><font size=1> $stereo_flag &nbsp; </td>\n";
}
echo "$play_audio";
echo "</tr>\n";
+17 -1
View File
@@ -1,4 +1,4 @@
# version: 20250808112301
# version: 20250917172301
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>
@@ -269,6 +269,12 @@ campaigns-campaign_rec_filename Campaign Rec Filename <QXZ>This field allows you
campaigns-allcalls_delay Recording Delay <QXZ>For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0.</QXZ>
campaigns-routing_initiated_recordings Routing Initiated Recording <QXZ>This option, if enabled, allows you to have the call routing script for Outbound auto-dial calls trigger the agent call recording instead of the agent screen. This option will only work if the recording option is set to ALLCALLS or ALLFORCE. This will work with agent manual dialed calls only if the recording delay is also set to 0. Default is N for disabled.</QXZ>
campaigns-mute_recordings Mute Recording Button <QXZ>This option, if enabled, will make the MUTE RECORDING button appear on the agent screen below the existing recording button. If a recording is muted, it will record silence or pause the recording until the MUTE RECORDING button is clicked a second time. You should not mute recordings for more than 15 minutes at a time. Default is N for disabled.</QXZ>
campaigns-stereo_recording Stereo Call Recordings <QXZ>If set to anything but DISABLED, this will allow additional stereo recordings with the customer on one side and the agent on the other for calls placed from this campaign. If set to CUSTOMER_ONLY, the agent side will be silent. If set to CUSTOMER_MUTE, the customer side will be silent. If set to BOTH_CHANNELS, then all audio will be included. Default is DISABLED.</QXZ>
campaigns-stereo_recording_agent Stereo Recording Agent Control <QXZ>If Stereo Call Recordings is enabled, this setting will define if the agent has control over the Stereo Call Recordings, and if so, how much control they have. NEVER will disable stereo recording on the client. ONDEMAND allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE is the default and will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. Default is ALLFORCE.</QXZ>
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-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>
@@ -663,6 +669,12 @@ inbound_groups-default_xfer_group Default Transfer Group <QXZ>This field is the
inbound_groups-ingroup_recording_override In-Group Recording Override <QXZ>This field allows for the overriding of the campaign call recording setting. This setting can be overridden by the user recording override setting. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording.</QXZ>
inbound_groups-routing_initiated_recordings Routing Initiated Recording <QXZ>This option, if enabled, allows you to have the call routing script for Inbound calls trigger the agent call recording instead of the agent screen. This option will only work if the recording option is set to ALLCALLS or ALLFORCE. This will not work with inbound on-hook agents. Default is N for disabled.</QXZ>
inbound_groups-ingroup_rec_filename In-Group Recording Filename <QXZ>This field will override the Campaign Recording Filenaming Scheme unless it is set to NONE. The allowed variables are CAMPAIGN INGROUP CUSTPHONE FULLDATE TINYDATE EPOCH AGENT VENDORLEADCODE LEADID CALLID RECID. If your dialers have --POST recording processing enabled, you can also use POSTVLC POSTSP POSTARRD3 POSTSTATUS. These POST options will alter the recording file name after the call has been finished and will replace the post variable with the value from the default fields. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. The resulting filename must be less than 90 characters in length. Default is NONE.</QXZ>
inbound_groups-stereo_recording Stereo Call Recordings <QXZ>If set to anything but DISABLED, this will allow additional stereo recordings with the customer on one side and the agent on the other for calls handled through this In-Group. If set to CUSTOMER_ONLY, the agent side will be silent. If set to CUSTOMER_MUTE, the customer side will be silent. If set to BOTH_CHANNELS, then all audio will be included. Default is DISABLED. NOTE: these Stereo Recording options do NOT default to inherit settings from whatever campaign the agent is logged into, which is how default mono call recording works. If you want calls handled through an In-Group to be Stereo Recorded, then that In-Group needs to have these settings enabled.</QXZ>
inbound_groups-stereo_recording_agent Stereo Recording Agent Control <QXZ>If Stereo Call Recordings is enabled, this setting will define if the agent has control over the Stereo Call Recordings for calls handled through this In-Group, and if so, how much control they have. NEVER will disable stereo recording on the client. ONDEMAND allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE is the default and will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. Default is ALLFORCE.</QXZ>
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-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>
@@ -1235,6 +1247,10 @@ settings-agent_push_url Agent Push URL <QXZ>If Agent Push Events are enabled abo
settings-log_recording_access Log Recording Access <QXZ>This option if enabled allows the logging of user access to call recordings. It also requires the User setting Access Recordings to be set to 1 to allow a user to access call recordings. Default is 0 for disabled.</QXZ>
settings-recording_buttons Recording Buttons Type <QXZ>This option allows you to choose the appearance of the recording buttons on the agent screen. START_STOP will show a START RECORDING button if the call is not recording and a STOP RECORDING button when the call is recording. The RECORDING option will show a red NOT RECORDING button if the call is not recording and a green RECORDING button when the call is recording. If NOGAP is part of the option, then the space below the recording button will be removed. If 2xHEIGHT is part of the option, then the recording button will be double the height. Default is START_STOP.</QXZ>
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-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>