Added Default Phone Fields feature, Changed CLEAR LIST to remove custom fields for removed leads in admin.php

Added Added --remove-abandoned-records-only option to ADMIN_custom_table_clean.pl script

git-svn-id: svn://192.168.202.10@3367 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-03-06 09:47:51 +00:00
parent 1529d3ccd5
commit baa3b82785
6 changed files with 405 additions and 40 deletions
+4
View File
@@ -574,6 +574,10 @@ OTHER CHANGES:
these new features work, see the Field Options help in the admin web these new features work, see the Field Options help in the admin web
screen. screen.
163. Added Phone Defaults system setting, allowing you to set many default
values when adding new phones through admin.php. Also added a Copy New
Phone admin web function.
+157 -9
View File
@@ -3,6 +3,7 @@
# ADMIN_custom_table_clean.pl version: 2.14 # ADMIN_custom_table_clean.pl version: 2.14
# #
# This script is designed to check for "custom_" database tables from deleted lists with no leads assigned to them # This script is designed to check for "custom_" database tables from deleted lists with no leads assigned to them
# This script can alternatively be used to remove abandoned custom lead data in "custom_" tables if the lead no longer exists
# #
# NOTE!!! For this script to work, you must add the "DROP" database privledge to your "VARDB_custom_user" database account # NOTE!!! For this script to work, you must add the "DROP" database privledge to your "VARDB_custom_user" database account
# GRANT ALTER,CREATE,DROP on asterisk.* TO custom@'%' IDENTIFIED BY 'custom1234'; # GRANT ALTER,CREATE,DROP on asterisk.* TO custom@'%' IDENTIFIED BY 'custom1234';
@@ -10,10 +11,11 @@
# #
# /usr/share/astguiclient/ADMIN_custom_table_clean.pl --debug # /usr/share/astguiclient/ADMIN_custom_table_clean.pl --debug
# #
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 # Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# #
# CHANGES # CHANGES
# 200728-2033 - First version # 200728-2033 - First version
# 210305-1604 - Added --remove-abandoned-records-only option
# #
$txt = '.txt'; $txt = '.txt';
@@ -22,14 +24,8 @@ $MT[0] = '';
$Q=0; $Q=0;
$DB=0; $DB=0;
$OUTcalls=0; $remove_field_defs=0;
$OUTtalk=0; $remove_abandoned_records_only=0;
$OUTtalkmin=0;
$INcalls=0;
$INtalk=0;
$INtalkmin=0;
$email_post_audio=0;
$did_only=0;
$secX = time(); $secX = time();
$time = $secX; $time = $secX;
@@ -127,6 +123,7 @@ if (length($ARGV[0])>1)
print " [--quiet] = quiet\n"; print " [--quiet] = quiet\n";
print " [--test] = testing only, no deletions\n"; print " [--test] = testing only, no deletions\n";
print " [--remove-field-defs] = remove field definitions in addition to custom_ db tables\n"; print " [--remove-field-defs] = remove field definitions in addition to custom_ db tables\n";
print " [--remove-abandoned-records-only] = remove custom_ db lead records where the lead no longer exists\n";
print " [--debug] = debugging messages\n"; print " [--debug] = debugging messages\n";
print " [--debugX] = Super debugging messages\n"; print " [--debugX] = Super debugging messages\n";
print "\n"; print "\n";
@@ -160,6 +157,11 @@ if (length($ARGV[0])>1)
$remove_field_defs=1; $remove_field_defs=1;
print "\n----- REMOVE FIELD DEFINITIONS -----\n\n"; print "\n----- REMOVE FIELD DEFINITIONS -----\n\n";
} }
if ($args =~ /--remove-abandoned-records-only/i)
{
$remove_abandoned_records_only=1;
print "\n----- REMOVE ABANDONED CUSTOM LEAD RECORDS -----\n\n";
}
} }
} }
else else
@@ -194,6 +196,152 @@ $dbhC = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
or die "Couldn't connect to database: " . DBI->errstr; or die "Couldn't connect to database: " . DBI->errstr;
##### BEGIN remove_abandoned_records_only section #####
if ($remove_abandoned_records_only > 0)
{
if (!$Q)
{
print "\n\nStarting remove_abandoned_records_only process...\n";
}
$TOTAL_CUSTOM_SCANNED=0;
$CUSTOM_RECORDS_DELETED=0;
$CUSTOM_RECORDS_EMPTY=0;
$CUSTOM_TABLE_LEADS_FOUND=0;
$stmtB = "SHOW TABLES LIKE \"custom\\_\%\";";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBcustrows=$sthB->rows;
$col_ct=0;
if ($DBX) {print "$sthBcustrows|$stmtB|\n";}
while ($sthBcustrows > $col_ct)
{
@aryB = $sthB->fetchrow_array;
$custom_table = $aryB[0];
$temp_table = $aryB[0];
$temp_table =~ s/custom_//gi;
$temp_table =~ s/\D//gi;
if (length($temp_table) > 0)
{
$temp_custom_records_count=0;
$stmtA = "SELECT count(*) from $custom_table;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($DB) {print "$sthArows|$stmtA|\n";}
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$temp_custom_records_count = $aryA[0];
}
if ($temp_custom_records_count < 1)
{
if ($DBX) {print "CUSTOM RECORDS EMPTY: $aryB[0]|$custom_table|$temp_custom_records_count \n";}
$CUSTOM_RECORDS_EMPTY++;
}
else
{
if ($DBX) {print "CUSTOM TABLE RECORDS FOUND, checking for leads tied to each custom table record: $aryB[0]|$temp_table|$temp_custom_records_count \n";}
$temp_custom_leads_abandoned=0;
$stmtA = "SELECT lead_id from $custom_table;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($DB) {print "$sthArows|$stmtA|\n";}
$o=0;
while ($sthArows > $o)
{
@aryA = $sthA->fetchrow_array;
$temp_custom_lead_ids[$o] = $aryA[0];
$o++;
}
if ($o > 0)
{
$o=0;
while ($sthArows > $o)
{
$temp_lead_found=0;
$stmtA = "SELECT count(*) from vicidial_list where lead_id='$temp_custom_lead_ids[$o]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsX=$sthA->rows;
if ($DB) {print "$sthArowsX|$stmtA|\n";}
if ($sthArowsX > 0)
{
@aryA = $sthA->fetchrow_array;
$temp_lead_found = $aryA[0];
}
if ($temp_lead_found < 1)
{
$stmtA="DELETE FROM $custom_table where lead_id='$temp_custom_lead_ids[$o]';";
if (!$TEST) {$Iaffected_rows = $dbhA->do($stmtA);}
$CUSTOM_RECORDS_DELETED = ($CUSTOM_RECORDS_DELETED + $Iaffected_rows);
if ($DBX) {print " - abandoned custom record removed debug: |$Iaffected_rows|$CUSTOM_RECORDS_DELETED|$stmtA|\n";}
}
else
{$CUSTOM_TABLE_LEADS_FOUND++;}
$TOTAL_CUSTOM_SCANNED++;
$o++;
}
if ($DBX) {print "LEADS FOUND USING THIS CUSTOM TABLE: $aryB[0]|$temp_table|$temp_leads_found \n";}
$CUSTOM_TABLE_LEADS_FOUND++;
}
else
{
if ($DBX) {print "NO LEADS FOUND USING CUSTOM TABLE: $aryB[0]|$temp_table|$temp_leads_found \n";}
$Caffected_rows=0;
$stmtC = "DROP TABLE $custom_table;";
if($DBX){print STDERR "\n|$stmtC|\n";}
if (!$TEST)
{
$Caffected_rows = $dbhC->do($stmtC);
$TOTAL_DELETED++;
$dropped_tables .= "$custom_table|";
# remove field definitions
}
if($DB){print STDERR "\n|$custom_table table dropped $Caffected_rows|\n";}
}
}
}
else
{
if ($DBX) {print "INVALID CUSTOM TABLE: $aryB[0]|$temp_table \n";}
$INVALID_CUSTOM_TABLE++;
}
$col_ct++;
}
$sthB->finish();
if ($TOTAL_CUSTOM_SCANNED > 0)
{
$stmtA="INSERT INTO vicidial_admin_log set event_date=NOW(), user='VDAD', ip_address='1.1.1.1', event_section='LISTS', event_type='OTHER', record_id='lists', event_code='CUSTOM TABLES SCANNED', event_sql=\"\", event_notes='records scanned: $TOTAL_CUSTOM_SCANNED abandoned custom records deleted: $CUSTOM_RECORDS_DELETED empty custom tables: $CUSTOM_RECORDS_EMPTY total custom tables: $col_ct';";
if (!$TEST) {$Iaffected_rows = $dbhA->do($stmtA);}
if ($DBX) {print " - admin log insert debug: |$Iaffected_rows|$stmtA|\n";}
}
if (!$Q)
{
print "PROCESS COMPLETE: \n";
print " Total custom records scanned: $TOTAL_CUSTOM_SCANNED ($col_ct)\n";
print " Custom tables that are empty: $CUSTOM_RECORDS_EMPTY \n";
print " Custom table leads found: $CUSTOM_TABLE_LEADS_FOUND \n";
print " Custom table records deleted: $CUSTOM_RECORDS_DELETED \n";
}
exit;
}
##### END remove_abandoned_records_only section #####
$TOTAL_CUSTOM=0; $TOTAL_CUSTOM=0;
$INVALID_CUSTOM_TABLE=0; $INVALID_CUSTOM_TABLE=0;
$CUSTOM_TABLE_FOUND=0; $CUSTOM_TABLE_FOUND=0;
@@ -1884,7 +1884,8 @@ web_loader_phone_strip VARCHAR(10) default 'DISABLED',
manual_dial_phone_strip VARCHAR(10) default 'DISABLED', manual_dial_phone_strip VARCHAR(10) default 'DISABLED',
daily_call_count_limit ENUM('0','1') default '0', daily_call_count_limit ENUM('0','1') default '0',
allow_shared_dial ENUM('0','1','2','3','4','5','6') default '0', allow_shared_dial ENUM('0','1','2','3','4','5','6') default '0',
agent_search_method ENUM('0','1','2','3','4','5','6') default '0' agent_search_method ENUM('0','1','2','3','4','5','6') default '0',
phone_defaults_container VARCHAR(40) default '---DISABLED---'
) ENGINE=MyISAM; ) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix ( CREATE TABLE vicidial_campaigns_list_mix (
@@ -4739,9 +4740,10 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_USA','USA Timezone List','TIMEZONE_LIST','---ALL---','USA,AST,N,Atlantic Time Zone\nUSA,EST,Y,Eastern Time Zone\nUSA,CST,Y,Central Time Zone\nUSA,MST,Y,Mountain Time Zone\nUSA,MST,N,Arizona Time Zone\nUSA,PST,Y,Pacific Time Zone\nUSA,AKST,Y,Alaska Time Zone\nUSA,HST,N,Hawaii Time Zone\n'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_USA','USA Timezone List','TIMEZONE_LIST','---ALL---','USA,AST,N,Atlantic Time Zone\nUSA,EST,Y,Eastern Time Zone\nUSA,CST,Y,Central Time Zone\nUSA,MST,Y,Mountain Time Zone\nUSA,MST,N,Arizona Time Zone\nUSA,PST,Y,Pacific Time Zone\nUSA,AKST,Y,Alaska Time Zone\nUSA,HST,N,Hawaii Time Zone\n');
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_CANADA','Canadian Timezone List','TIMEZONE_LIST','---ALL---','CAN,NST,Y,Newfoundland Time Zone\nCAN,AST,Y,Atlantic Time Zone\nCAN,EST,Y,Eastern Time Zone\nCAN,CST,Y,Central Time Zone\nCAN,CST,N,Saskatchewan Time Zone\nCAN,MST,Y,Mountain Time Zone\nCAN,PST,Y,Pacific Time Zone\n'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_CANADA','Canadian Timezone List','TIMEZONE_LIST','---ALL---','CAN,NST,Y,Newfoundland Time Zone\nCAN,AST,Y,Atlantic Time Zone\nCAN,EST,Y,Eastern Time Zone\nCAN,CST,Y,Central Time Zone\nCAN,CST,N,Saskatchewan Time Zone\nCAN,MST,Y,Mountain Time Zone\nCAN,PST,Y,Pacific Time Zone\n');
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_AUSTRALIA','Australian Timezone List','TIMEZONE_LIST','---ALL---','AUS,AEST,Y,Eastern Australia Time Zone\nAUS,AEST,N,Queensland Time Zone\nAUS,ACST,Y,Central Australia Time Zone\nAUS,ACST,N,Northern Territory Time Zone\nAUS,AWST,N,Western Australia Time Zone\n'); INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_AUSTRALIA','Australian Timezone List','TIMEZONE_LIST','---ALL---','AUS,AEST,Y,Eastern Australia Time Zone\nAUS,AEST,N,Queensland Time Zone\nAUS,ACST,Y,Central Australia Time Zone\nAUS,ACST,N,Northern Territory Time Zone\nAUS,AWST,N,Western Australia Time Zone\n');
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('PHONE_DEFAULTS','Default phone settings for preloading','PHONE_DEFAULTS','---ALL---','# Below are all phone settings recognized under the PHONE_DEFAULTS \r\n# container type and the type of data each accepts. Any setting that\r\n# uses a default value in the database has said value pre-set below\r\n\r\n# 10 char max\r\nvoicemail_id => \r\n \r\n# 15 char max\r\nserver_ip => \r\n\r\n# 100 char max\r\npass => \r\n\r\n# 10 char max\r\nstatus => \r\n\r\n# Y/N only\r\nactive => Y\r\n\r\n# 50 char max\r\nphone_type => \r\n\r\n# \'SIP\',\'Zap\',\'IAX2\' or \'EXTERNAL\'\r\nprotocol => SIP\r\n\r\n# positive or negatier 2-decimal floating point number\r\nlocal_gmt => -5.00\r\n\r\n# 20 char max\r\nvoicemail_dump_exten => 85026666666666\r\n\r\n# 20 char max\r\noutbound_cid => \r\n\r\n# 100 char max\r\nemail => \r\n\r\n# 15 char max\r\ntemplate_id => \r\n\r\n# text, conf_override can span multiple lines, see below\r\nconf_override => \r\n# type=friend\r\n# host=dynamic\r\n# canreinvite=no\r\n# context=default1\r\n\r\n# 50 char max\r\nphone_context => default\r\n\r\n# Unsigned - max value 65536\r\nphone_ring_timeout => 60\r\n\r\n# 20 char max\r\nconf_secret => test\r\n\r\n# Y/N only\r\ndelete_vm_after_email => N\r\n\r\n# Options - Y, N, or Y_API_LAUNCH\r\nis_webphone => N\r\n\r\n# Y/N only\r\nuse_external_server_ip => N\r\n\r\n# 100 char max\r\ncodecs_list => \r\n\r\n# 0/1 only\r\ncodecs_with_template => 0\r\n\r\n# Options - Y, N, TOGGLE, or TOGGLE_OFF\r\nwebphone_dialpad => Y\r\n\r\n# Y/N only\r\non_hook_agent => N\r\n\r\n# Y/N only\r\nwebphone_auto_answer => Y\r\n\r\n# 30 char max\r\nvoicemail_timezone => eastern\r\n\r\n# 255 char max\r\nvoicemail_options => \r\n\r\n# 20 char max\r\nuser_group => ---ALL---\r\n\r\n# 100 char max\r\nvoicemail_greeting => \r\n\r\n# 20 char max\r\nvoicemail_dump_exten_no_inst => 85026666666667\r\n\r\n# Y/N only\r\nvoicemail_instructions => Y\r\n\r\n# Y/N only\r\non_login_report => N\r\n\r\n# 40 char max\r\nunavail_dialplan_fwd_exten => \r\n\r\n# 100 char max\r\nunavail_dialplan_fwd_context => \r\n\r\n# text\r\nnva_call_url => \r\n\r\n# 40 char max\r\nnva_search_method => \r\n\r\n# 255 char max\r\nnva_error_filename => \r\n\r\n# Integer, any size\r\nnva_new_list_id => 995\r\n\r\n# 10 char max\r\nnva_new_phone_code => 1\r\n\r\n# 6 char max\r\nnva_new_status => NVAINS\r\n\r\n# Y/N only\r\nwebphone_dialbox => Y\r\n\r\n# Y/N only\r\nwebphone_mute => Y\r\n\r\n# Y/N only\r\nwebphone_volume => Y\r\n\r\n# Y/N only\r\nwebphone_debug => N\r\n\r\n# 20 char max\r\noutbound_alt_cid => \r\n\r\n# Y/N only\r\nconf_qualify => Y\r\n\r\n# 255 char max\r\nwebphone_layout => \r\n');
INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---',''); INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---','');
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='1617',db_schema_update_date=NOW(),reload_timestamp=NOW(); UPDATE system_settings SET db_schema_version='1618',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -1434,3 +1434,9 @@ UPDATE system_settings SET db_schema_version='1616',db_schema_update_date=NOW()
ALTER TABLE vicidial_lists_fields MODIFY field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT','HIDDEN','READONLY','HIDEBLOB','SWITCH','SOURCESELECT') default 'TEXT'; ALTER TABLE vicidial_lists_fields MODIFY field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT','HIDDEN','READONLY','HIDEBLOB','SWITCH','SOURCESELECT') default 'TEXT';
UPDATE system_settings SET db_schema_version='1617',db_schema_update_date=NOW() where db_schema_version < 1617; UPDATE system_settings SET db_schema_version='1617',db_schema_update_date=NOW() where db_schema_version < 1617;
INSERT INTO vicidial_settings_containers VALUES ('PHONE_DEFAULTS','Default phone settings for preloading','PHONE_DEFAULTS','---ALL---','# Below are all phone settings recognized under the PHONE_DEFAULTS \r\n# container type and the type of data each accepts. Any setting that\r\n# uses a default value in the database has said value pre-set below\r\n\r\n# 10 char max\r\nvoicemail_id => \r\n \r\n# 15 char max\r\nserver_ip => \r\n\r\n# 100 char max\r\npass => \r\n\r\n# 10 char max\r\nstatus => \r\n\r\n# Y/N only\r\nactive => Y\r\n\r\n# 50 char max\r\nphone_type => \r\n\r\n# \'SIP\',\'Zap\',\'IAX2\' or \'EXTERNAL\'\r\nprotocol => SIP\r\n\r\n# positive or negatier 2-decimal floating point number\r\nlocal_gmt => -5.00\r\n\r\n# 20 char max\r\nvoicemail_dump_exten => 85026666666666\r\n\r\n# 20 char max\r\noutbound_cid => \r\n\r\n# 100 char max\r\nemail => \r\n\r\n# 15 char max\r\ntemplate_id => \r\n\r\n# text, conf_override can span multiple lines, see below\r\nconf_override => \r\n# type=friend\r\n# host=dynamic\r\n# canreinvite=no\r\n# context=default1\r\n\r\n# 50 char max\r\nphone_context => default\r\n\r\n# Unsigned - max value 65536\r\nphone_ring_timeout => 60\r\n\r\n# 20 char max\r\nconf_secret => test\r\n\r\n# Y/N only\r\ndelete_vm_after_email => N\r\n\r\n# Options - Y, N, or Y_API_LAUNCH\r\nis_webphone => N\r\n\r\n# Y/N only\r\nuse_external_server_ip => N\r\n\r\n# 100 char max\r\ncodecs_list => \r\n\r\n# 0/1 only\r\ncodecs_with_template => 0\r\n\r\n# Options - Y, N, TOGGLE, or TOGGLE_OFF\r\nwebphone_dialpad => Y\r\n\r\n# Y/N only\r\non_hook_agent => N\r\n\r\n# Y/N only\r\nwebphone_auto_answer => Y\r\n\r\n# 30 char max\r\nvoicemail_timezone => eastern\r\n\r\n# 255 char max\r\nvoicemail_options => \r\n\r\n# 20 char max\r\nuser_group => ---ALL---\r\n\r\n# 100 char max\r\nvoicemail_greeting => \r\n\r\n# 20 char max\r\nvoicemail_dump_exten_no_inst => 85026666666667\r\n\r\n# Y/N only\r\nvoicemail_instructions => Y\r\n\r\n# Y/N only\r\non_login_report => N\r\n\r\n# 40 char max\r\nunavail_dialplan_fwd_exten => \r\n\r\n# 100 char max\r\nunavail_dialplan_fwd_context => \r\n\r\n# text\r\nnva_call_url => \r\n\r\n# 40 char max\r\nnva_search_method => \r\n\r\n# 255 char max\r\nnva_error_filename => \r\n\r\n# Integer, any size\r\nnva_new_list_id => 995\r\n\r\n# 10 char max\r\nnva_new_phone_code => 1\r\n\r\n# 6 char max\r\nnva_new_status => NVAINS\r\n\r\n# Y/N only\r\nwebphone_dialbox => Y\r\n\r\n# Y/N only\r\nwebphone_mute => Y\r\n\r\n# Y/N only\r\nwebphone_volume => Y\r\n\r\n# Y/N only\r\nwebphone_debug => N\r\n\r\n# 20 char max\r\noutbound_alt_cid => \r\n\r\n# Y/N only\r\nconf_qualify => Y\r\n\r\n# 255 char max\r\nwebphone_layout => \r\n');
ALTER TABLE system_settings ADD phone_defaults_container VARCHAR(40) default '---DISABLED---';
UPDATE system_settings SET db_schema_version='1618',db_schema_update_date=NOW() where db_schema_version < 1618;
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
# version: 20210304204801 # version: 20210305232801
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. 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. 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>
@@ -1118,6 +1118,7 @@ settings-enable_auto_reports Enable Automated Reports <QXZ>This option if enable
settings-first_login_trigger First Login Trigger <QXZ>This setting allows for the initial configuration of the server screen to be shown to the administrator when they first log into the system.</QXZ> settings-first_login_trigger First Login Trigger <QXZ>This setting allows for the initial configuration of the server screen to be shown to the administrator when they first log into the system.</QXZ>
settings-require_password_length User Password Minimum Length <QXZ>If set above 0, this setting will require that user passwords, phone and server passwords, and system settings default passwords be at least this minimum length of characters when those records settings are modified on the Modify pages. The most important factor in password security is the length of the password, and user passwords in this system can be up to 100 characters in length. Default is 0 for disabled.</QXZ> settings-require_password_length User Password Minimum Length <QXZ>If set above 0, this setting will require that user passwords, phone and server passwords, and system settings default passwords be at least this minimum length of characters when those records settings are modified on the Modify pages. The most important factor in password security is the length of the password, and user passwords in this system can be up to 100 characters in length. Default is 0 for disabled.</QXZ>
settings-user_account_emails User Login Link Emails Allowed <QXZ>The feature will allow you to click on a link from the User Modify page to send an email to an agent with a shortcut URL web address that will allow them to more easily log in to the agent screen. You can select options to send these emails with or without the user password included. Default is DISABLED.</QXZ> settings-user_account_emails User Login Link Emails Allowed <QXZ>The feature will allow you to click on a link from the User Modify page to send an email to an agent with a shortcut URL web address that will allow them to more easily log in to the agent screen. You can select options to send these emails with or without the user password included. Default is DISABLED.</QXZ>
settings-phone_defaults_container Default Phones Settings Container <QXZ>This feature allows you to use a settings container of the type PHONE_DEFAULTS to pre-load numerous settings into the phone creation form and create new phones with these values pre-set. Refer to the PHONE_DEFAULTS settings container for an example of a container with all available settings that can be pre-set. Default is ---DISABLED---.</QXZ>
settings-default_phone_registration_password Default Phone Registration Password <QXZ>This is the default registration password used when new phones are added to the system. Default is test.</QXZ> settings-default_phone_registration_password Default Phone Registration Password <QXZ>This is the default registration password used when new phones are added to the system. Default is test.</QXZ>
settings-default_phone_login_password Default Phone Login Password <QXZ>This is the default phone web login password used when new phones are added to the system. Default is test.</QXZ> settings-default_phone_login_password Default Phone Login Password <QXZ>This is the default phone web login password used when new phones are added to the system. Default is test.</QXZ>
settings-default_server_password Default Server Password <QXZ>This is the default server password used when new servers are added to the system. Default is test.</QXZ> settings-default_server_password Default Server Password <QXZ>This is the default server password used when new servers are added to the system. Default is test.</QXZ>