Add. Use params in vm/record_message.lua (#2129)
This commit is contained in:
parent
bf4922387b
commit
86bdf059e0
|
|
@ -133,12 +133,13 @@
|
||||||
session:hangup();
|
session:hangup();
|
||||||
else
|
else
|
||||||
--get the voicemail options
|
--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
|
if (debug["sql"]) then
|
||||||
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "\n");
|
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||||
end
|
end
|
||||||
count = 0;
|
count = 0;
|
||||||
status = dbh:query(sql, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
--check for matching options
|
--check for matching options
|
||||||
if (tonumber(row.voicemail_option_digits) ~= nil) then
|
if (tonumber(row.voicemail_option_digits) ~= nil) then
|
||||||
row.voicemail_option_digits = "^"..row.voicemail_option_digits.."$";
|
row.voicemail_option_digits = "^"..row.voicemail_option_digits.."$";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue