Add record in recordings table no matter what type of storage type is used.
This commit is contained in:
parent
889c2c803b
commit
1451d2984c
|
|
@ -139,6 +139,14 @@
|
|||
f:close();
|
||||
recording_base64 = base64.encode(file_content);
|
||||
|
||||
elseif (storage_type == "http_cache") then
|
||||
freeswitch.consoleLog("notice", "[recordings] ".. storage_type .. " ".. storage_path .."\n");
|
||||
session:execute("record", storage_path .."/"..recording_name);
|
||||
else
|
||||
-- syntax is session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs);
|
||||
session:execute("record", "'"..recordings_dir.."/"..recording_name.."' 10800 500 500");
|
||||
end
|
||||
|
||||
--delete the previous recording
|
||||
sql = "delete from v_recordings ";
|
||||
sql = sql .. "where domain_uuid = '".. domain_uuid .. "' ";
|
||||
|
|
@ -185,13 +193,6 @@
|
|||
else
|
||||
dbh:query(sql);
|
||||
end
|
||||
elseif (storage_type == "http_cache") then
|
||||
freeswitch.consoleLog("notice", "[recordings] ".. storage_type .. " ".. storage_path .."\n");
|
||||
session:execute("record", storage_path .."/"..recording_name);
|
||||
else
|
||||
-- syntax is session:recordFile(file_name, max_len_secs, silence_threshold, silence_secs);
|
||||
session:execute("record", "'"..recordings_dir.."/"..recording_name.."' 10800 500 500");
|
||||
end
|
||||
|
||||
--preview the recording
|
||||
session:streamFile(recordings_dir.."/"..recording_name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue