From 7f8173f4ad360bd0942a3296ebb991290fd42969 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 23 Nov 2016 12:00:44 +0300 Subject: [PATCH] Add. Use params in group_call.lua (#2158) --- .../resources/scripts/directory/action/group_call.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/action/group_call.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/action/group_call.lua index 215ffb551f..3f556b67fa 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/action/group_call.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/action/group_call.lua @@ -54,7 +54,7 @@ sql = sql .. "WHERE domain_name = :domain_name "; local params = {domain_name = domain_name}; if (debug["sql"]) then - freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n"); + freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params: " .. json.encode(params) .. "\n"); end dbh:query(sql, params, function(rows) domain_uuid = rows["domain_uuid"]; @@ -70,11 +70,12 @@ --build the call group array sql = [[ select * from v_extensions - where domain_uuid = ']]..domain_uuid..[[' + where domain_uuid = :domain_uuid order by call_group asc ]]; + params = {domain_uuid = domain_uuid}; if (debug["sql"]) then - freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "\n"); + freeswitch.consoleLog("notice", "[xml_handler] SQL: " .. sql .. "; params: " .. json.encode(params) .. "\n"); end call_group_array = {}; dbh:query(sql, function(row)