Added the ability to configure when the Answer signal is sent to inbound calls at the DID, In-Group and Call Menu level.

Added Callbacks Export report

git-svn-id: svn://192.168.202.10@3259 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-06-24 23:49:49 +00:00
parent 1b7c75b86a
commit cb0bf334d0
9 changed files with 803 additions and 52 deletions
+4
View File
@@ -509,6 +509,10 @@ OTHER CHANGES:
142. Added the ability to use Automated Reports with standard SFTP and FTPSSL
remote servers.
143. Added the ability to configure when the Answer signal is sent to inbound
calls at the DID, In-Group and Call Menu level. For this to work, you
must set the conf files to be rebuilt after upgrading your systems.
+21 -9
View File
@@ -13,7 +13,7 @@
# ;inbound DID catch-all:
#exten => _X.,1,AGI(agi-DID_route.agi)
#
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 81007-0324 - First Build
@@ -45,6 +45,7 @@
# 170322-1708 - Added filter phone group entry BLANK for a blank CIDnumber
# 170923-1355 - Added system filter feature, before any other actions
# 190216-0814 - Fix for user-group, in-group and campaign settings matching issues
# 200623-2258 - Added Answer Signal options
#
@@ -146,7 +147,7 @@ $sthA->finish();
#############################################
##### START SYSTEM SETTINGS LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_system_filter FROM system_settings;";
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_system_filter,inbound_answer_config FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -167,6 +168,7 @@ if ($sthArows > 0)
$alt_log_pass = $aryA[11];
$tables_use_alt_log_db = $aryA[12];
$SSdid_system_filter = $aryA[13];
$SSinbound_answer_config = $aryA[14];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -216,7 +218,7 @@ $extension =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
if ($SSdid_system_filter > 0)
{
if ($AGILOG) {$agi_string = "-- DID SYSTEM FILTER ENABLED: |$SSdid_system_filter|"; &agi_output;}
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension FROM vicidial_inbound_dids where did_pattern = 'did_system_filter' and did_active='Y';";
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,inbound_route_answer FROM vicidial_inbound_dids where did_pattern = 'did_system_filter' and did_active='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -269,6 +271,7 @@ if ($SSdid_system_filter > 0)
$max_queue_ingroup_calls = $aryA[43];
$max_queue_ingroup_id = $aryA[44];
$max_queue_ingroup_extension = $aryA[45];
$inbound_route_answer = $aryA[46];
}
else
{
@@ -558,10 +561,14 @@ if ($SSdid_system_filter > 0)
$did_route = 'EXTEN';
}
$did_ig_prefix='99909';
if ( ($SSinbound_answer_config > 0) && ($inbound_route_answer =~ /N/i) )
{$did_ig_prefix='99809';}
### Route call to a VICIDIAL Inbound Group
if ($did_route =~ /IN_GROUP/)
{
$did_extension = "99909$S$did_id$S$S$S$route_type";
$did_extension = "$did_ig_prefix$S$did_id$S$S$S$route_type";
$exten_context = $ext_context;
$did_route = 'EXTEN';
}
@@ -569,7 +576,7 @@ if ($SSdid_system_filter > 0)
### Route call to a logged-in VICIDIAL agent
if ($did_route =~ /AGENT/)
{
$did_extension = "99909$S$did_id$S$S$S$route_type";
$did_extension = "$did_ig_prefix$S$did_id$S$S$S$route_type";
$exten_context = $ext_context;
$did_route = 'EXTEN';
}
@@ -662,7 +669,7 @@ if ($SSdid_system_filter > 0)
### Grab DID values from the database
$DIDs_in_system=0;
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension FROM vicidial_inbound_dids where did_pattern = '$extension' and did_active='Y';";
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,inbound_route_answer FROM vicidial_inbound_dids where did_pattern = '$extension' and did_active='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -715,6 +722,7 @@ if ($sthArows > 0)
$max_queue_ingroup_calls = $aryA[43];
$max_queue_ingroup_id = $aryA[44];
$max_queue_ingroup_extension = $aryA[45];
$inbound_route_answer = $aryA[46];
$DIDs_in_system++;
}
@@ -723,7 +731,7 @@ $sthA->finish();
if ($sthArows < 1)
{
### Grab DID values from the database for a default DID pattern if there is one
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension FROM vicidial_inbound_dids where did_pattern = 'default' and did_active='Y';";
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number,group_id,filter_dnc_campaign,filter_url_did_redirect,no_agent_ingroup_redirect,no_agent_ingroup_id,no_agent_ingroup_extension,pre_filter_phone_group_id,pre_filter_extension,max_queue_ingroup_calls,max_queue_ingroup_id,max_queue_ingroup_extension,inbound_route_answer FROM vicidial_inbound_dids where did_pattern = 'default' and did_active='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$DIDs_in_system=$sthA->rows;
@@ -776,6 +784,7 @@ if ($sthArows < 1)
$max_queue_ingroup_calls = $aryA[43];
$max_queue_ingroup_id = $aryA[44];
$max_queue_ingroup_extension = $aryA[45];
$inbound_route_answer = $aryA[46];
}
$sthA->finish();
}
@@ -1292,11 +1301,14 @@ if ($did_route =~ /VOICEMAIL|VMAIL_NO_INST/)
$did_route = 'EXTEN';
}
$did_ig_prefix='99909';
if ( ($SSinbound_answer_config > 0) && ($inbound_route_answer =~ /N/i) )
{$did_ig_prefix='99809';}
### Route call to a VICIDIAL Inbound Group
if ($did_route =~ /IN_GROUP/)
{
$did_extension = "99909$S$did_id$S$S$S$route_type";
$did_extension = "$did_ig_prefix$S$did_id$S$S$S$route_type";
$exten_context = $ext_context;
$did_route = 'EXTEN';
}
@@ -1305,7 +1317,7 @@ if ($did_route =~ /IN_GROUP/)
### Route call to a logged-in VICIDIAL agent
if ($did_route =~ /AGENT/)
{
$did_extension = "99909$S$did_id$S$S$S$route_type";
$did_extension = "$did_ig_prefix$S$did_id$S$S$S$route_type";
$exten_context = $ext_context;
$did_route = 'EXTEN';
}
+108 -17
View File
@@ -235,6 +235,7 @@
# 190223-0920 - Added definable play-place-in-line static prompts
# 191117-2156 - Fix for truncated extension issue #1193
# 200424-1044 - Fix for incorrect list_id logging
# 200624-0011 - Added options for Answer signal settings
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -365,7 +366,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 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 FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -392,6 +393,7 @@ if ($sthArows > 0)
$queuemetrics_socket_url = $aryA[16];
$enable_did_entry_list_id = $aryA[17];
$enable_drop_lists = $aryA[18];
$inbound_answer_config = $aryA[19];
}
$sthA->finish();
##### END SYSTEM SETTINGS LOOKUP #####
@@ -488,7 +490,7 @@ if ($callerid !~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d|^Y\d\d\d\d\d\d\d\d\d\
$user_unavailable_action='';
##### special processing for DID forwarded calls "99909*1***DID"
if ($extension =~ /^999\d\d\*/)
if ($extension =~ /^999\d\d\*|^998\d\d\*/)
{
@EXT_vars = split(/\*/, $extension);
@@ -575,14 +577,14 @@ $originalCID = $callerid;
if ($call_handle_method =~ /^CLOSER/)
{
### allow for internal PRI/IAX/SIP transfer data string "90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
if ($extension =~ /^900\d\d\*|^9900\d\d\*/)
if ($extension =~ /^900\d\d\*|^9900\d\d\*|^980\d\d\*|^9980\d\d\*/)
{
### BEGIN check for truncated extension ###
$LENGTHextension = length($extension);
$LENGTHcmd_line_b=0;
if ($callerid =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d|^Y\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/)
{
$stmtA = "SELECT cmd_line_b FROM vicidial_manager where callerid='$callerid' and action='Originate' and cmd_line_b LIKE \"Exten: 8305888888888888_90009%\" order by man_id desc limit 1;";
$stmtA = "SELECT cmd_line_b FROM vicidial_manager where callerid='$callerid' and action='Originate' and ( (cmd_line_b LIKE \"Exten: 8305888888888888_90009%\") or (cmd_line_b LIKE \"Exten: 8305888888888888_98009%\") ) order by man_id desc limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -592,6 +594,7 @@ if ($call_handle_method =~ /^CLOSER/)
@aryA = $sthA->fetchrow_array;
$cmd_line_b = $aryA[0];
$cmd_line_b =~ s/^Exten: 8305888888888888\d90009/990009/gi;
$cmd_line_b =~ s/^Exten: 8305888888888888\d98009/998009/gi;
$LENGTHcmd_line_b = length($cmd_line_b);
}
$sthA->finish();
@@ -795,7 +798,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 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 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;
@@ -931,6 +934,7 @@ if ($sthArows > 0)
$cid_cb_error_filename = $aryA[118];
$place_in_line_caller_number_filename = $aryA[119];
$place_in_line_you_next_filename = $aryA[120];
$answer_signal = $aryA[121];
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';}
@@ -944,6 +948,12 @@ if ($sthArows > 0)
}
$sthA->finish();
# If answer signal config is enabled and the in-group is set to send one, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal !~ /NONE|ROUTE/i) )
{
$AGI->answer();
}
# When VID or VIDPROMPT, methods are not used, no Vendor Lead Code can be supplied. Fill it with inbound_number
if ($call_handle_method !~ /^VID/)
{
@@ -1787,10 +1797,20 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
}
if ($after_hours_action =~ /IN_GROUP/)
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$afterhours_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$AH_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$AH_prefix='98009';}
$DROPexten = "$AH_prefix*$afterhours_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
### if DROP extension is defined then send the dropped call there instead of hangup
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
{
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
if ($no_delay_call_route =~ /N/)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
@@ -2067,10 +2087,20 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED|NO_READY/) || ($MCnanque_override > 0
$IGcampaign_id = $IGno_agent_action_value[4];
$IGphone_code = $IGno_agent_action_value[5];
$DROPexten = "90009*$IGgroup_id$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$NA_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$NA_prefix='98009';}
$DROPexten = "$NA_prefix*$IGgroup_id$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
### if DROP extension is defined then send the dropped call there instead of hangup
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
{
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
if ($no_delay_call_route =~ /N/)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
@@ -4203,6 +4233,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$dbhP=$dbhA; $mysql_count='02072'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -4288,7 +4324,10 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($hrxg_count > 1)
{
$DROPexten = "90009*$hold_recall_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$HRXG_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$HRXG_prefix='98009';}
$DROPexten = "$HRXG_prefix*$hold_recall_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
if ($no_delay_call_route =~ /N/)
{
@@ -4353,6 +4392,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$dbhB->disconnect();
}
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -4925,10 +4970,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$IGcampaign_id = $IGareacode_filter_action_value[4];
$IGphone_code = $IGareacode_filter_action_value[5];
$DROPexten = "90009*$IGgroup_id$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$AC_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$AC_prefix='98009';}
$DROPexten = "$AC_prefix*$IGgroup_id$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
### if DROP extension is defined then send the dropped call there instead of hangup
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
{
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
if ($no_delay_call_route =~ /N/)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
@@ -5242,7 +5297,10 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
if ( ($wait_time_option =~ /IN_GROUP/) && ($wait_in_queue < 2) )
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$wait_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$WT_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$WT_prefix='98009';}
$DROPexten = "$WT_prefix*$wait_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ( ($wait_time_option =~ /CALLERID_CALLBACK/) && ($wait_in_queue < 2) )
{
@@ -5491,6 +5549,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{$AGI->stream_file("$wait_time_option_callback_filename");}
}
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -5782,7 +5846,10 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
}
if ( ($hold_time_option =~ /IN_GROUP/) && ($wait_in_queue < 2) )
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$hold_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$HT_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$HT_prefix='98009';}
$DROPexten = "$HT_prefix*$hold_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ( ($hold_time_option =~ /CALLERID_CALLBACK/) && ($wait_in_queue < 2) )
{
@@ -6031,6 +6098,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{$AGI->stream_file("$hold_time_option_callback_filename");}
}
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -6339,7 +6412,10 @@ if ($closing_check > 0)
}
if ($closing_time_action =~ /IN_GROUP/)
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$closing_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$CT_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$CT_prefix='98009';}
$DROPexten = "$CT_prefix*$closing_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ($closing_time_action =~ /CALLERID_CALLBACK/)
{
@@ -6566,6 +6642,12 @@ if ($closing_check > 0)
{$AGI->stream_file("$closing_time_end_filename");}
}
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -6752,7 +6834,10 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
}
if ($drop_action =~ /IN_GROUP/)
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$drop_inbound_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$DA_prefix='90009';
if ( ($inbound_answer_config > 0) && ($answer_signal =~ /NONE/i) )
{$DA_prefix='98009';}
$DROPexten = "$DA_prefix*$drop_inbound_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ($drop_action =~ /PHONE/)
{
@@ -6825,8 +6910,14 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
### use STDOUT to send call to proper DROP location
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
### if DROP extension is defined then send the dropped call there instead of hangup
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
{
# If answer signal config is enabled and the in-group is set to send one at ROUTE, send an Answer signal
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
}
if ($no_delay_call_route =~ /N/)
{
+25 -4
View File
@@ -141,9 +141,10 @@
# 200122-0847 - Added CID Groups auto-rotate feature
# 200422-1544 - Added purging of vicidial_security_event_log table after 7 days
# 200425-0218 - Added purging of vicidial_lead_messages after 1 day
# 200623-2304 - Added Answer Signal options
#
$build = '200425-0218';
$build = '200623-2304';
$DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -427,7 +428,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 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 FROM system_settings;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -453,6 +454,7 @@ if ($sthArows > 0)
$SSexpired_lists_inactive = $aryA[15];
$SSsip_event_logging = $aryA[16];
$SScall_quota_lead_ranking = $aryA[17];
$SSinbound_answer_config = $aryA[18];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
@@ -2552,6 +2554,20 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Lext .= "exten => _473782188600XXX,n(fin),Hangup()\n";
}
$Lext .= "\n";
if ($SSinbound_answer_config > 0)
{$Lext .= "; Inbound Answer Config ENABLED\n";}
else
{$Lext .= "; Inbound Answer Config DISABLED\n";}
$Lext .= "; Unanswered inbound VICIDIAL transfer calls\n";
$Lext .= "exten => _98009.,1,Dial(\${TRUNKloop}/9\${EXTEN},,to)\n";
$Lext .= "exten => _98009.,n,Hangup()\n";
$Lext .= "exten => _998009.,1,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)\n";
$Lext .= "exten => _998009.,n,Hangup()\n";
$Lext .= "; Unanswered DID forwarded calls\n";
$Lext .= "exten => _99809*.,1,AGI(agi-VDAD_ALL_inbound.agi)\n";
$Lext .= "exten => _99809*.,n,Hangup()\n";
$Liax .= "\n";
$Liax .= "[ASTloop]\n";
$Liax .= "accountcode=ASTloop\n";
@@ -3279,7 +3295,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
##### BEGIN Generate the Call Menu entries #####
$stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field,qualify_sql,alt_dtmf_log,question FROM vicidial_call_menu order by menu_id;";
$stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field,qualify_sql,alt_dtmf_log,question,answer_signal FROM vicidial_call_menu order by menu_id;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -3305,6 +3321,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$qualify_sql[$i] = $aryA[14];
$alt_dtmf_log[$i] = $aryA[15];
$question[$i] = $aryA[16];
$answer_signal[$i] = $aryA[17];
if ($track_in_vdac[$i] > 0)
{$track_in_vdac[$i] = 'YES';}
@@ -3691,7 +3708,11 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$call_menu_ext .= "\n";
$call_menu_ext .= "; $menu_name[$i]\n";
$call_menu_ext .= "[$menu_id[$i]]\n";
$call_menu_ext .= "exten => s,1,Answer\n";
if ( ($SSinbound_answer_config > 0) && ($answer_signal[$i] =~ /N/i) )
{$call_menu_ext .= "exten => s,1,NoOp(NoAnswer-Call-Menu-Start)\n";}
else
{$call_menu_ext .= "exten => s,1,Answer\n";}
$call_menu_ext .= "exten => s,n,AGI(agi-VDAD_inbound_calltime_check.agi,$tracking_group[$i]-----$track_in_vdac[$i]-----$menu_id[$i]-----$time_check_scheme-----$time_check_route-----$time_check_route_value-----$time_check_route_context-----$qualify_sql_active[$i])\n";
$call_menu_ext .= "exten => s,n,Set(INVCOUNT=0) \n";
$call_menu_ext .= "$menu_prompt_ext";
@@ -1332,7 +1332,8 @@ place_in_line_caller_number_filename TEXT,
place_in_line_you_next_filename TEXT,
ingroup_script_two VARCHAR(20) default '',
browser_alert_sound VARCHAR(20) default '---NONE---',
browser_alert_volume TINYINT(3) UNSIGNED default '50'
browser_alert_volume TINYINT(3) UNSIGNED default '50',
answer_signal ENUM('START','ROUTE','NONE') DEFAULT 'START'
) ENGINE=MyISAM;
CREATE TABLE vicidial_stations (
@@ -1860,7 +1861,8 @@ user_account_emails ENUM('DISABLED','SEND_NO_PASS','SEND_WITH_PASS') DEFAULT 'DI
outbound_cid_any ENUM('DISABLED','API_ONLY') DEFAULT 'DISABLED',
entries_per_page SMALLINT(5) UNSIGNED DEFAULT '0',
browser_call_alerts ENUM('0','1','2') DEFAULT '0',
queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW') default 'STANDARD'
queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW') default 'STANDARD',
inbound_answer_config ENUM('0','1','2','3','4','5') DEFAULT '0'
) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix (
@@ -2180,6 +2182,7 @@ max_queue_ingroup_calls SMALLINT(5) default '0',
max_queue_ingroup_id VARCHAR(20) default '',
max_queue_ingroup_extension VARCHAR(50) default '9998811112',
did_carrier_description VARCHAR(255) default '',
inbound_route_answer ENUM('Y','N') DEFAULT 'Y',
unique index (did_pattern),
index (group_id)
) ENGINE=MyISAM;
@@ -2333,7 +2336,8 @@ dtmf_field VARCHAR(50) default 'NONE',
user_group VARCHAR(20) default '---ALL---',
qualify_sql TEXT,
alt_dtmf_log ENUM('0','1') default '0',
question INT(11) DEFAULT NULL
question INT(11) DEFAULT NULL,
answer_signal ENUM('Y','N') DEFAULT 'Y'
) ENGINE=MyISAM;
CREATE TABLE vicidial_call_menu_options (
@@ -4640,4 +4644,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1597',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1598',db_schema_update_date=NOW(),reload_timestamp=NOW();
+12
View File
@@ -1250,3 +1250,15 @@ UPDATE system_settings SET db_schema_version='1596',db_schema_update_date=NOW()
ALTER TABLE system_settings ADD queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW') default 'STANDARD';
UPDATE system_settings SET db_schema_version='1597',db_schema_update_date=NOW() where db_schema_version < 1597;
ALTER TABLE system_settings ADD inbound_answer_config ENUM('0','1','2','3','4','5') DEFAULT '0';
ALTER TABLE vicidial_inbound_dids ADD inbound_route_answer ENUM('Y','N') DEFAULT 'Y';
ALTER TABLE vicidial_call_menu ADD answer_signal ENUM('Y','N') DEFAULT 'Y';
ALTER TABLE vicidial_inbound_groups ADD answer_signal ENUM('START','ROUTE','NONE') DEFAULT 'START';
UPDATE servers SET rebuild_conf_files='Y' where active_asterisk_server='Y';
UPDATE system_settings SET db_schema_version='1598',db_schema_update_date=NOW() where db_schema_version < 1598;
File diff suppressed because one or more lines are too long
@@ -0,0 +1,555 @@
<?php
# callbacks_export.php
#
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com>, Joe Johnson <joej@vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGES
# 200622-1615 - First build
#
require("dbconnect_mysqli.php");
require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
if (isset($_GET["days"])) {$days=$_GET["days"];}
elseif (isset($_POST["days"])) {$days=$_POST["days"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];}
elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];}
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
if (isset($_GET["confirm_transfer"])) {$confirm_transfer=$_GET["confirm_transfer"];}
elseif (isset($_POST["confirm_transfer"])) {$confirm_transfer=$_POST["confirm_transfer"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["cb_groups"])) {$cb_groups=$_GET["cb_groups"];}
elseif (isset($_POST["cb_groups"])) {$cb_groups=$_POST["cb_groups"];}
if (isset($_GET["cb_user_groups"])) {$cb_user_groups=$_GET["cb_user_groups"];}
elseif (isset($_POST["cb_user_groups"])) {$cb_user_groups=$_POST["cb_user_groups"];}
if (isset($_GET["cb_lists"])) {$cb_lists=$_GET["cb_lists"];}
elseif (isset($_POST["cb_lists"])) {$cb_lists=$_POST["cb_lists"];}
if (isset($_GET["cb_users"])) {$cb_users=$_GET["cb_users"];}
elseif (isset($_POST["cb_users"])) {$cb_users=$_POST["cb_users"];}
if (isset($_GET["callback_time_start"])) {$callback_time_start=$_GET["callback_time_start"];}
elseif (isset($_POST["callback_time_start"])) {$callback_time_start=$_POST["callback_time_start"];}
if (isset($_GET["callback_time_end"])) {$callback_time_end=$_GET["callback_time_end"];}
elseif (isset($_POST["callback_time_end"])) {$callback_time_end=$_POST["callback_time_end"];}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,webroot_writable,outbound_autodial_active,enable_languages,language_method,qc_features_active FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysqli_num_rows($rslt);
if ($qm_conf_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$non_latin = $row[0];
$webroot_writable = $row[1];
$SSoutbound_autodial_active = $row[2];
$SSenable_languages = $row[3];
$SSlanguage_method = $row[4];
$SSqc_features_active = $row[5];
}
##### END SETTINGS LOOKUP #####
###########################################
if ($non_latin < 1)
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
}
else
{
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
}
$StarTtimE = date("U");
$TODAY = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
if (!isset($group)) {$group=array();}
if (!isset($users)) {$users=array();}
if (!isset($query_date)) {$query_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$ip = getenv("REMOTE_ADDR");
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
$report_name="CALLBACKS EXPORT";
$stmt="SELECT selected_language,qc_enabled from vicidial_users where user='$PHP_AUTH_USER';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VUselected_language = $row[0];
$qc_auth = $row[1];
}
$category='';
$record_id='';
$auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0);
if ($auth_message == 'GOOD')
{$auth=1;}
if ($auth < 1)
{
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
if ($auth_message == 'LOCK')
{
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
if ($auth_message == 'IPBLOCK')
{
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
exit;
}
$stmt="SELECT full_name,change_agent_campaign,modify_timeclock_log,user_group,user_level,modify_leads from vicidial_users where user='$PHP_AUTH_USER';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$LOGfullname = $row[0];
$change_agent_campaign = $row[1];
$modify_timeclock_log = $row[2];
$LOGuser_group = $row[3];
$user_level = $row[4];
$LOGmodify_leads = $row[5];
if ($user_level==9)
{
$ul_clause="where user_level<=9";
}
else
{
$ul_clause="where user_level<$user_level";
}
if ($LOGmodify_leads < 1)
{
Header ("Content-type: text/html; charset=utf-8");
echo _QXZ("You do not have permissions to modify leads").": |$PHP_AUTH_USER|\n";
exit;
}
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$LOGallowed_campaigns = $row[0];
$LOGallowed_reports = $row[1];
$LOGadmin_viewable_groups = $row[2];
$LOGadmin_viewable_call_times = $row[3];
$LOGallowed_campaignsSQL='';
$whereLOGallowed_campaignsSQL='';
if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) )
{
$rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns);
$rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL);
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
$whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')";
}
$regexLOGallowed_campaigns = " $LOGallowed_campaigns ";
$LOGadmin_viewable_groupsSQL='';
$whereLOGadmin_viewable_groupsSQL='';
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
{
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
}
$LOGadmin_viewable_call_timesSQL='';
$whereLOGadmin_viewable_call_timesSQL='';
if ( (!preg_match('/\-\-ALL\-\-/i', $LOGadmin_viewable_call_times)) and (strlen($LOGadmin_viewable_call_times) > 3) )
{
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ -/",'',$LOGadmin_viewable_call_times);
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_call_timesSQL);
$LOGadmin_viewable_call_timesSQL = "and call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
$whereLOGadmin_viewable_call_timesSQL = "where call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
}
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
###############
if ($SUBMIT)
{
##### BEGIN log visit to the vicidial_report_log table #####
$LOGip = getenv("REMOTE_ADDR");
$LOGbrowser = getenv("HTTP_USER_AGENT");
$LOGscript_name = getenv("SCRIPT_NAME");
$LOGserver_name = getenv("SERVER_NAME");
$LOGserver_port = getenv("SERVER_PORT");
$LOGrequest_uri = getenv("REQUEST_URI");
$LOGhttp_referer = getenv("HTTP_REFERER");
$LOGbrowser=preg_replace("/\'|\"|\\\\/","",$LOGbrowser);
$LOGrequest_uri=preg_replace("/\'|\"|\\\\/","",$LOGrequest_uri);
$LOGhttp_referer=preg_replace("/\'|\"|\\\\/","",$LOGhttp_referer);
if (preg_match("/443/i",$LOGserver_port)) {$HTTPprotocol = 'https://';}
else {$HTTPprotocol = 'http://';}
if (($LOGserver_port == '80') or ($LOGserver_port == '443') ) {$LOGserver_port='';}
else {$LOGserver_port = ":$LOGserver_port";}
$LOGfull_url = "$HTTPprotocol$LOGserver_name$LOGserver_port$LOGrequest_uri";
$LOGhostname = php_uname('n');
if (strlen($LOGhostname)<1) {$LOGhostname='X';}
if (strlen($LOGserver_name)<1) {$LOGserver_name='X';}
$stmt="SELECT webserver_id FROM vicidial_webservers where webserver='$LOGserver_name' and hostname='$LOGhostname' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$webserver_id_ct = mysqli_num_rows($rslt);
if ($webserver_id_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$webserver_id = $row[0];
}
else
{
##### insert webserver entry
$stmt="INSERT INTO vicidial_webservers (webserver,hostname) values('$LOGserver_name','$LOGhostname');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$affected_rows = mysqli_affected_rows($link);
$webserver_id = mysqli_insert_id($link);
}
$stmt="INSERT INTO vicidial_report_log set event_date=NOW(), user='$PHP_AUTH_USER', ip_address='$LOGip', report_name='$report_name', browser='$LOGbrowser', referer='$LOGhttp_referer', notes='$LOGserver_name:$LOGserver_port $LOGscript_name', url='$LOGfull_url', webserver='$webserver_id';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$report_log_id = mysqli_insert_id($link);
##### END log visit to the vicidial_report_log table #####
$SSmenu_background='015B91';
$SSframe_background='D9E6FE';
$SSstd_row1_background='9BB9FB';
$SSstd_row2_background='B9CBFD';
$SSstd_row3_background='8EBCFD';
$SSstd_row4_background='B6D3FC';
$SSstd_row5_background='A3C3D6';
$SSalt_row1_background='BDFFBD';
$SSalt_row2_background='99FF99';
$SSalt_row3_background='CCFFCC';
if ($SSadmin_screen_colors != 'default')
{
$stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$colors_ct = mysqli_num_rows($rslt);
if ($colors_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$SSmenu_background = $row[0];
$SSframe_background = $row[1];
$SSstd_row1_background = $row[2];
$SSstd_row2_background = $row[3];
$SSstd_row3_background = $row[4];
$SSstd_row4_background = $row[5];
$SSstd_row5_background = $row[6];
$SSalt_row1_background = $row[7];
$SSalt_row2_background = $row[8];
$SSalt_row3_background = $row[9];
$SSweb_logo = $row[10];
}
}
if (count($cb_groups)>0 && $query_date)
{
if (in_array("ALL", $cb_groups))
{
$groups_stmt="SELECT distinct campaign_id from vicidial_callbacks $whereLOGallowed_campaignsSQL";
$groups_rslt=mysql_to_mysqli($groups_stmt, $link);
$groupsSQL=" and vc.campaign_id in (";
$groupsQS="";
while($groups_row=mysqli_fetch_row($groups_rslt))
{
$groupsSQL.="'$groups_row[0]',";
$groupsQS.="&cb_groups[]=".$groups_row[0];
}
$groupsSQL=preg_replace('/,$/', '', $groupsSQL);
$groupsSQL.=") ";
}
else
{
$groupsSQL=" and vc.campaign_id in ('".implode("','", $cb_groups)."') ";
$groupsQS="";
for ($i=0; $i<count($cb_groups); $i++)
{
$groupsQS.="&cb_groups[]=".$cb_groups[$i];
}
}
if (!$end_date) {$end_date=$query_date;}
$daySQL=" and vc.callback_time>='$query_date 00:00:00' and vc.callback_time<='$end_date 23:59:59' ";
$callback_stmt="select vc.lead_id, phone_number, vc.status, entry_time, callback_time, vc.comments from vicidial_callbacks vc, vicidial_list v where v.lead_id=vc.lead_id $groupsSQL $daySQL order by callback_time asc, entry_date asc";
$callback_rslt=mysql_to_mysqli($callback_stmt, $link);
if (mysqli_num_rows($callback_rslt)>0)
{
$rpt_output="<table width='100%' cellspacing='0' cellpadding='3'>";
$rpt_output.="<tr><th colspan='6'><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2><a href='$PHP_SELF?query_date=$query_date&end_date=$end_date$groupsQS&file_download=1&SUBMIT=$SUBMIT'>[DOWNLOAD AS CSV FILE]</A></font></th></tr>";
$rpt_output.="<tr bgcolor='#000'>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Lead ID")."</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Phone number")."</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Callback status")."</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Callback entry time")."</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Scheduled callback time")."</FONT></th>";
$rpt_output.="<th><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=1>"._QXZ("Notes")."</FONT></th>";
$rpt_output.="</tr>";
$CSV_output="\"LEAD ID\",\"PHONE NUMBER\",\"STATUS\",\"CALLBACK ENTRY TIME\",\"SCHEDULED CALLBACK TIME\",\"NOTES\"\n";
$i=0;
while($callback_row=mysqli_fetch_array($callback_rslt))
{
$i++;
if ($i%2==0) {$bgcolor=$SSstd_row1_background;} else {$bgcolor=$SSstd_row2_background;}
$rpt_output.="<tr bgcolor='".$bgcolor."'>\n";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[lead_id]</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[phone_number]</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[status]</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[entry_time]</FONT></th>";
$rpt_output.="<th nowrap><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[callback_time]</FONT></th>";
$rpt_output.="<th><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$callback_row[comments]</FONT></th>";
$rpt_output.="</tr>";
$CSV_output.="\"$callback_row[lead_id]\",\"$callback_row[phone_number]\",\"$callback_row[status]\",\"$callback_row[entry_time]\",\"$callback_row[callback_time]\",\"$callback_row[comments]\"\n";
}
$rpt_output.="</table>";
# $rpt_output.=$callback_stmt."*\n";
if ($DB) {$rpt_output.=$callback_stmt."*\n";}
$endMS = microtime();
$startMSary = explode(" ",$startMS);
$endMSary = explode(" ",$endMS);
$runS = ($endMSary[0] - $startMSary[0]);
$runM = ($endMSary[1] - $startMSary[1]);
$TOTALrun = ($runS + $runM);
$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($file_download)
{
$FILE_TIME = date("Ymd-His");
$CSVfilename = "CALLBACKS_EXPORT_$FILE_TIME.csv";
header('Content-type: application/octet-stream');
header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
ob_clean();
flush();
echo "$CSV_output";
if ($db_source == 'S')
{
mysqli_close($link);
$use_slave_server=0;
$db_source = 'M';
require("dbconnect_mysqli.php");
}
### LOG INSERTION Admin Log Table ###
$SQL_log = "$callback_stmt";
$SQL_log = preg_replace('/;/', '', $SQL_log);
$SQL_log = addslashes($SQL_log);
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLBACKS', event_type='EXPORT', record_id='', event_code='ADMIN EXPORT CALLBACKS REPORT', event_sql=\"$SQL_log\", event_notes='';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
exit;
}
}
else
{
$err_msg="<tr><th colspan=2><B><font color='#F00'>** NO RESULTS FOUND **</th></tr>";
}
}
else
{
$err_msg="<tr><th colspan=2><B><font color='#F00'>** REPORT NOT RUN - SOME VALUES MISSING **</th></tr>";
}
}
###############
echo "<html>\n";
echo "<head>\n";
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
echo "<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
echo "<link rel=\"stylesheet\" href=\"calendar.css\">\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
echo "<script language=\"JavaScript\" src=\"help.js\"></script>\n";
echo "<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>\n";
echo "<title>"._QXZ("ADMINISTRATION: Callbacks Bulk Move");
##### BEGIN Set variables to make header show properly #####
$ADD = '311111';
$hh = 'usergroups';
$LOGast_admin_access = '1';
$ADMIN = 'admin.php';
$page_width='770';
$section_width='750';
$header_font_size='3';
$subheader_font_size='2';
$subcamp_font_size='2';
$header_selected_bold='<b>';
$header_nonselected_bold='';
$usergroups_color = '#FFFF99';
$usergroups_font = 'BLACK';
$usergroups_color = '#E6E6E6';
$subcamp_color = '#C6C6C6';
##### END Set variables to make header show properly #####
require("admin_header.php");
echo "<CENTER>\n";
echo "<TABLE WIDTH=680 BGCOLOR='#".$SSmenu_background."' cellpadding=2 cellspacing=0><TR BGCOLOR='#".$SSmenu_background."'><TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=2><B> &nbsp; "._QXZ("Callbacks Export")."$NWB#cb-export$NWE</TD><TD ALIGN=RIGHT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=2><B> &nbsp; </TD></TR>\n";
echo "<TR BGCOLOR=\"#".$SSstd_row1_background."\"><TD ALIGN=center COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=3><B> &nbsp; \n";
### callbacks change form
echo "<form action=$PHP_SELF method=GET name='vicidial_report'>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
$purge_trigger=0;
$callback_statuses="'LIVE'";
$purge_verbiage=array();
echo "<table width='650' align='center' border=0>";
echo $err_msg;
echo "<tr>";
echo "<td align='left' width='270'>";
$stmt="SELECT campaign_id, count(*) as ct from vicidial_callbacks $whereLOGallowed_campaignsSQL group by campaign_id order by campaign_id";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
echo "<B>"._QXZ("Campaigns with callbacks").":</B>$NWB#cb-bulk-campaigns$NWE<BR><select name='cb_groups[]' size=5 multiple>\n";
echo "<option value='ALL'>--- "._QXZ("ALL CAMPAIGNS")." ---</option>\n";
if (mysqli_num_rows($rslt)>0)
{
while ($row=mysqli_fetch_array($rslt))
{
if (in_array($row["campaign_id"], $cb_groups)) {$s=" selected";} else {$s="";}
echo "\t<option value='$row[campaign_id]'$s>".($row["campaign_id"] ? $row["campaign_id"] : "(none)")." - ($row[ct] "._QXZ("callbacks").")</option>\n";
}
}
else
{
echo "\t<option value=''>**"._QXZ("NO CALLBACKS")."**</option>\n";
}
echo "</select>";
echo "</td>";
echo "<TD VALIGN=TOP align='left'><B>"._QXZ("Scheduled Callback Dates").":$NWB#cb-export-cb-dates$NWE<BR>";
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
echo "<script language=\"JavaScript\">\n";
echo "function openNewWindow(url)\n";
echo " {\n";
echo " window.open (url,\"\",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes');\n";
echo " }\n";
echo "var o_cal = new tcal ({\n";
echo " // form name\n";
echo " 'formname': 'vicidial_report',\n";
echo " // input name\n";
echo " 'controlname': 'query_date'\n";
echo "});\n";
echo "o_cal.a_tpl.yearscroll = false;\n";
echo "// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
echo "</script>\n";
echo "<BR> "._QXZ("to")." <BR><INPUT TYPE=TEXT NAME=end_date SIZE=10 MAXLENGTH=10 VALUE=\"$end_date\">";
echo "<script language=\"JavaScript\">\n";
echo "var o_cal = new tcal ({\n";
echo " // form name\n";
echo " 'formname': 'vicidial_report',\n";
echo " // input name\n";
echo " 'controlname': 'end_date'\n";
echo "});\n";
echo "o_cal.a_tpl.yearscroll = false;\n";
echo "// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
echo "</script>\n";
echo "</B></TD>";
echo "<tr>";
echo "<td align='center' colspan='2'>";
echo "<input type='submit' name='SUBMIT' value='SUBMIT'><BR/><BR/>";
echo "</td>";
echo "</tr>";
echo "</TR>";
echo "</table>";
echo "</table>";
echo "<BR><BR>";
echo $rpt_output;
echo "</form>\n";
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtimE);
echo "\n\n\n<br><br><br>\n\n";
echo "<font size=0>\n\n\n<br><br><br>\n"._QXZ("script runtime").": $RUNtime "._QXZ("seconds")."</font>";
?>
</TD></TR><TABLE>
</body>
</html>
@@ -1,4 +1,4 @@
# version: 202000619164701
# version: 202000623213201
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. 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. Default is N.</QXZ>
@@ -464,6 +464,7 @@ inbound_groups-status_group_id Status Group Override <QXZ>If this field is set,
inbound_groups-get_call_launch Get Call Launch <QXZ>This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT, EMAIL, or CHAT tab ,emails and chats must be allowed to have those options available, or do nothing when a call is sent to the agent for this campaign. If custom list fields are enabled on your system, FORM will open the FORM tab upon connection of a call to an agent.</QXZ>
inbound_groups-browser_alert_sound Agent Browser Call Alert Sound <QXZ>This option will override the same campaign setting for calls from this inbound group, if not set to ---DISABLED---. Default is ---DISABLED---.</QXZ>
inbound_groups-group_handling Group Handling <QXZ>This menu allows you to choose what type of inbound activity this group should handle. PHONE means this in-group is for handling phone calls and will show under the In-Group section. EMAIL is for handling incoming emails and will cause the group to be listed under the Email Group section. CHAT is for handling customer chats and will cause the group to be listed under the Email Group section</QXZ>
inbound_groups-answer_signal Answer Signal <QXZ>If set to START, an Answer signal will be sent to the call as soon as it arrives in the In-Group. If set to ROUTE, an Answer signal will be sent to the call when it is routed away from the In-Group. If set to NONE, no Answer signal will be sent. Default is START.</QXZ>
inbound_groups-xferconf_a_dtmf Xfer-Conf DTMF <QXZ>These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the agent screen will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, have the agent use the CONSULTATIVE checkbox, which does not work for third party agent screen consultative calls. For those just have the agent click the Dial With Customer button. Then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to an AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify a custom extension after the AXFER, for instance if you want to do a call to a special IVR you have set to extension 83900 you would put AXFER83900 in the number-to-dial field.</QXZ>
inbound_groups-timer_action Timer Action <QXZ>This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. This setting will override the Campaign settings. HANGUP will hang up the call when the timer is triggered, CALLMENU will send the call to the Call Menu specified in the Timer Action Destination field, EXTENSION will send the call to the Extension that is specified in the Timer Action Destination field, IN_GROUP will send the call to the In-Group specified in the Timer Action Destination field.</QXZ>
inbound_groups-timer_action_message Timer Action Message <QXZ>This is the message that appears on the agent screen at the time the Timer Action is triggered.</QXZ>
@@ -611,6 +612,7 @@ inbound_dids-did_active DID Active <QXZ>This the field where you set the DID ent
inbound_dids-user_group Admin User Group <QXZ>This is the administrative user group for this did, this allows admin viewing of this did restricted by user group. Default is --ALL-- which allows any admin user to view this did.</QXZ>
inbound_dids-did_route DID Route <QXZ>This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to an agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN. CALLMENU will send the call to the defined Call Menu. VMAIL_NO_INST will send the call to the voicemail box that you have defined below and will not play instructions after the voicemail message.</QXZ>
inbound_dids-record_call Record Call <QXZ>This option allows you to set the calls coming into this DID to be recorded. Y will record the entire call, Y_QUEUESTOP will record the call until the call is hungup or enters an in-group queue, N will not record the call. Default is N.</QXZ>
inbound_dids-inbound_route_answer Route Answer <QXZ>If enabled, the phone call will receive an Answer signal when it is routed to an In-Group or Agent. Default is Y.</QXZ>
inbound_dids-extension Extension <QXZ>If EXTEN is selected as the DID Route, then this is the dialplan extension that calls will be sent to. Default is 9998811112, no-service.</QXZ>
inbound_dids-exten_context Extension Context <QXZ>If EXTEN is selected as the DID Route, then this is the dialplan context that calls will be sent to. If you want to send calls to VOICEMAIL or VMAIL_NO_INST, then you need to set this option to default for it to work properly. Default is default.</QXZ>
inbound_dids-voicemail_ext Voicemail Box <QXZ>If VOICEMAIL is selected as the DID Route, then this is the voicemail box that calls will be sent to. Default is empty.</QXZ>
@@ -660,6 +662,7 @@ call_menu-dtmf_log Log Key Press <QXZ>This option if enabled will log the DTMF k
call_menu-dtmf_field Log Field <QXZ>If the Log Key Press option is enabled, this optional setting can allow the response to also be stored in this list field. vendor_lead_code, source_id, phone_code, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, alt_phone, email, security_phrase, comments, rank, owner, status, user. Default is NONE for disabled.</QXZ>
call_menu-alt_dtmf_log Alt DTMF Log <QXZ>This option if enabled will log the DTMF key press by the caller in this Call Menu to a separate database table. Default is 0 for disabled.</QXZ>
call_menu-question Question <QXZ>If the Alt DTMF Log option is enabled, this is the question number that the response will be logged to. Default is blank for disabled.</QXZ>
call_menu-answer_signal Beginning Answer Signal <QXZ>If enabled, an Answer signal will be sent to the call before the Menu Prompt is played. Default is Y.</QXZ>
call_menu-option_value Option Value <QXZ>This field is where you define the menu option, possible choices are: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. The special option TIMECHECK can be used only if you have Menu Time Check enabled and there is a Call Time defined for the Menu. To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button. TIMEOUT will allow you to set what happens to the call when it times out with no input from the caller. INVALID will allow you to set what happens when the caller enters an invalid option. INVALID_2ND and 3RD can only be active if INVALID is not used, it will wait until the second or third invalid entry by the caller before it executes the option.</QXZ>
call_menu-option_description Option Description <QXZ>This field is where you can describe the option, this description will be put into the dialplan as a comment above the option.</QXZ>
call_menu-option_route Option Route <QXZ>This menu contains the options for where to send the call if this option is selected: CALLMENU,INGROUP,DID,HANGUP,EXTENSION,PHONE. For CALLMENU, the Route Value should be the Menu ID of the Call Menu that you want the call sent to. For INGROUP, the In-Group that you want the call to be sent to needs to be selected as well as the other 5 options that need to be set to properly route a call to an Inbound Group. For DID, the Route Value needs to be the DID pattern that you want to send the call to. For HANGUP, the Route Value can be the name of an audio file to play before hanging up the call. For EXTENSION, the Route Value needs to be the dialplan extension you want to send the call to, and the Route Value Context is the context that extension is located in, if left blank the context will default to default. For PHONE, the Route Value needs to be the phone login value for the phones entry that you want to send the call to. For VOICEMAIL, the Route Value needs to be the voicemail box number, the unavailable message will be played. For AGI, the Route Value needs to be the agi script and any values that need to be passed to it. VMAIL_NO_INST will send the call to the voicemail box that you have defined below and will not play instructions after the voicemail message.</QXZ>
@@ -1040,6 +1043,7 @@ settings-enable_tts_integration Enable TTS Integration <QXZ>This setting allows
settings-callcard_enabled Enable CallCard <QXZ>This setting enables the CallCard features to allow for callers to use pin numbers and card_ids that have a balance of minutes and those balances can have agent talk time on customer calls to in-groups deducted. Default is 0 for disabled.</QXZ>
settings-test_campaign_calls Enable Campaign Test Calls <QXZ>This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled.</QXZ>
settings-did_system_filter DID System Filter <QXZ>This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled.</QXZ>
settings-inbound_answer_config Inbound Answer Configuration <QXZ>If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled.</QXZ>
settings-user_new_lead_limit New Leads Per List Limit <QXZ>This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled.</QXZ>
settings-call_quota_lead_ranking Call Quota Lead Ranking <QXZ>This setting allows you to use the campaign setting for Call Quota Lead Ranking, which allows for a complex set of recycle dialing priorities for non-contact calls. Default is 0 for disabled.</QXZ>
settings-custom_fields_enabled Enable Custom List Fields <QXZ>This setting enables the custom list fields feature that allows for custom data fields to be defined in the administration web interface on a per-list basis and then have those fields available in a FORM tab to the agent in the agent web interface. Default is 0 for disabled.</QXZ>
@@ -1283,6 +1287,8 @@ cb-bulk-purge Purge called records <QXZ>If this box is checked, before the leads
cb-bulk-liveanduncalled Live and uncalled for over XX days <QXZ>Selecting a date range from this drop down menu will filter out any callback where the scheduled callback time is past the selected number of days from the current date and time. This will combine with other selected criteria to make a final list of callbacks to move.</QXZ>
cb-bulk-newlist Transfer to List ID <QXZ>The list ID to which all callbacks will be moved. The move will occur on the records in vicidial_list table - the matching records in vicidial_callbacks will be removed.</QXZ>
cb-bulk-newstatus New Status <QXZ>The new vicidial_list status the selected callbacks will be updated to. This affects the vicidial_list table ONLY.</QXZ>
cb-export Callbacks export <QXZ>This page is used to view and download a list of all scheduled callbacks based on the campaigns selected and the dates the callbacks are scheduled to be contacted.</QXZ>
cb-export-cb-dates Scheduled callback dates <QXZ>The date the leads are scheduled to be called back.</QXZ>
alt_multi_urls Alternate Multi URLs <QXZ>This page allows you to define Alternate URLs with conditions in place of the simple URL option for Dispo, Start, Add Lead or No Agent URLs. The RANK field will define the order in which the URLs are requested, this is important because if you have a URL that may take a few seconds to run ranked as 1, that will mean that any URLs ranked after it will have to wait to be run until that first URL request receives a response. The ACTIVE field will determine whether the specific URL is run. The STATUSES field only works for the Dispo URLs and will determine which disposition statuses will trigger the URL being run, if you want to run the entry for all statuses just fill in ---ALL--- in this field, if you want only a few statuses, separate them by spaces. If populated, the LISTS field will limit the calls that the URL is run from to only the list IDs listed in this field. To have it run for all lists, leave the field blank, if you want only a few lists, separate them by spaces. The URL field works the same as it would in the URL option in campaigns, in-groups and lists, and it is also limited to 2000 characters in length. If you want to delete a URL, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that URL entry.</QXZ>
amm_multi AM Message Wildcards <QXZ>This page allows you to define Am Message Wildcards that will check lead data from the defined lead fields for matches in the defined order specified on this page. For example, if you add a wildcard with the word -vacation- tied to the vendor_lead_code field, and the lead being played a message has -vacation- in that field, then it will hear the message defined in that AM Message Wildcard record. If you want to delete a wildcard, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that wildcard entry</QXZ>
user_list_new_limits User List New Lead Limits <QXZ>If the system setting for New Leads Per List Limit is enabled, then this page allows for the setting of per-user per-list new lead limit overrides to those List limits. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled.</QXZ>