mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-31 17:33:48 +00:00
Add. Use params in vm/record_message.lua (#2129)
This commit is contained in:
committed by
FusionPBX
parent
bf4922387b
commit
86bdf059e0
@@ -133,12 +133,13 @@
|
||||
session:hangup();
|
||||
else
|
||||
--get the voicemail options
|
||||
sql = [[SELECT * FROM v_voicemail_options WHERE voicemail_uuid = ']] .. voicemail_uuid ..[[' ORDER BY voicemail_option_order asc ]];
|
||||
local sql = [[SELECT * FROM v_voicemail_options WHERE voicemail_uuid = :voicemail_uuid ORDER BY voicemail_option_order asc ]];
|
||||
local params = {voicemail_uuid = voicemail_uuid};
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
|
||||
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||
end
|
||||
count = 0;
|
||||
status = dbh:query(sql, function(row)
|
||||
dbh:query(sql, params, function(row)
|
||||
--check for matching options
|
||||
if (tonumber(row.voicemail_option_digits) ~= nil) then
|
||||
row.voicemail_option_digits = "^"..row.voicemail_option_digits.."$";
|
||||
|
||||
Reference in New Issue
Block a user