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 bcf1363277
commit 73e0e7a3a8
7 changed files with 12 additions and 12 deletions

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