From 699a502378b3c2ec5cba142df65171c2975c5db7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 18 Apr 2025 14:10:33 -0600 Subject: [PATCH] Set the destination number to sip_to_user and sip_req_user --- app/switch/resources/scripts/app/is_local/index.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/switch/resources/scripts/app/is_local/index.lua b/app/switch/resources/scripts/app/is_local/index.lua index ed79d7442c..6d309f9c24 100644 --- a/app/switch/resources/scripts/app/is_local/index.lua +++ b/app/switch/resources/scripts/app/is_local/index.lua @@ -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");