Voicemail: Honor switch > voicemail > dir value in Default/Domain Settings.

This commit is contained in:
fusionate 2023-09-23 03:51:51 +00:00
parent ceb6872aa6
commit 2600c7d159
No known key found for this signature in database
1 changed files with 11 additions and 3 deletions

View File

@ -156,15 +156,23 @@
end end
end end
--get settings
require "resources.functions.settings";
settings = settings(domain_uuid);
--set the voicemail_dir --set the voicemail_dir
voicemail_dir = voicemail_dir.."/default/"..domain_name; if (settings['switch'] ~= nil) then
if (settings['switch']['voicemail'] ~= nil) then
if (settings['switch']['voicemail']['dir'] ~= nil) then
voicemail_dir = settings['switch']['voicemail']['dir'].."/default/"..domain_name;
end
end
end
if (debug["info"]) then if (debug["info"]) then
freeswitch.consoleLog("notice", "[voicemail] voicemail_dir: " .. voicemail_dir .. "\n"); freeswitch.consoleLog("notice", "[voicemail] voicemail_dir: " .. voicemail_dir .. "\n");
end end
--settings --settings
require "resources.functions.settings";
settings = settings(domain_uuid);
if (settings['voicemail'] ~= nil) then if (settings['voicemail'] ~= nil) then
storage_type = ''; storage_type = '';
if (settings['voicemail']['storage_type'] ~= nil) then if (settings['voicemail']['storage_type'] ~= nil) then