mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Use the domain timezone in voicemail message playback.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user