Fix. group_call pass params to query (#2227)
This commit is contained in:
parent
09ec7b1a65
commit
569250d098
|
|
@ -68,17 +68,17 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
--build the call group array
|
--build the call group array
|
||||||
sql = [[
|
local sql = [[
|
||||||
select * from v_extensions
|
select * from v_extensions
|
||||||
where domain_uuid = :domain_uuid
|
where domain_uuid = :domain_uuid
|
||||||
order by call_group asc
|
order by call_group asc
|
||||||
]];
|
]];
|
||||||
params = {domain_uuid = domain_uuid};
|
local params = {domain_uuid = domain_uuid};
|
||||||
if (debug["sql"]) then
|
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
|
end
|
||||||
call_group_array = {};
|
call_group_array = {};
|
||||||
dbh:query(sql, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
call_group = row['call_group'];
|
call_group = row['call_group'];
|
||||||
--call_group = str_replace(";", ",", call_group);
|
--call_group = str_replace(";", ",", call_group);
|
||||||
tmp_array = explode(",", call_group);
|
tmp_array = explode(",", call_group);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue