From 4477b452dbec6c36f243cab813b081e62664cbf3 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 17 Apr 2015 18:08:29 +0000 Subject: [PATCH] Fix the greeting using base64. --- .../app/voicemail/resources/functions/play_greeting.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/install/scripts/app/voicemail/resources/functions/play_greeting.lua b/resources/install/scripts/app/voicemail/resources/functions/play_greeting.lua index 0d08d99101..dca3124adc 100644 --- a/resources/install/scripts/app/voicemail/resources/functions/play_greeting.lua +++ b/resources/install/scripts/app/voicemail/resources/functions/play_greeting.lua @@ -43,14 +43,13 @@ --get the greeting from the database if (storage_type == "base64") then - if (string.len(ivr_menu_greet_long) > 1) then sql = [[SELECT * FROM v_voicemail_greetings WHERE domain_uuid = ']] .. domain_uuid ..[[' AND voicemail_id = ']].. voicemail_id.. [[' AND greeting_id = ']].. greeting_id.. [[' ]]; - --if (debug["sql"]) then + if (debug["sql"]) then freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n"); - --end + end status = dbh:query(sql, function(row) --add functions dofile(scripts_dir.."/resources/functions/base64.lua"); @@ -64,10 +63,10 @@ file:write(base64.decode(row["greeting_base64"])); file:close(); end - --custom greeting + + --play the greeting session:streamFile(voicemail_dir.."/"..voicemail_id.."/greeting_"..greeting_id..".wav"); end); - end elseif (storage_type == "http_cache") then session:streamFile(storage_path.."/"..voicemail_id.."/greeting_"..greeting_id..".wav"); else