Use effective_caller_id_name for local caller ID name

A local call does not have caller_id_name set automatically so we need to use effective_caller_id_name
This commit is contained in:
FusionPBX 2023-01-19 14:48:18 -07:00 committed by GitHub
parent 2980555287
commit 62a8b95a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,7 @@
);
if (debug["info"]) then
freeswitch.consoleLog("notice", "[missed call] " .. caller_id_number .. "->" .. sip_to_user .. "emailed to " .. missed_call_data .. "\n");
freeswitch.consoleLog("notice", "[missed call] " .. caller_id_name .. " " .. caller_id_number .. " " .. sip_to_user .. "emailed to " .. missed_call_data .. "\n");
end
end
end
@ -135,6 +135,7 @@
dialed_user = env:getHeader("dialed_user");
missed_call_app = env:getHeader("missed_call_app");
missed_call_data = env:getHeader("missed_call_data");
call_direction = env:getHeader("call_direction");
-- get the Caller ID
caller_id_name = env:getHeader("caller_id_name");
@ -145,6 +146,9 @@
if (caller_id_number == nil) then
caller_id_number = env:getHeader("Caller-Caller-ID-Number");
end
if (call_direction == "local") then
caller_id_name = env:getHeader("effective_caller_id_name");
end
--show the logs
if (debug["info"] == true) then