Added validation that sounds web dir exists for audio store and non-agent API
Enabled required custom list fields with INBOUND_ONLY option git-svn-id: svn://192.168.202.10@2693 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -106,6 +106,11 @@ OTHER CHANGES:
|
||||
17. Changed Custom Fields of SCRIPT type to allow URLs and urlencoded variables
|
||||
when using --U-- and --V-- to declare variables
|
||||
|
||||
18. Added option for custom list fields to be required for all calls or only
|
||||
inbound calls. Will prevent agent hanging up call if field is not filled
|
||||
in. Must also have campaign option enabled for it to work. Will work for
|
||||
the following custom field types: TEXT, AREA, DATE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2017-02-19
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2017-03-01
|
||||
|
||||
This document describes the functions of an API(Application Programming
|
||||
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
||||
@@ -119,6 +119,8 @@ Changes:
|
||||
170204-0947 - Added phone_number_log function
|
||||
170209-1149 - Added URL and IP logging
|
||||
170219-1520 - Added 90-day duplicate check option
|
||||
170223-0743 - Added QXZ translation to admin web user functions text
|
||||
170301-1649 - Added validation that sounds web dir exists to sounds_list function
|
||||
|
||||
|
||||
API Functions use the 'function' variable
|
||||
@@ -162,7 +164,7 @@ Example responses:
|
||||
<success is inferred by output of audio files list>
|
||||
|
||||
ERROR: sounds_list USER DOES NOT HAVE PERMISSION TO VIEW SOUNDS LIST
|
||||
|
||||
ERROR: audio store web directory does not exist: |6666|sounds_list|/srv/www/htdocs/1234|
|
||||
ERROR: sounds_list CENTRAL SOUND CONTROL IS NOT ACTIVE
|
||||
|
||||
|
||||
|
||||
@@ -2613,7 +2613,7 @@ field_size SMALLINT(5),
|
||||
field_max SMALLINT(5),
|
||||
field_default VARCHAR(255),
|
||||
field_cost SMALLINT(5),
|
||||
field_required ENUM('Y','N') default 'N',
|
||||
field_required ENUM('Y','N','INBOUND_ONLY') default 'N',
|
||||
name_position ENUM('LEFT','TOP') default 'LEFT',
|
||||
multi_position ENUM('HORIZONTAL','VERTICAL') default 'HORIZONTAL',
|
||||
field_order SMALLINT(5) default '1',
|
||||
@@ -3870,4 +3870,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1490',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1491',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -74,3 +74,7 @@ ALTER TABLE vicidial_closer_log MODIFY term_reason ENUM('CALLER','AGENT','QUEUE
|
||||
ALTER TABLE vicidial_closer_log_archive MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE','MAXCALLS','ACFILTER') default 'NONE';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1490',db_schema_update_date=NOW() where db_schema_version < 1490;
|
||||
|
||||
ALTER TABLE vicidial_lists_fields MODIFY field_required ENUM('Y','N','INBOUND_ONLY') default 'N';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1491',db_schema_update_date=NOW() where db_schema_version < 1491;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
# 160510-2151 - Fixed issues with select lists and common contents
|
||||
# 160913-0827 - Fixed issues with multiple selected values in custom fields
|
||||
# 170228-2258 - Changes to allow URLs in SCRIPT field types
|
||||
# 170301-0837 - Added functionality for required custom fields
|
||||
#
|
||||
|
||||
# $mysql_queries = 20
|
||||
@@ -229,13 +230,14 @@ function user_authorization($user,$pass,$user_option,$user_update,$bcrypt,$retur
|
||||
|
||||
|
||||
##### BEGIN custom_list_fields_values - gather values for display of custom list fields for a lead #####
|
||||
function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB)
|
||||
function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id)
|
||||
{
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
|
||||
$vicidial_list_fields = '|lead_id|vendor_lead_code|source_id|list_id|gmt_offset_now|called_since_last_reset|phone_code|phone_number|title|first_name|middle_initial|last_name|address1|address2|address3|city|state|province|postal_code|country_code|gender|date_of_birth|alt_phone|email|security_phrase|comments|called_count|last_local_call_time|rank|owner|';
|
||||
$custom_required_fields='|';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
|
||||
@@ -447,12 +449,16 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB)
|
||||
if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';}
|
||||
if (strlen($A_field_value[$o]) < 1) {$A_field_value[$o] = $A_field_default[$o];}
|
||||
$field_HTML .= "<input type=text size=$A_field_size[$o] maxlength=$A_field_max[$o] name=$A_field_label[$o] id=$A_field_label[$o] value=\""._QXZ("$A_field_value[$o]")."\">\n";
|
||||
if ( ($A_field_required[$o] == 'Y') or ( ($A_field_required[$o] == 'INBOUND_ONLY') and (preg_match("/^Y\d\d\d\d\d\d\d/",$call_id)) ) )
|
||||
{$custom_required_fields .= "$A_field_label[$o]|";}
|
||||
}
|
||||
if ($A_field_type[$o]=='AREA')
|
||||
{
|
||||
if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';}
|
||||
if (strlen($A_field_value[$o]) < 1) {$A_field_value[$o] = $A_field_default[$o];}
|
||||
$field_HTML .= "<textarea name=$A_field_label[$o] id=$A_field_label[$o] ROWS=$A_field_max[$o] COLS=$A_field_size[$o]>$A_field_value[$o]</textarea>";
|
||||
if ( ($A_field_required[$o] == 'Y') or ( ($A_field_required[$o] == 'INBOUND_ONLY') and (preg_match("/^Y\d\d\d\d\d\d\d/",$call_id)) ) )
|
||||
{$custom_required_fields .= "$A_field_label[$o]|";}
|
||||
}
|
||||
if ($A_field_type[$o]=='DISPLAY')
|
||||
{
|
||||
@@ -490,6 +496,8 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB)
|
||||
$field_HTML .= " 'controlname': '$A_field_label[$o]'});\n";
|
||||
$field_HTML .= "o_cal.a_tpl.yearscroll = false;\n";
|
||||
$field_HTML .= "</script>\n";
|
||||
if ( ($A_field_required[$o] == 'Y') or ( ($A_field_required[$o] == 'INBOUND_ONLY') and (preg_match("/^Y\d\d\d\d\d\d\d/",$call_id)) ) )
|
||||
{$custom_required_fields .= "$A_field_label[$o]|";}
|
||||
}
|
||||
if ($A_field_type[$o]=='TIME')
|
||||
{
|
||||
@@ -970,6 +978,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB)
|
||||
if ($DB > 0) {echo "$CFoutput<BR>\n";}
|
||||
}
|
||||
##### END parsing for vicidial variables #####
|
||||
echo "<input type=hidden name=custom_required id=custom_required value=\"$custom_required_fields\">\n";
|
||||
|
||||
|
||||
return $CFoutput;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vdc_form_display.php
|
||||
#
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed display the contents of the FORM tab in the agent
|
||||
# interface, as well as take submission of the form submission when the agent
|
||||
@@ -36,10 +36,11 @@
|
||||
# 150923-2027 - Added DID custom variables
|
||||
# 160129-1019 - Added missing pass field to SUBMIT stage form
|
||||
# 160912-0805 - Added debug, fixed issue with multi-selected values
|
||||
# 170301-0834 - Added call_id field for custom fields
|
||||
#
|
||||
|
||||
$version = '2.12-26';
|
||||
$build = '160912-0805';
|
||||
$version = '2.14-27';
|
||||
$build = '170301-0834';
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
require_once("functions.php");
|
||||
@@ -508,12 +509,13 @@ else
|
||||
echo "<input type=hidden name=list_id id=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=user id=user value=\"$user\">\n";
|
||||
echo "<input type=hidden name=pass id=pass value=\"$pass\">\n";
|
||||
echo "<input type=hidden name=call_id id=call_id value=\"$call_id\">\n";
|
||||
echo "\n";
|
||||
|
||||
|
||||
require_once("functions.php");
|
||||
|
||||
$CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB);
|
||||
$CFoutput = custom_list_fields_values($lead_id,$list_id,$uniqueid,$user,$DB,$call_id);
|
||||
|
||||
echo "$CFoutput";
|
||||
|
||||
|
||||
@@ -541,10 +541,11 @@
|
||||
# 170217-1359 - Added dead_to_dispo campaign option
|
||||
# 170220-1306 - Added external_lead_id trigger for switch_lead API function
|
||||
# 170223-2122 - Fixed rare recording issue
|
||||
# 170301-0839 - Added functionality for required custom fields
|
||||
#
|
||||
|
||||
$version = '2.14-511c';
|
||||
$build = '170223-2122';
|
||||
$version = '2.14-512c';
|
||||
$build = '170301-0839';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=87;
|
||||
$one_mysql_log=0;
|
||||
@@ -11600,6 +11601,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
if (allow_required_fields=='Y')
|
||||
{
|
||||
var required_fields_list = document.vicidial_form.required_fields.value;
|
||||
var error_field_list='';
|
||||
if (required_fields_list.length > 4)
|
||||
{
|
||||
var regRFtitle = new RegExp("title","ig");
|
||||
@@ -11618,7 +11620,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
var regRFvendor_lead_code = new RegExp("vendor_lead_code","ig");
|
||||
var regRFsecurity_phrase = new RegExp("security_phrase","ig");
|
||||
var regRFemail = new RegExp("email","ig");
|
||||
var error_field_list='';
|
||||
|
||||
if (required_fields_list.match(regRFtitle))
|
||||
{
|
||||
@@ -11701,9 +11702,32 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
if (TEMP_email.length < 1){required_fail++; error_field_list = error_field_list + " email";}
|
||||
}
|
||||
}
|
||||
if (custom_fields_enabled > 0)
|
||||
{
|
||||
var temp_custom_required = vcFormIFrame.document.form_custom_fields.custom_required.value;
|
||||
// alert_box("checking for required custom fields: " + temp_custom_required);
|
||||
|
||||
if (temp_custom_required.length > 2)
|
||||
{
|
||||
var CFR_array=temp_custom_required.split('|');
|
||||
var CFR_count=CFR_array.length;
|
||||
var CFR_tick=0;
|
||||
while (CFR_tick < CFR_count)
|
||||
{
|
||||
var CFR_field = CFR_array[CFR_tick];
|
||||
if (CFR_field.length > 0)
|
||||
{
|
||||
var temp_field_check = vcFormIFrame.document.getElementById(CFR_field).value;
|
||||
if (temp_field_check.length < 1){required_fail++; error_field_list = error_field_list + " CF: " + CFR_field;}
|
||||
}
|
||||
CFR_tick++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (required_fail > 0)
|
||||
{
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----required_fields_alert---" + error_field_list + "|";
|
||||
alert_box("<?php echo _QXZ("YOU MUST FILL IN ALL REQUIRED FIELDS BEFORE YOU CAN HANG UP THIS CALL");?>: " + error_field_list);
|
||||
}
|
||||
else
|
||||
@@ -15764,7 +15788,9 @@ function phone_number_format(formatphone) {
|
||||
var form_entry_list_id = document.vicidial_form.entry_list_id.value;
|
||||
if (form_entry_list_id.length > 2)
|
||||
{form_list_id = form_entry_list_id}
|
||||
document.getElementById('vcFormIFrame').src='./<?php echo $vdc_form_display ?>?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + pass + '&campaign=' + campaign + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&agent_email=" + LOGemail + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' +"&xfercallid=" + xfercallid + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + "&called_count=" + document.vicidial_form.called_count.value + '' + "&did_custom_one=" + did_custom_one + "&did_custom_two=" + did_custom_two + "&did_custom_three=" + did_custom_three + "&did_custom_four=" + did_custom_four + "&did_custom_five=" + did_custom_five + "&web_vars=" + LIVE_web_vars + '';
|
||||
var temp_vcFormIFrame_url = './<?php echo $vdc_form_display ?>?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + pass + '&campaign=' + campaign + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&agent_email=" + LOGemail + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' +"&xfercallid=" + xfercallid + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + "&called_count=" + document.vicidial_form.called_count.value + '' + "&did_custom_one=" + did_custom_one + "&did_custom_two=" + did_custom_two + "&did_custom_three=" + did_custom_three + "&did_custom_four=" + did_custom_four + "&did_custom_five=" + did_custom_five + "&web_vars=" + LIVE_web_vars + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '';
|
||||
document.getElementById('vcFormIFrame').src = temp_vcFormIFrame_url;
|
||||
// alert_box(temp_vcFormIFrame_url);
|
||||
form_list_id = '';
|
||||
form_entry_list_id = '';
|
||||
}
|
||||
@@ -15780,7 +15806,7 @@ function phone_number_format(formatphone) {
|
||||
var form_entry_list_id = document.vicidial_form.entry_list_id.value;
|
||||
if (form_entry_list_id.length > 2)
|
||||
{form_list_id = form_entry_list_id}
|
||||
document.getElementById('vcEmailIFrame').src='./vdc_email_display.php?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + orig_pass + '&campaign=' + campaign + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&agent_email=" + LOGemail + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' +"&xfercallid=" + xfercallid + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + '' + "&did_custom_one=" + did_custom_one + "&did_custom_two=" + did_custom_two + "&did_custom_three=" + did_custom_three + "&did_custom_four=" + did_custom_four + "&did_custom_five=" + did_custom_five + "&web_vars=" + LIVE_web_vars + '';
|
||||
document.getElementById('vcEmailIFrame').src='./vdc_email_display.php?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + orig_pass + '&campaign=' + campaign + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&agent_email=" + LOGemail + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' +"&xfercallid=" + xfercallid + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + '' + "&did_custom_one=" + did_custom_one + "&did_custom_two=" + did_custom_two + "&did_custom_three=" + did_custom_three + "&did_custom_four=" + did_custom_four + "&did_custom_five=" + did_custom_five + "&web_vars=" + LIVE_web_vars + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' ;
|
||||
form_list_id = '';
|
||||
form_entry_list_id = '';
|
||||
}
|
||||
@@ -15795,7 +15821,7 @@ function phone_number_format(formatphone) {
|
||||
var form_chat_id = document.vicidial_form.chat_id.value;
|
||||
if (form_entry_list_id.length > 2)
|
||||
{form_list_id = form_entry_list_id}
|
||||
document.getElementById('CustomerChatIFrame').src='./vdc_chat_display.php?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + orig_pass + '&campaign=' + campaign + '&chat_id=' + form_chat_id + '&dial_method=' + dial_method + '&clickmute=' + clickMute + '&email_invite_lead_id=' + email_invite_lead_id + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' + "&xfercallid=" + xfercallid + '' + "&chat_group_id=" + VDCL_group_id + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + '' +"&web_vars=" + LIVE_web_vars + '';
|
||||
document.getElementById('CustomerChatIFrame').src='./vdc_chat_display.php?lead_id=' + document.vicidial_form.lead_id.value + '&list_id=' + form_list_id + '&user=' + user + '&pass=' + orig_pass + '&campaign=' + campaign + '&chat_id=' + form_chat_id + '&dial_method=' + dial_method + '&clickmute=' + clickMute + '&email_invite_lead_id=' + email_invite_lead_id + '&server_ip=' + server_ip + '&session_id=' + '&uniqueid=' + document.vicidial_form.uniqueid.value + '&stage=DISPLAY' + "&campaign=" + campaign + "&phone_login=" + phone_login + "&original_phone_login=" + original_phone_login +"&phone_pass=" + phone_pass + "&fronter=" + fronter + "&closer=" + user + "&group=" + group + "&channel_group=" + group + "&SQLdate=" + SQLdate + "&epoch=" + UnixTime + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&customer_zap_channel=" + lastcustchannel + "&customer_server_ip=" + lastcustserverip +"&server_ip=" + server_ip + "&SIPexten=" + extension + "&session_id=" + session_id + "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value +"&dispo=" + LeaDDispO + '' +"&dialed_number=" + dialed_number + '' +"&dialed_label=" + dialed_label + '' +"&camp_script=" + campaign_script + '' +"&in_script=" + CalL_ScripT_id + '' +"&script_width=" + script_width + '' +"&script_height=" + script_height + '' +"&fullname=" + LOGfullname + '' +"&recording_filename=" + recording_filename + '' +"&recording_id=" + recording_id + '' +"&user_custom_one=" + VU_custom_one + '' +"&user_custom_two=" + VU_custom_two + '' +"&user_custom_three=" + VU_custom_three + '' +"&user_custom_four=" + VU_custom_four + '' +"&user_custom_five=" + VU_custom_five + '' +"&did_id=" + did_id + '' +"&did_extension=" + did_extension + '' +"&did_pattern=" + did_pattern + '' +"&did_description=" + did_description + '' +"&closecallid=" + closecallid + '' + "&xfercallid=" + xfercallid + '' + "&chat_group_id=" + VDCL_group_id + '' + "&agent_log_id=" + agent_log_id + "&call_id=" + LasTCID + "&user_group=" + VU_user_group + '' +"&web_vars=" + LIVE_web_vars + '' +"&preset_number_a=" + CalL_XC_a_NuMber + '' +"&preset_number_b=" + CalL_XC_b_NuMber + '' +"&preset_number_c=" + CalL_XC_c_NuMber + '' +"&preset_number_d=" + CalL_XC_d_NuMber + '' +"&preset_number_e=" + CalL_XC_e_NuMber + '' +"&preset_dtmf_a=" + CalL_XC_a_Dtmf + '' +"&preset_dtmf_b=" + CalL_XC_b_Dtmf + '';
|
||||
form_list_id = '';
|
||||
form_chat_id = '';
|
||||
form_entry_list_id = '';
|
||||
|
||||
@@ -41,10 +41,11 @@
|
||||
# 160508-0219 - Added screen colors feature
|
||||
# 160510-2108 - Fixing issues with using only standard fields
|
||||
# 170228-2254 - Changes to allow URLs in SCRIPT field types
|
||||
# 170301-0827 - Enabled required custom fields with INBOUND_ONLY option
|
||||
#
|
||||
|
||||
$admin_version = '2.14-33';
|
||||
$build = '170228-2254';
|
||||
$admin_version = '2.14-34';
|
||||
$build = '170301-0827';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -145,7 +146,7 @@ if ($non_latin < 1)
|
||||
$field_order = preg_replace('/[^0-9]/','',$field_order);
|
||||
$source_list_id = preg_replace('/[^0-9]/','',$source_list_id);
|
||||
|
||||
$field_required = preg_replace('/[^NY]/','',$field_required);
|
||||
$field_required = preg_replace('/[^_A-Z]/','',$field_required);
|
||||
|
||||
$field_type = preg_replace('/[^0-9a-zA-Z]/','',$field_type);
|
||||
$ConFiRm = preg_replace('/[^0-9a-zA-Z]/','',$ConFiRm);
|
||||
@@ -1216,7 +1217,6 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "<input type=hidden name=field_id value=\"$A_field_id[$o]\">\n";
|
||||
echo "<input type=hidden name=field_label value=\"$A_field_label[$o]\">\n";
|
||||
echo "<input type=hidden name=field_required value=\"$A_field_required[$o]\">\n";
|
||||
echo "<a name=\"ANCHOR_$A_field_label[$o]\">\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=3 cellpadding=1>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Label")." $A_field_rank[$o]: </td><td align=left> $LcolorB<B>$A_field_label[$o]</B>$LcolorE $NWB#lists_fields-field_label$NWE </td></tr>\n";
|
||||
@@ -1265,11 +1265,12 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Size")." $A_field_rank[$o]: </td><td align=left><input type=text name=field_size size=5 maxlength=3 value=\"$A_field_size[$o]\"> $NWB#lists_fields-field_size$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Max")." $A_field_rank[$o]: </td><td align=left><input type=text name=field_max size=5 maxlength=3 value=\"$A_field_max[$o]\"> $NWB#lists_fields-field_max$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Default")." $A_field_rank[$o]: </td><td align=left><input type=text name=field_default size=50 maxlength=255 value=\"$A_field_default[$o]\"> $NWB#lists_fields-field_default$NWE </td></tr>\n";
|
||||
// echo "<tr $bgcolor><td align=right>Field Required $A_field_rank[$o]: </td><td align=left><select size=1 name=field_required>\n";
|
||||
// echo "<option value=\"Y\">YES</option>\n";
|
||||
// echo "<option value=\"N\">NO</option>\n";
|
||||
// echo "<option selected>$A_field_required[$o]</option>\n";
|
||||
// echo "</select> $NWB#lists_fields-field_required$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Required")." $A_field_rank[$o]: </td><td align=left><select size=1 name=field_required>\n";
|
||||
echo "<option value=\"N\">"._QXZ("NO")."</option>\n";
|
||||
echo "<option value=\"Y\">"._QXZ("YES")."</option>\n";
|
||||
echo "<option value=\"INBOUND_ONLY\">"._QXZ("INBOUND_ONLY")."</option>\n";
|
||||
echo "<option selected>$A_field_required[$o]</option>\n";
|
||||
echo "</select> $NWB#lists_fields-field_required$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=center colspan=2><input type=submit name=submit value=\""._QXZ("SUBMIT")."\"> \n";
|
||||
echo "<B><a href=\"$PHP_SELF?action=DELETE_CUSTOM_FIELD_CONFIRMATION&list_id=$list_id&field_id=$A_field_id[$o]&field_label=$A_field_label[$o]&field_type=$A_field_type[$o]&DB=$DB\">"._QXZ("DELETE THIS CUSTOM FIELD")."</a></B>";
|
||||
echo "</td></tr>\n";
|
||||
@@ -1287,7 +1288,6 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
echo "<input type=hidden name=action value=ADD_CUSTOM_FIELD>\n";
|
||||
echo "<input type=hidden name=list_id value=$list_id>\n";
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "<input type=hidden name=field_required value=\"N\">\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("New Field Rank").": </td><td align=left><select size=1 name=field_rank>\n";
|
||||
echo "$rank_select\n";
|
||||
echo "<option selected>$last_rank</option>\n";
|
||||
@@ -1331,10 +1331,11 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Size").": </td><td align=left><input type=text name=field_size size=5 maxlength=3> $NWB#lists_fields-field_size$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Max").": </td><td align=left><input type=text name=field_max size=5 maxlength=3> $NWB#lists_fields-field_max$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Default").": </td><td align=left><input type=text name=field_default size=50 maxlength=255 value=\"NULL\"> $NWB#lists_fields-field_default$NWE </td></tr>\n";
|
||||
// echo "<tr $bgcolor><td align=right>Field Required: </td><td align=left><select size=1 name=field_required>\n";
|
||||
// echo "<option value=\"Y\">YES</option>\n";
|
||||
// echo "<option value=\"N\" SELECTED>NO</option>\n";
|
||||
// echo "</select> $NWB#lists_fields-field_required$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=right>"._QXZ("Field Required").": </td><td align=left><select size=1 name=field_required>\n";
|
||||
echo "<option value=\"N\" SELECTED>"._QXZ("NO")."</option>\n";
|
||||
echo "<option value=\"Y\">"._QXZ("YES")."</option>\n";
|
||||
echo "<option value=\"INBOUND_ONLY\">"._QXZ("INBOUND_ONLY")."</option>\n";
|
||||
echo "</select> $NWB#lists_fields-field_required$NWE </td></tr>\n";
|
||||
echo "<tr $bgcolor><td align=center colspan=2><input type=submit name=submit value=\""._QXZ("Submit")."\"></td></tr>\n";
|
||||
echo "</table></center></form><BR><BR>\n";
|
||||
echo "</table></center><BR><BR>\n";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# audio_store.php
|
||||
#
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Central Audio Storage script
|
||||
#
|
||||
@@ -24,10 +24,11 @@
|
||||
# 160330-1550 - navigation changes and fixes, added force_allow var
|
||||
# 160508-0139 - Added screen colors feature
|
||||
# 160613-1002 - Added feature to copy recordings to a new filename
|
||||
# 170301-1650 - Added validation that sounds web dir exists
|
||||
#
|
||||
|
||||
$version = '2.12-18';
|
||||
$build = '160613-1002';
|
||||
$version = '2.14-19';
|
||||
$build = '170301-1650';
|
||||
|
||||
$MT[0]='';
|
||||
|
||||
@@ -130,6 +131,11 @@ if (strlen($sounds_web_directory) < 30)
|
||||
echo _QXZ("NOTICE").": "._QXZ("new web directory created")."\n";
|
||||
}
|
||||
|
||||
if (!file_exists("$WeBServeRRooT/$sounds_web_directory"))
|
||||
{
|
||||
echo _QXZ("ERROR").": "._QXZ("audio store web directory does not exist").": $WeBServeRRooT/$sounds_web_directory\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
### get list of all servers, if not one of them, then force authentication check
|
||||
$stmt = "SELECT server_ip FROM servers;";
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
# 170207-1331 - Added api_only_user entry
|
||||
# 170217-1353 - Added dead_to_dispo entry
|
||||
# 170220-1811 - Added areacode_filter entries
|
||||
# 170301-1337 - Updated entry for custom fields required setting
|
||||
#
|
||||
|
||||
|
||||
@@ -2237,7 +2238,7 @@ if ($SSqc_features_active > 0)
|
||||
<BR>
|
||||
<A NAME="lists_fields-field_required">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Field Required"); ?> -</B><?php echo _QXZ("Not enabled. Default is N."); ?>
|
||||
<B><?php echo _QXZ("Field Required"); ?> -</B><?php echo _QXZ("If the campaign option allowing required fields is also enabled, this field allows you to force an agent to fill in this field before they can hang up the call. Y will affect all calls, INBOUND_ONLY will only affect calls received by the agent through an In-Group. This option will only work for the following custom field types: TEXT, AREA, DATE. Default is N."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="lists_fields-name_position">
|
||||
|
||||
@@ -114,10 +114,11 @@
|
||||
# 170209-1149 - Added URL and IP logging
|
||||
# 170219-1520 - Added 90-day duplicate check option
|
||||
# 170223-0743 - Added QXZ translation to admin web user functions text
|
||||
# 170301-1649 - Added validation that sounds web dir exists to sounds_list function
|
||||
#
|
||||
|
||||
$version = '2.14-90';
|
||||
$build = '170223-0743';
|
||||
$version = '2.14-91';
|
||||
$build = '170301-1649';
|
||||
$api_url_log = 0;
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -844,6 +845,16 @@ if ($function == 'sounds_list')
|
||||
$i=0;
|
||||
$filename_sort=$MT;
|
||||
$dirpath = "$WeBServeRRooT/$sounds_web_directory";
|
||||
if (!file_exists("$WeBServeRRooT/$sounds_web_directory"))
|
||||
{
|
||||
$result = 'ERROR';
|
||||
$result_reason = "audio store web directory does not exist";
|
||||
echo "$result: $result_reason: |$user|$function|$WeBServeRRooT/$sounds_web_directory|\n";
|
||||
$data = "$allowed_user";
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
|
||||
$dh = opendir($dirpath);
|
||||
if ($DB>0) {echo "DEBUG: sounds_list variables - $dirpath|$stage|$format\n";}
|
||||
while (false !== ($file = readdir($dh)))
|
||||
|
||||
Reference in New Issue
Block a user