If mod_shout exists then record to mp3 using it if it doesn't exist then use lame.

This commit is contained in:
Mark Crane 2015-04-23 00:05:56 +00:00
parent 5179ddcee9
commit 94a00a7fd5
1 changed files with 19 additions and 13 deletions

View File

@ -149,6 +149,11 @@
result = session:recordFile(storage_path.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext, max_len_seconds, silence_threshold, silence_seconds);
else
mkdir(voicemail_dir.."/"..voicemail_id);
shout_exists = trim(api:execute("module_exists", "mod_shout"));
freeswitch.consoleLog("notice", "shout exists: " .. shout_exists .. "\n");
if (shout_exists == "true") then
result = session:recordFile(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext, max_len_seconds, silence_threshold, silence_seconds);
else
if (vm_message_ext == "mp3") then
--make the recording
--session:execute("record", "vlc://#standard{access=file,mux=mp3,dst="..voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext.."}");
@ -165,6 +170,7 @@
result = session:recordFile(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext, max_len_seconds, silence_threshold, silence_seconds);
end
end
end
--session:execute("record", voicemail_dir.."/"..uuid.." 180 200");
--stop epoch