After removing domain name from the default recordings dir path need to add the domain name every where the recordings directory is currently used.

This commit is contained in:
markjcrane
2015-12-06 13:37:35 -07:00
parent 37d4f52dc8
commit ff8b838b5e
32 changed files with 92 additions and 105 deletions

View File

@@ -148,6 +148,10 @@
default_language = session:getVariable("default_language");
default_dialect = session:getVariable("default_dialect");
--recording = session:getVariable("recording");
domain_name = session:getVariable("domain_name");
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
--set the end epoch
end_epoch = os.time();
@@ -339,6 +343,9 @@
--freeswitch.consoleLog("notice", "[conference center] destination_number: " .. destination_number .. "\n");
--freeswitch.consoleLog("notice", "[conference center] caller_id_number: " .. caller_id_number .. "\n");
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
--set the sounds path for the language, dialect and voice
default_language = session:getVariable("default_language");
default_dialect = session:getVariable("default_dialect");
@@ -411,10 +418,6 @@
--add the domain to the recording directory
freeswitch.consoleLog("notice", "[conference center] domain_count: " .. domain_count .. "\n");
if (domain_count > 1) then
recordings_dir = recordings_dir.."/"..domain_name;
freeswitch.consoleLog("notice", "[conference center] recordings_dir: " .. recordings_dir .. "\n");
end
--sounds
enter_sound = "tone_stream://v=-20;%(100,1000,100);v=-20;%(90,60,440);%(90,60,620)";

View File

@@ -36,10 +36,8 @@
--get the current time
start_epoch = os.time();
--set the recording variable
if (domain_count > 1) then
recordings_dir = recordings_dir.."/"..domain_name;
end
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
recordings_dir = recordings_dir.."/archive/"..os.date("%Y", start_epoch).."/"..os.date("%b", start_epoch).."/"..os.date("%d", start_epoch);
mkdir(recordings_dir);
recording = recordings_dir.."/"..conference_session_uuid;

View File

@@ -36,7 +36,6 @@
destination_number = session:getVariable("destination_number");
call_direction = session:getVariable("call_direction");
domain_name = session:getVariable("domain_name");
recordings_dir = session:getVariable("recordings_dir");
--determine the call direction
if (call_direction == nil) then

View File

@@ -23,7 +23,6 @@
-- Mark J Crane <markjcrane@fusionpbx.com>
sounds_dir = "";
recordings_dir = "";
pin_number = "";
max_tries = "3";
digit_timeout = "3000";

View File

@@ -76,10 +76,8 @@
end
end
--set the recordings directory
if (domain_count > 1) then
recordings_dir = recordings_dir .. "/"..domain_name;
end
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
--set default variable(s)
tries = 0;

View File

@@ -100,6 +100,7 @@
recording_slots = session:getVariable("recording_slots");
recording_prefix = session:getVariable("recording_prefix");
recording_name = session:getVariable("recording_name");
domain_name = session:getVariable("domain_name");
--select the recording number
if (recording_slots) then
@@ -256,20 +257,9 @@ if ( session:ready() ) then
domain_name = session:getVariable("domain_name");
domain_uuid = session:getVariable("domain_uuid");
--set the base recordings dir
base_recordings_dir = recordings_dir;
--add the domain name to the recordings directory
recordings_dir = recordings_dir .. "/"..domain_name;
--use the recording_dir when the variable is set
if (session:getVariable("recordings_dir")) then
if (base_recordings_dir ~= session:getVariable("recordings_dir")) then
recordings_dir = session:getVariable("recordings_dir");
end
end
--get the recordings from the config.lua and append the domain_name if the system is multi-tenant
if (domain_count > 1) then
recordings_dir = recordings_dir .. "/" .. domain_name;
end
--set the sounds path for the language, dialect and voice
default_language = session:getVariable("default_language");
default_dialect = session:getVariable("default_dialect");