Fix. Use temp_dir variable instead of hard coded /tmp

This commit is contained in:
Alexey Melnichuk
2015-08-07 11:52:18 +04:00
parent 5c8a6dd7fe
commit 785136eca9
7 changed files with 12 additions and 12 deletions

View File

@@ -589,7 +589,7 @@
max_len_seconds = 5;
silence_threshold = "500";
silence_secs = "3";
session:recordFile("/tmp/conference-"..uuid..".wav", max_len_seconds, silence_threshold, silence_secs);
session:recordFile(temp_dir .. "/conference-"..uuid..".wav", max_len_seconds, silence_threshold, silence_secs);
end
--play a message that the conference is being a recorded
@@ -678,7 +678,7 @@
--announce the caller
if (announce == "true") then
--announce the caller - play the recording
cmd = "conference "..meeting_uuid.."-"..domain_name.." play /tmp/conference-"..uuid..".wav";
cmd = "conference "..meeting_uuid.."-"..domain_name.." play " .. temp_dir .. "/conference-"..uuid..".wav";
--freeswitch.consoleLog("notice", "[conference center] ".. cmd .."\n");
response = api:executeString(cmd);
--play has entered the conference

View File

@@ -284,7 +284,7 @@
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open("/tmp/callcenter.conf.xml", "w"));
local file = assert(io.open(temp_dir .. "/callcenter.conf.xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@@ -103,7 +103,7 @@
table.insert(xml, [[ <param name="caller-id-name" value="$${outbound_caller_name}"/>]]);
table.insert(xml, [[ <param name="caller-id-number" value="$${outbound_caller_id}"/>]]);
table.insert(xml, [[ <param name="comfort-noise" value="true"/>]]);
table.insert(xml, [[ <param name="auto-record" value="/tmp/test.wav"/>]]);
table.insert(xml, [[ <param name="auto-record" value="]]..temp_dir .. [[/test.wav"/>]]);
table.insert(xml, [[ </profile>]]);
table.insert(xml, [[ <profile name="wideband">]]);
@@ -131,7 +131,7 @@
table.insert(xml, [[ <param name="caller-id-name" value="$${outbound_caller_name}"/>]]);
table.insert(xml, [[ <param name="caller-id-number" value="$${outbound_caller_id}"/>]]);
table.insert(xml, [[ <param name="comfort-noise" value="true"/>]]);
table.insert(xml, [[ <param name="auto-record" value="/tmp/test.wav"/>]]);
table.insert(xml, [[ <param name="auto-record" value="]]..temp_dir .. [[/test.wav"/>]]);
table.insert(xml, [[ </profile>]]);
table.insert(xml, [[ <profile name="ultrawideband">]]);
@@ -159,7 +159,7 @@
table.insert(xml, [[ <param name="caller-id-name" value="$${outbound_caller_name}"/>]]);
table.insert(xml, [[ <param name="caller-id-number" value="$${outbound_caller_id}"/>]]);
table.insert(xml, [[ <param name="comfort-noise" value="true"/>]]);
table.insert(xml, [[ <param name="auto-record" value="/tmp/test.wav"/>]]);
table.insert(xml, [[ <param name="auto-record" value="]]..temp_dir .. [[/test.wav"/>]]);
table.insert(xml, [[ </profile>]]);
table.insert(xml, [[ <profile name="cdquality">]]);
@@ -187,7 +187,7 @@
table.insert(xml, [[ <param name="caller-id-name" value="$${outbound_caller_name}"/>]]);
table.insert(xml, [[ <param name="caller-id-number" value="$${outbound_caller_id}"/>]]);
table.insert(xml, [[ <param name="comfort-noise" value="true"/>]]);
table.insert(xml, [[ <param name="auto-record" value="/tmp/test.wav"/>]]);
table.insert(xml, [[ <param name="auto-record" value="]]..temp_dir .. [[/test.wav"/>]]);
table.insert(xml, [[ </profile>]]);
table.insert(xml, [[ <profile name="sla">]]);
@@ -261,7 +261,7 @@
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open("/tmp/conference.conf.xml", "w"));
local file = assert(io.open(temp_dir .."/conference.conf.xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@@ -261,7 +261,7 @@
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open("/tmp/sofia.conf.xml", "w"));
local file = assert(io.open(temp_dir .. "/sofia.conf.xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@@ -494,7 +494,7 @@
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open("/tmp/" .. user .. "@" .. domain_name .. ".xml", "w"));
local file = assert(io.open(temp_dir .. "/" .. user .. "@" .. domain_name .. ".xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@@ -192,7 +192,7 @@
--send the xml to the console
if (debug["xml_string"]) then
local file = assert(io.open("/tmp/xml_handler-" .. language .. ".xml", "w"));
local file = assert(io.open(temp_dir .. "/xml_handler-" .. language .. ".xml", "w"));
file:write(XML_STRING);
file:close();
end

View File

@@ -66,7 +66,7 @@
--if the screen file is found then set confirm to true
if (domain_name ~= nil) then
call_screen_file = "/tmp/" .. domain_name .. "-" .. caller_id_number .. "." .. record_ext;
call_screen_file = temp_dir .. "/" .. domain_name .. "-" .. caller_id_number .. "." .. record_ext;
if (file_exists(call_screen_file)) then
confirm = "true";
end