Added audio_store_GSM_allowed vicidial/options.php setting. Disabled GSM file uploads to the Audio Store by default.
Disabled the PLAY link in the Audio Store for BAD FORMAT WAV files. Added User setting to allow download of bad format WAV files. git-svn-id: svn://192.168.202.10@3554 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -692,7 +692,8 @@ status_group_id VARCHAR(20) default '',
|
|||||||
mobile_number VARCHAR(20) default '',
|
mobile_number VARCHAR(20) default '',
|
||||||
two_factor_override ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE',
|
two_factor_override ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE',
|
||||||
manual_dial_filter VARCHAR(50) default 'DISABLED',
|
manual_dial_filter VARCHAR(50) default 'DISABLED',
|
||||||
user_location VARCHAR(100) default ''
|
user_location VARCHAR(100) default '',
|
||||||
|
download_invalid_files ENUM('0','1') default '0'
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
CREATE UNIQUE INDEX user ON vicidial_users (user);
|
CREATE UNIQUE INDEX user ON vicidial_users (user);
|
||||||
@@ -5045,4 +5046,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
|||||||
|
|
||||||
UPDATE system_settings set vdc_agent_api_active='1';
|
UPDATE system_settings set vdc_agent_api_active='1';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1651',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
UPDATE system_settings SET db_schema_version='1652',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||||
|
|||||||
@@ -1862,3 +1862,7 @@ ALTER TABLE vicidial_campaigns ADD auto_alt_threshold TINYINT(3) UNSIGNED defaul
|
|||||||
ALTER TABLE vicidial_lists ADD auto_alt_threshold TINYINT(3) default '-1';
|
ALTER TABLE vicidial_lists ADD auto_alt_threshold TINYINT(3) default '-1';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1651',db_schema_update_date=NOW() where db_schema_version < 1651;
|
UPDATE system_settings SET db_schema_version='1651',db_schema_update_date=NOW() where db_schema_version < 1651;
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_users ADD download_invalid_files ENUM('0','1') default '0';
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1652',db_schema_update_date=NOW() where db_schema_version < 1652;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# audio_store.php
|
# audio_store.php
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# Central Audio Storage script
|
# Central Audio Storage script
|
||||||
#
|
#
|
||||||
@@ -33,10 +33,11 @@
|
|||||||
# 201002-1536 - Allowed for secure sounds_web_server setting
|
# 201002-1536 - Allowed for secure sounds_web_server setting
|
||||||
# 210321-0131 - Added classAudioFile PHP library for WAV file format validation
|
# 210321-0131 - Added classAudioFile PHP library for WAV file format validation
|
||||||
# 210322-1220 - Added checking of .wav files for asterisk-compatible format
|
# 210322-1220 - Added checking of .wav files for asterisk-compatible format
|
||||||
|
# 220120-0927 - Added audio_store_GSM_allowed option. Disable GSM file uploads by default
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-25';
|
$version = '2.14-26';
|
||||||
$build = '210322-1220';
|
$build = '220120-0927';
|
||||||
|
|
||||||
$MT[0]='';
|
$MT[0]='';
|
||||||
|
|
||||||
@@ -44,6 +45,12 @@ require("dbconnect_mysqli.php");
|
|||||||
require("functions.php");
|
require("functions.php");
|
||||||
require ('classAudioFile.php');
|
require ('classAudioFile.php');
|
||||||
|
|
||||||
|
$audio_store_GSM_allowed=0;
|
||||||
|
if (file_exists('options.php'))
|
||||||
|
{
|
||||||
|
require('options.php');
|
||||||
|
}
|
||||||
|
|
||||||
$server_name = getenv("SERVER_NAME");
|
$server_name = getenv("SERVER_NAME");
|
||||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||||
$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
|
$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
|
||||||
@@ -655,7 +662,7 @@ if ($action == "MANUALUPLOAD")
|
|||||||
$audiofile_name = preg_replace("/\!/",'',$audiofile_name);
|
$audiofile_name = preg_replace("/\!/",'',$audiofile_name);
|
||||||
$audiofile_name = preg_replace("/\%/",'',$audiofile_name);
|
$audiofile_name = preg_replace("/\%/",'',$audiofile_name);
|
||||||
$audiofile_name = preg_replace("/\^/",'',$audiofile_name);
|
$audiofile_name = preg_replace("/\^/",'',$audiofile_name);
|
||||||
if (preg_match("/\.wav$|\.gsm$/", $audiofile_name))
|
if ( (preg_match("/\.wav$/", $audiofile_name)) or ( (preg_match("/\.gsm$/", $audiofile_name)) and ($audio_store_GSM_allowed > 0) ) )
|
||||||
{
|
{
|
||||||
copy($AF_path, "$WeBServeRRooT/$sounds_web_directory/$audiofile_name");
|
copy($AF_path, "$WeBServeRRooT/$sounds_web_directory/$audiofile_name");
|
||||||
chmod("$WeBServeRRooT/$sounds_web_directory/$audiofile_name", 0766);
|
chmod("$WeBServeRRooT/$sounds_web_directory/$audiofile_name", 0766);
|
||||||
@@ -724,7 +731,10 @@ if ($action == "MANUALUPLOAD")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo _QXZ("ERROR").": "._QXZ("only wav and gsm files are allowed in the audio store")."\n";
|
if ( (preg_match("/\.gsm$/", $audiofile_name)) and ($audio_store_GSM_allowed < 1) )
|
||||||
|
{echo _QXZ("ERROR").": "._QXZ("only wav files are allowed in the audio store")."\n";}
|
||||||
|
else
|
||||||
|
{echo _QXZ("ERROR").": "._QXZ("only wav and gsm files are allowed in the audio store")."\n";}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# version: 20220118200601
|
# version: 20220120090501
|
||||||
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-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. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
||||||
@@ -104,6 +104,7 @@ users-export_reports Export Reports <QXZ>This setting if set to 1 will allow a m
|
|||||||
users-delete_from_dnc Delete From DNC Lists <QXZ>This setting if set to 1 will allow a manager to remove phone numbers from the DNC lists in the system.</QXZ>
|
users-delete_from_dnc Delete From DNC Lists <QXZ>This setting if set to 1 will allow a manager to remove phone numbers from the DNC lists in the system.</QXZ>
|
||||||
users-realtime_block_user_info Realtime Block User Info <QXZ>This setting if set to 1 will block user and station information from being displayed in the Real-time report. Default is 0 for disabled.</QXZ>
|
users-realtime_block_user_info Realtime Block User Info <QXZ>This setting if set to 1 will block user and station information from being displayed in the Real-time report. Default is 0 for disabled.</QXZ>
|
||||||
users-modify_same_user_level Modify Same User Level <QXZ>This setting only applies to level 9 users. If enabled it allows the level 9 user to modify their own settings as well as other level 9 users. Default is 1 for enabled.</QXZ>
|
users-modify_same_user_level Modify Same User Level <QXZ>This setting only applies to level 9 users. If enabled it allows the level 9 user to modify their own settings as well as other level 9 users. Default is 1 for enabled.</QXZ>
|
||||||
|
users-download_invalid_files Download Invalid Files <QXZ>This setting only applies to level 9 users. If enabled it allows the level 9 user to download BAD FORMAT audio files from the Audio Store. Default is 0 for disabled.</QXZ>
|
||||||
users-admin_hide_lead_data Admin Hide Lead Data <QXZ>This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer lead data in the many reports and screens in the system with Xs. Default is 0 for disabled.</QXZ>
|
users-admin_hide_lead_data Admin Hide Lead Data <QXZ>This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer lead data in the many reports and screens in the system with Xs. Default is 0 for disabled.</QXZ>
|
||||||
users-admin_hide_phone_data Admin Hide Phone Data <QXZ>This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer phone numbers in the many reports and screens in the system with Xs. The DIGITS settings will show only the last X digits of the phone number. Default is 0 for disabled.</QXZ>
|
users-admin_hide_phone_data Admin Hide Phone Data <QXZ>This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer phone numbers in the many reports and screens in the system with Xs. The DIGITS settings will show only the last X digits of the phone number. Default is 0 for disabled.</QXZ>
|
||||||
users-ignore_group_on_search Search Lead Ignore Group Restrictions <QXZ>Changing this setting to 1 will allow this user to search for leads throughout the entire system instead of just within the allowed campaigns that are set within their User Group. This will also allow modifying of those leads in the administrative lead modification page. Default is 0 for disabled. To be able to modify this setting, you must belong to a user group that has ALL CAMPAIGNS selected in the Allowed Campaigns section.</QXZ>
|
users-ignore_group_on_search Search Lead Ignore Group Restrictions <QXZ>Changing this setting to 1 will allow this user to search for leads throughout the entire system instead of just within the allowed campaigns that are set within their User Group. This will also allow modifying of those leads in the administrative lead modification page. Default is 0 for disabled. To be able to modify this setting, you must belong to a user group that has ALL CAMPAIGNS selected in the Allowed Campaigns section.</QXZ>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# non_agent_api.php
|
# non_agent_api.php
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# This script is designed as an API(Application Programming Interface) to allow
|
# This script is designed as an API(Application Programming Interface) to allow
|
||||||
# other programs to interact with all non-agent-screen VICIDIAL functions
|
# other programs to interact with all non-agent-screen VICIDIAL functions
|
||||||
@@ -188,10 +188,11 @@
|
|||||||
# 211107-1556 - Added optional phone_number search for lead_all_info function
|
# 211107-1556 - Added optional phone_number search for lead_all_info function
|
||||||
# 211118-1946 - Added 'delete_cf_data' setting to the update_lead function
|
# 211118-1946 - Added 'delete_cf_data' setting to the update_lead function
|
||||||
# 211217-0733 - Fixes for PHP8, issue #1341
|
# 211217-0733 - Fixes for PHP8, issue #1341
|
||||||
|
# 220120-0914 - Added download_invalid_files user function for audio store file listings
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-165';
|
$version = '2.14-166';
|
||||||
$build = '211217-0733';
|
$build = '220120-0914';
|
||||||
$php_script='non_agent_api.php';
|
$php_script='non_agent_api.php';
|
||||||
$api_url_log = 0;
|
$api_url_log = 0;
|
||||||
|
|
||||||
@@ -1126,7 +1127,7 @@ if ($auth < 1)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt="SELECT api_list_restrict,api_allowed_functions,user_group,selected_language,delete_inbound_dids from vicidial_users where user='$user' and active='Y';";
|
$stmt="SELECT api_list_restrict,api_allowed_functions,user_group,selected_language,delete_inbound_dids,download_invalid_files,user_level from vicidial_users where user='$user' and active='Y';";
|
||||||
if ($DB>0) {echo "DEBUG: auth query - $stmt\n";}
|
if ($DB>0) {echo "DEBUG: auth query - $stmt\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
$row=mysqli_fetch_row($rslt);
|
$row=mysqli_fetch_row($rslt);
|
||||||
@@ -1135,6 +1136,8 @@ $api_allowed_functions = $row[1];
|
|||||||
$LOGuser_group = $row[2];
|
$LOGuser_group = $row[2];
|
||||||
$VUselected_language = $row[3];
|
$VUselected_language = $row[3];
|
||||||
$VUdelete_inbound_dids = $row[4];
|
$VUdelete_inbound_dids = $row[4];
|
||||||
|
$VUdownload_invalid_files = $row[5];
|
||||||
|
$VUuser_level = $row[6];
|
||||||
|
|
||||||
if ( ($api_list_restrict > 0) and ( ($function == 'add_lead') or ($function == 'update_lead') or ($function == 'batch_update_lead') or ($function == 'update_list') or ($function == 'list_info') or ($function == 'list_custom_fields') or ($function == 'lead_search') ) )
|
if ( ($api_list_restrict > 0) and ( ($function == 'add_lead') or ($function == 'update_lead') or ($function == 'batch_update_lead') or ($function == 'update_list') or ($function == 'list_info') or ($function == 'list_custom_fields') or ($function == 'lead_search') ) )
|
||||||
{
|
{
|
||||||
@@ -1374,6 +1377,7 @@ if ($function == 'sounds_list')
|
|||||||
}
|
}
|
||||||
$sf++;
|
$sf++;
|
||||||
$BWB=''; $BWE='';
|
$BWB=''; $BWE='';
|
||||||
|
$PLAYlink = "<a href=\"$admDIR/$admin_web_dir$sounds_web_directory/$file_names[$m]\" target=\"_blank\"><font size=1 face=\"Arial,Helvetica\">"._QXZ("PLAY")."</a>";
|
||||||
if ( (preg_match('/\.wav$/', $file_names[$m])) and (strlen($bad_wavs) > 2) )
|
if ( (preg_match('/\.wav$/', $file_names[$m])) and (strlen($bad_wavs) > 2) )
|
||||||
{
|
{
|
||||||
$temp_filename = $file_names[$m];
|
$temp_filename = $file_names[$m];
|
||||||
@@ -1381,13 +1385,17 @@ if ($function == 'sounds_list')
|
|||||||
{
|
{
|
||||||
$BWB='<font color=red><b>';
|
$BWB='<font color=red><b>';
|
||||||
$BWE=" "._QXZ("BAD WAV FORMAT")."</b></font>";
|
$BWE=" "._QXZ("BAD WAV FORMAT")."</b></font>";
|
||||||
|
if ( ($VUdownload_invalid_files < 1) or ($VUuser_level < 9) )
|
||||||
|
{
|
||||||
|
$PLAYlink = "<DEL><font size=1 face=\"Arial,Helvetica\">"._QXZ("PLAY")."</DEL>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<tr><td><font size=1 face=\"Arial,Helvetica\">$sf</td>\n";
|
echo "<tr><td><font size=1 face=\"Arial,Helvetica\">$sf</td>\n";
|
||||||
echo "<td><a href=\"javascript:choose_file('$file_namesPROMPT[$m]','$comments');\"><font size=1 face=\"Arial,Helvetica\">$BWB$file_names[$m]$BWE</a></td>\n";
|
echo "<td><a href=\"javascript:choose_file('$file_namesPROMPT[$m]','$comments');\"><font size=1 face=\"Arial,Helvetica\">$BWB$file_names[$m]$BWE</a></td>\n";
|
||||||
echo "<td><font size=1 face=\"Arial,Helvetica\">$file_dates[$m]</td>\n";
|
echo "<td><font size=1 face=\"Arial,Helvetica\">$file_dates[$m]</td>\n";
|
||||||
echo "<td><font size=1 face=\"Arial,Helvetica\">$file_sizes[$m]</td>\n";
|
echo "<td><font size=1 face=\"Arial,Helvetica\">$file_sizes[$m]</td>\n";
|
||||||
echo "<td><a href=\"$admDIR/$admin_web_dir$sounds_web_directory/$file_names[$m]\" target=\"_blank\"><font size=1 face=\"Arial,Helvetica\">"._QXZ("PLAY")."</a></td></tr>\n";
|
echo "<td>$PLAYlink</td></tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$k++;
|
$k++;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# options.php - manually defined options for vicidial admin scripts
|
# options.php - manually defined options for vicidial admin scripts
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# rename this file to options.php for the settings here to go into effect
|
# rename this file to options.php for the settings here to go into effect
|
||||||
#
|
#
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
# 210618-0937 - Added CORS support
|
# 210618-0937 - Added CORS support
|
||||||
# 210625-1425 - Added RS_BargeSwap option for blind monitoring
|
# 210625-1425 - Added RS_BargeSwap option for blind monitoring
|
||||||
# 211022-0733 - Added IR_SLA_all_statuses option for Inbound Reports
|
# 211022-0733 - Added IR_SLA_all_statuses option for Inbound Reports
|
||||||
|
# 220120-0926 - Added audio_store_GSM_allowed option for the Audio Store
|
||||||
#
|
#
|
||||||
|
|
||||||
# used by the realtime_report.php script
|
# used by the realtime_report.php script
|
||||||
@@ -135,6 +136,9 @@ $call_export_report_ALTERNATE_2_header="address3\tfirst_name\tlast_name\tphone_n
|
|||||||
# Inbound reports, use all statuses for SLA calculation
|
# Inbound reports, use all statuses for SLA calculation
|
||||||
$IR_SLA_all_statuses=0;
|
$IR_SLA_all_statuses=0;
|
||||||
|
|
||||||
|
# Allow GSM audio files to be manually uploaded to the Audio Store
|
||||||
|
$audio_store_GSM_allowed=0;
|
||||||
|
|
||||||
|
|
||||||
# CORS settings: (to enable, customize the variables below, and uncomment the "require_once('adminCORS.php');" line at the bottom)
|
# CORS settings: (to enable, customize the variables below, and uncomment the "require_once('adminCORS.php');" line at the bottom)
|
||||||
# (NOTE: The first 3 variables must be set for these features to be active)
|
# (NOTE: The first 3 variables must be set for these features to be active)
|
||||||
|
|||||||
Reference in New Issue
Block a user