If mod_shout exists then record to mp3 using it if it doesn't exist then use lame.
This commit is contained in:
parent
990ef61c2f
commit
a9aa74209b
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue