diff --git a/resources/install/scripts/directory.lua b/resources/install/scripts/directory.lua index 61430c9e9d..a5c2bd20bc 100644 --- a/resources/install/scripts/directory.lua +++ b/resources/install/scripts/directory.lua @@ -54,6 +54,16 @@ storage_type = settings['voicemail']['storage_type']['text']; end end + if (settings['voicemail']['speak_mod'] ~= nil) then + if (settings['voicemail']['speak_mod']['text'] ~= nil) then + speak_mod = settings['voicemail']['speak_mod']['text']; + end + end + if (settings['voicemail']['speak_voice'] ~= nil) then + if (settings['voicemail']['speak_voice']['text'] ~= nil) then + speak_voice = settings['voicemail']['speak_voice']['text']; + end + end if (settings['voicemail']['storage_path'] ~= nil) then if (settings['voicemail']['storage_path']['text'] ~= nil) then storage_path = settings['voicemail']['storage_path']['text']; @@ -239,10 +249,18 @@ session:streamFile(file_location); else --announce the first and last names - session:execute("say", "en name_spelled iterated "..row.first_name); + if (speak_mod ~= nil and speak_voice ~= nil) then + session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.first_name); + else + session:execute("say", "en name_spelled iterated "..row.first_name); + end --session:execute("sleep", "500"); if (row.last_name ~= nil) then - session:execute("say", "en name_spelled iterated "..row.last_name); + if (speak_mod ~= nil and speak_voice ~= nil) then + session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.last_name); + else + session:execute("say", "en name_spelled iterated "..row.last_name); + end end end end); @@ -259,10 +277,18 @@ session:streamFile(voicemail_dir.."/"..row.extension.."/recorded_name.wav"); else --announce the first and last names - session:execute("say", "en name_spelled iterated "..row.first_name); + if (speak_mod ~= nil and speak_voice ~= nil) then + session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.first_name); + else + session:execute("say", "en name_spelled iterated "..row.first_name); + end if (row.last_name ~= nil) then --session:execute("sleep", "500"); - session:execute("say", "en name_spelled iterated "..row.last_name); + if (speak_mod ~= nil and speak_voice ~= nil) then + session:execute("speak",speak_mod.."|"..speak_voice.."|"..row.last_name); + else + session:execute("say", "en name_spelled iterated "..row.last_name); + end end end end