When record_session is true set record_path variable

This commit is contained in:
FusionPBX
2023-07-07 09:38:13 -06:00
committed by GitHub
parent f00712463c
commit 7f60ff23c4

View File

@@ -245,7 +245,7 @@
record_name = session:getVariable("record_name");
record_ext = session:getVariable("record_ext");
if (not record_ext) then record_ext = 'wav'; end
if (not record_ext) then
if (not record_name) then
record_name = record_name:gsub("${caller_id_name}", caller_id_name);
record_name = record_name:gsub("${caller_id_number}", caller_id_number);
record_name = record_name:gsub("${sip_from_user}", sip_from_user);
@@ -812,6 +812,7 @@
--record the session
if (record_session) then
record_session = ",api_on_answer='uuid_record "..uuid.." start ".. record_path .. "/" .. record_name .. "',record_path='".. record_path .."',record_name="..record_name;
session.setVariable("record_path", record_path);
else
record_session = ""
end