Use the domain timezone in voicemail message playback.

This commit is contained in:
Digital Daz
2015-02-10 00:01:37 +00:00
parent 038cc9904e
commit 6b03488eb0
2 changed files with 23 additions and 5 deletions

View File

@@ -47,12 +47,16 @@
session:say(message_number, default_language, "NUMBER", "pronounced");
end
end
--say the message date
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
--say the message date
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
if (current_time_zone ~= nil) then
session:execute("set", "timezone="..current_time_zone.."");
end
session:say(created_epoch, default_language, "CURRENT_DATE_TIME", "pronounced");
end
end
end
end
--play the message
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then

View File

@@ -60,6 +60,20 @@
dtmf_digits = macro(session, "saved_messages", 1, 100, saved_messages);
end
end
--get domain timezone
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then
sql = [[SELECT domain_setting_value as current_time_zone FROM v_domain_settings
WHERE domain_uuid = ']] .. domain_uuid ..[['
AND domain_setting_subcategory='time_zone' ]];
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
end
status = dbh:query(sql, function(row)
current_time_zone = row["current_time_zone"];
end);
end
end
--to listen to new message
if (session:ready()) then
if (string.len(dtmf_digits) == 0) then