Add. Use params in vm/listen_to_recording.lua (#2137)
This commit is contained in:
committed by
FusionPBX
parent
3ef2f69a3e
commit
adc852563d
@@ -23,8 +23,6 @@
|
|||||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
-- POSSIBILITY OF SUCH DAMAGE.
|
-- POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
local Database = require "resources.functions.database"
|
|
||||||
|
|
||||||
--define function to listen to the recording
|
--define function to listen to the recording
|
||||||
function listen_to_recording (message_number, uuid, created_epoch, caller_id_name, caller_id_number)
|
function listen_to_recording (message_number, uuid, created_epoch, caller_id_name, caller_id_number)
|
||||||
|
|
||||||
@@ -76,13 +74,14 @@
|
|||||||
if (storage_type == "base64") then
|
if (storage_type == "base64") then
|
||||||
local dbh = Database.new('system', 'base64/read')
|
local dbh = Database.new('system', 'base64/read')
|
||||||
|
|
||||||
sql = [[SELECT * FROM v_voicemail_messages
|
local sql = [[SELECT * FROM v_voicemail_messages
|
||||||
WHERE domain_uuid = ']] .. domain_uuid ..[['
|
WHERE domain_uuid = :domain_uuid
|
||||||
AND voicemail_message_uuid = ']].. uuid.. [[' ]];
|
AND voicemail_message_uuid = :uuid]];
|
||||||
|
local params = {domain_uuid = domain_uuid, uuid = uuid};
|
||||||
if (debug["sql"]) then
|
if (debug["sql"]) then
|
||||||
freeswitch.consoleLog("notice", "[ivr_menu] SQL: " .. sql .. "\n");
|
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
|
||||||
end
|
end
|
||||||
status = dbh:query(sql, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
--set the voicemail message path
|
--set the voicemail message path
|
||||||
mkdir(voicemail_dir.."/"..voicemail_id);
|
mkdir(voicemail_dir.."/"..voicemail_id);
|
||||||
message_intro_location = voicemail_dir.."/"..voicemail_id.."/intro_"..uuid.."."..vm_message_ext;
|
message_intro_location = voicemail_dir.."/"..voicemail_id.."/intro_"..uuid.."."..vm_message_ext;
|
||||||
|
|||||||
Reference in New Issue
Block a user