Update index.lua

This commit is contained in:
FusionPBX 2019-06-01 15:07:49 -06:00 committed by GitHub
parent f34737d72a
commit 3333cd4dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -143,6 +143,8 @@
dialplan = session:getVariable("dialplan");
caller_id_name = session:getVariable("caller_id_name");
caller_id_number = session:getVariable("caller_id_number");
effective_caller_id_name = session:getVariable("effective_caller_id_name");
effective_caller_id_number = session:getVariable("effective_caller_id_number");
network_addr = session:getVariable("network_addr");
ani = session:getVariable("ani");
aniii = session:getVariable("aniii");
@ -156,6 +158,14 @@
local_ip_v4 = session:getVariable("local_ip_v4")
end
--set caller id
if (effective_caller_id_name ~= nil) then
caller_id_name = effective_caller_id_name;
end
if (effective_caller_id_number ~= nil) then
caller_id_number = effective_caller_id_number;
end
--default to local if nil
if (call_direction == nil) then
call_direction = "local";