Set the destination number to sip_to_user and sip_req_user

This commit is contained in:
FusionPBX
2025-04-18 14:10:33 -06:00
committed by GitHub
parent fed3d81af2
commit 699a502378

View File

@@ -71,7 +71,7 @@
sql = sql .. "AND destination_enabled = 'true' ";
local params = {destination_number = destination_number};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "SQL:" .. sql .. "; params: " .. json.encode(params) .. "\n");
freeswitch.consoleLog("notice", "SQL:" .. sql .. "; destination_number: " .. destination_number .. "\n");
end
dbh:query(sql, params, function(row)
@@ -132,6 +132,10 @@
session:execute("set", "effective_caller_id_number="..outbound_caller_id_number);
end
--set the destination number to sip_to_user and sip_req_user
session:execute("set", "sip_to_user="..var["destination_number"]);
session:execute("set", "sip_req_user="..var["destination_number"]);
--send to the console
freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. value .. " source: cache\n");