Fix voicemail copy to multiple destinations.

This commit is contained in:
Mark Crane
2015-01-17 21:56:56 +00:00
parent 573159519b
commit 6c1bf58baf

View File

@@ -359,6 +359,14 @@
voicemail_id_copy = result["voicemail_id"];
end);
--make sure the voicemail directory exists
mkdir(voicemail_dir.."/"..voicemail_id_copy);
--copy the voicemail to each destination
if (file_exists(voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext)) then
os.execute("cp "..voicemail_dir.."/"..voicemail_id.."/msg_"..uuid.."."..vm_message_ext.." "..voicemail_dir.."/"..voicemail_id_copy.."/msg_"..uuid.."."..vm_message_ext);
end
--set the message waiting event
if (tonumber(message_length) > 2) then
local event = freeswitch.Event("message_waiting");
@@ -424,4 +432,4 @@
--uuid_video_refresh
--uuid_video_refresh,<uuid>,Send video refresh.,mod_commands
--may be used to clear video buffer before using record_fsv
--may be used to clear video buffer before using record_fsv