Added extension as recording_lookup option
Allowed for secure sounds_web_server setting git-svn-id: svn://192.168.202.10@3301 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -30,10 +30,11 @@
|
||||
#
|
||||
# NOTE: For Asterisk 1.4, use a pipe instead of a comma in the Park Call AGI IVR field
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 150814-1119 - First build based on park_call_IVR_example.agi script
|
||||
# 201002-1538 - Allowed for secure sounds_web_server setting
|
||||
#
|
||||
|
||||
$script = 'park_call_IVR_cf_collect.agi';
|
||||
@@ -126,6 +127,9 @@ if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$sounds_web_server = $aryA[0];
|
||||
$sounds_web_server_URL_prefix = $sounds_web_server;
|
||||
if ($sounds_web_server_URL_prefix !~ /^http|^https/i)
|
||||
{$sounds_web_server_URL_prefix = "http://$sounds_web_server";}
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
@@ -353,7 +357,7 @@ if ($VACcount > 0)
|
||||
}
|
||||
|
||||
### URL to be sent to populate the custom field value that was collected from the customer
|
||||
$parse_url = "http://$sounds_web_server/agc/update_cf_ivr.php\?lead_id=$VAC_lead_id&caller_id=$callerid&list_id=$VL_list_id&field=$custom_field&value=$customer_id_number&user=$VLA_user";
|
||||
$parse_url = "$sounds_web_server_URL_prefix/agc/update_cf_ivr.php\?lead_id=$VAC_lead_id&caller_id=$callerid&list_id=$VL_list_id&field=$custom_field&value=$customer_id_number&user=$VLA_user";
|
||||
|
||||
### insert a new url log entry
|
||||
$SQL_log = "$parse_url";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# syncronizes audio between audio store and this server
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG
|
||||
# 90513-0458 - First Build
|
||||
@@ -19,6 +19,7 @@
|
||||
# 141124-2309 - Fixed Fhour variable bug
|
||||
# 141125-1555 - Added audio_store_details audio file info gathering and DB population
|
||||
# 150712-2210 - Added touch of conf files to Asterisk will notice changes
|
||||
# 201002-1537 - Allowed for secure sounds_web_server setting
|
||||
#
|
||||
|
||||
# constants
|
||||
@@ -284,8 +285,10 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$URL = "http://$sounds_web_server/$admin_web_directory/audio_store.php?action=LIST&audio_server_ip=$VARserver_ip";
|
||||
$sounds_web_server_URL_prefix = $sounds_web_server;
|
||||
if ($sounds_web_server_URL_prefix !~ /^http|^https/i)
|
||||
{$sounds_web_server_URL_prefix = "http://$sounds_web_server";}
|
||||
$URL = "$sounds_web_server_URL_prefix/$admin_web_directory/audio_store.php?action=LIST&audio_server_ip=$VARserver_ip";
|
||||
|
||||
$URL =~ s/&/\\&/gi;
|
||||
if ($DB)
|
||||
@@ -336,7 +339,7 @@ while ($i <= $#list)
|
||||
|
||||
if ( ($found_file < 1) || ($force_download > 0) )
|
||||
{
|
||||
`$wgetbin -q --output-document=$PATHsounds/$filename http://$sounds_web_server/$web_prefix$sounds_web_directory/$filename`;
|
||||
`$wgetbin -q --output-document=$PATHsounds/$filename $sounds_web_server_URL_prefix/$web_prefix$sounds_web_directory/$filename`;
|
||||
$event_string = "DOWNLOADING: $filename $filesize";
|
||||
if ($DB > 0) {print " $event_string\n";}
|
||||
&event_logger;
|
||||
@@ -410,7 +413,7 @@ if ($upload > 0)
|
||||
|
||||
if ( ($found_file < 1) || ($force_upload > 0) )
|
||||
{
|
||||
$curloptions = "-s 'http://$sounds_web_server/$admin_web_directory/audio_store.php?action=AUTOUPLOAD&audio_server_ip=$VARserver_ip' -F \"audiofile=\@$PATHsounds/$soundname\"";
|
||||
$curloptions = "-s '$sounds_web_server_URL_prefix/$admin_web_directory/audio_store.php?action=AUTOUPLOAD&audio_server_ip=$VARserver_ip' -F \"audiofile=\@$PATHsounds/$soundname\"";
|
||||
`$curlbin $curloptions`;
|
||||
$event_string = "UPLOADING: $soundname $soundsize";
|
||||
if ($DB > 0) {print " $event_string\n|$curlbin $curloptions|\n";}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2020-08-24
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2020-10-04
|
||||
|
||||
This document describes the functions of an API(Application Programming
|
||||
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
||||
@@ -163,6 +163,7 @@ Changes:
|
||||
200622-1609 - Added more options to add_phone and update_phone functions
|
||||
200815-1025 - Added campaigns_list & hopper_list functions
|
||||
200824-2330 - Added search_method BLOCK option for hopper_list function
|
||||
201002-1545 - Added extension as recording_lookup option, Allowed for secure sounds_web_server setting
|
||||
|
||||
|
||||
API Functions use the 'function' variable
|
||||
@@ -420,11 +421,12 @@ recording_lookup - looks up recordings based upon user and date or lead_id
|
||||
|
||||
NOTE: api user for this function must have user_level set to 7 or higher and "view reports" enabled
|
||||
|
||||
REQUIRED FIELDS-
|
||||
SEARCH FIELDS-
|
||||
agent_user - 2-20 characters
|
||||
lead_id - 1-10 digits
|
||||
date - date of the calls to pull (must be in YYYY-MM-DD format)
|
||||
uniqueid - uniqueid of the call, works best included with another search field
|
||||
extension - 3-100 characters, the extension listed in the recording_log
|
||||
|
||||
SETTINGS FIELDS-
|
||||
stage - the format of the exported data: csv, tab, pipe(default)
|
||||
|
||||
+11
-5
@@ -3624,8 +3624,6 @@ if ($non_latin < 1)
|
||||
$forced_timeclock_login = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$forced_timeclock_login);
|
||||
$uniqueid_status_prefix = preg_replace('/[^-\,\_0-9a-zA-Z]/','',$uniqueid_status_prefix);
|
||||
|
||||
### ALPHA-NUMERIC and dots
|
||||
$sounds_web_server = preg_replace('/[^-\:\.0-9a-zA-Z]/','',$sounds_web_server);
|
||||
### ALPHA-NUMERIC and spaces
|
||||
$lead_order = preg_replace('/[^ 0-9a-zA-Z]/','',$lead_order);
|
||||
### ALPHA-NUMERIC and spaces and dashes and underscores
|
||||
@@ -3884,6 +3882,11 @@ if ($non_latin < 1)
|
||||
$waiting_call_url_off = preg_replace('/;/','',$waiting_call_url_off);
|
||||
$waiting_call_url_off = preg_replace('/\r|\n/', '',$waiting_call_url_off);
|
||||
$waiting_call_url_off = preg_replace('/\'/', '',$waiting_call_url_off);
|
||||
$sounds_web_server = preg_replace('/\\\\/', '',$sounds_web_server);
|
||||
$sounds_web_server = preg_replace('/;/','',$sounds_web_server);
|
||||
$sounds_web_server = preg_replace('/\r|\n/', '',$sounds_web_server);
|
||||
$sounds_web_server = preg_replace('/\'/', '',$sounds_web_server);
|
||||
|
||||
|
||||
### VARIABLES TO BE mysqli_real_escape_string ###
|
||||
# $web_form_address
|
||||
@@ -4718,12 +4721,13 @@ else
|
||||
# 200913-0820 - Added UNSELECTED options for campaign alt_number_dialing
|
||||
# 200916-0922 - Added more modify_leads options for users(modify log statuses)
|
||||
# 200922-0924 - Added web_loader_phone_strip & manual_dial_phone_strip system settings
|
||||
# 201002-1534 - Allowed for secure sounds_web_server setting
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-770a';
|
||||
$build = '200922-0924';
|
||||
$admin_version = '2.14-771a';
|
||||
$build = '201002-1534';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -38666,8 +38670,10 @@ if ($ADD==311111111111111)
|
||||
$admin_web_dir='';
|
||||
if (preg_match("/\//",$admin_web_directory))
|
||||
{$admin_web_dir = dirname("$admin_web_directory"); $admin_web_dir .= "/";}
|
||||
if (!preg_match("/^http:|^https:/i",$sounds_web_server))
|
||||
{$sounds_web_server = "http://".$sounds_web_server;}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Sounds Web Directory").": </td><td align=left><a href=\"http://$sounds_web_server/$admin_web_dir$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Sounds Web Directory").": </td><td align=left><a href=\"$sounds_web_server/$admin_web_dir$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Custom Agent Login Sound").": </td><td><input type=text size=50 maxlength=255 name=meetme_enter_login_filename id=meetme_enter_login_filename value=\"$meetme_enter_login_filename\"> <a href=\"javascript:launch_chooser('meetme_enter_login_filename','date');\">"._QXZ("audio chooser")."</a> $NWB#settings-meetme_enter_login_filename$NWE</td></tr>\n";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# audio_store.php
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Central Audio Storage script
|
||||
#
|
||||
@@ -30,10 +30,11 @@
|
||||
# 170630-1440 - Require modify_audiostore user permissions to access this page
|
||||
# 180508-0115 - Added new help display
|
||||
# 180618-2300 - Modified calls to audio file chooser function
|
||||
# 201002-1536 - Allowed for secure sounds_web_server setting
|
||||
#
|
||||
|
||||
$version = '2.14-22';
|
||||
$build = '170630-1440';
|
||||
$version = '2.14-23';
|
||||
$build = '201002-1536';
|
||||
|
||||
$MT[0]='';
|
||||
|
||||
@@ -100,8 +101,8 @@ if ($ss_conf_ct > 0)
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
|
||||
### check if sounds server matches this server IP, if not then exit with an error
|
||||
$sounds_web_server = str_replace(array('http://','https://'), '', $sounds_web_server);
|
||||
if ( ( ( (strlen($sounds_web_server)) != (strlen($server_name)) ) or (!preg_match("/$sounds_web_server/i",$server_name) ) ) and ($force_allow!='FORCED') )
|
||||
{
|
||||
echo _QXZ("ERROR").": "._QXZ("server")."($server_name) "._QXZ("does not match sounds web server ip")."($sounds_web_server)\n";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# version: 202000922092901
|
||||
# version: 202001002154101
|
||||
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>
|
||||
@@ -1023,7 +1023,7 @@ settings-agentonly_callback_campaign_lock Agent Only Callback Campaign Lock <QXZ
|
||||
settings-callback_time_24hour Callback Time 24 Hours <QXZ>This option defines whether the agent sees 12 hour time with AM PM options or 24 hour time on the Callback setting screen in the agent interface. Default is 0 for disabled.</QXZ>
|
||||
settings-anyone_callback_inactive_lists Anyone Callback Inactive Lists <QXZ>This option defines whether an ANYONE callback within an inactive list will be placed in the hopper to be dialed or not. The default option will place ANYONE scheduled callbacks from inactive lists into the hopper for up to one minute before removing them from the hopper. Using the NO_ADD_TO_HOPPER option will prevent ANYONE scheduled callbacks from inactive lists from ever being put into the hopper while the list is inactive. The KEEP_IN_HOPPER option will put ANYONE scheduled callbacks from inactive lists into the hopper and will make sure they stay in the hopper until they are dialed, or they are no longer dialable due to a Call Time setting. This feature only affects campaigns that use the dial hopper. Default is default.</QXZ>
|
||||
settings-sounds_central_control_active Central Sound Control Active <QXZ>This option defines whether the sound synchronization system is active across all servers. Default is 0 for inactive.</QXZ>
|
||||
settings-sounds_web_server Sounds Web Server <QXZ>This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1.</QXZ>
|
||||
settings-sounds_web_server Sounds Web Server <QXZ>This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1. If you need to have your webservers operate on SSL only, then prefix this with https://</QXZ>
|
||||
settings-sounds_web_directory Sounds Web Directory <QXZ>This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory.</QXZ>
|
||||
settings-meetme_enter_login_filename Custom Agent Login Sound <QXZ>This is a systemwide feature that only works on Asterisk 1.8 servers or higher. This allows you to set an audio file for your agents to hear after their phone has connected to the server after they have logged in to the agent screen. If you want to have this audio prompt be the only prompt that the agent hears, then you will need to copy the sip-silence audio files over the only-person audio files. If you want the agent to hear no prompt when they login then also set this field to sip-silence. Default is EMPTY.</QXZ>
|
||||
settings-meetme_enter_leave3way_filename Custom Agent Leave 3way Sound <QXZ>This is a systemwide feature that only works on Asterisk 1.8 servers or higher. This allows you to set an audio file for your agents to hear after they have left a 3way conference in the agent screen. If you want to have this audio prompt be the only prompt that the agent hears, then you will need to copy the sip-silence audio files over the only-person audio files. If you want the agent to hear no prompt after they leave a 3way call then also set this field to sip-silence. Default is EMPTY.</QXZ>
|
||||
|
||||
@@ -153,10 +153,11 @@
|
||||
# 200622-1609 - Added more options to add_phone and update_phone functions
|
||||
# 200815-1025 - Added campaigns_list & hopper_list functions
|
||||
# 200824-2330 - Added search_method BLOCK option for hopper_list function
|
||||
# 201002-1545 - Added extension as recording lookup option, Allowed for secure sounds_web_server setting
|
||||
#
|
||||
|
||||
$version = '2.14-130';
|
||||
$build = '200824-2330';
|
||||
$version = '2.14-131';
|
||||
$build = '201002-1545';
|
||||
$api_url_log = 0;
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -1140,7 +1141,11 @@ if ($function == 'sounds_list')
|
||||
if (preg_match('/tab/i',$format))
|
||||
{echo "$k\t$file_names[$m]\t$file_dates[$m]\t$file_sizes[$m]\t$file_epoch[$m]\n";}
|
||||
if (preg_match('/link/i',$format))
|
||||
{echo "<a href=\"http://$sounds_web_server/$admin_web_dir$sounds_web_directory/$file_names[$m]\">$file_names[$m]</a><br>\n";}
|
||||
{
|
||||
if (!preg_match("/^http:|^https:/i",$sounds_web_server))
|
||||
{$sounds_web_server = "http://".$sounds_web_server;}
|
||||
echo "<a href=\"$sounds_web_server/$admin_web_dir$sounds_web_directory/$file_names[$m]\">$file_names[$m]</a><br>\n";
|
||||
}
|
||||
if (preg_match('/selectframe/i',$format))
|
||||
{
|
||||
if ($sf < 1)
|
||||
@@ -7277,6 +7282,13 @@ if ($function == 'recording_lookup')
|
||||
$search_ready++;
|
||||
$search_ready++;
|
||||
}
|
||||
if ( (strlen($extension)>2) and (strlen($extension)<101) )
|
||||
{
|
||||
if (strlen($search_SQL)>5)
|
||||
{$search_SQL .= " and ";}
|
||||
$search_SQL .= "extension='$extension'";
|
||||
$search_ready++;
|
||||
}
|
||||
if ( (strlen($date)>9) and (strlen($date)<11) )
|
||||
{
|
||||
if (strlen($search_SQL)>5)
|
||||
|
||||
Reference in New Issue
Block a user