mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-28 03:29:18 +00:00
Remove forward_caller_id_uuid field.
This commit is contained in:
@@ -147,7 +147,6 @@
|
||||
local last_forward_all_destination = row.forward_all_destination;
|
||||
local follow_me_uuid = row.follow_me_uuid;
|
||||
local toll_allow = row.toll_allow or '';
|
||||
local forward_caller_id_uuid = row.forward_caller_id_uuid;
|
||||
|
||||
--toggle enabled
|
||||
if enabled == "toggle" then
|
||||
@@ -190,56 +189,17 @@
|
||||
session:streamFile(sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-call_forwarding_has_been_set.wav");
|
||||
end
|
||||
|
||||
--get the caller_id for outbound call
|
||||
local forward_caller_id = ""
|
||||
if enabled == "true" and not empty(forward_caller_id_uuid) then
|
||||
local sql = "select destination_number, destination_description,"..
|
||||
"destination_caller_id_number, destination_caller_id_name " ..
|
||||
"from v_destinations where domain_uuid = :domain_uuid and " ..
|
||||
"destination_type = 'inbound' and destination_uuid = :destination_uuid";
|
||||
local params = {domain_uuid = domain_uuid; destination_uuid = forward_caller_id_uuid}
|
||||
if (debug["sql"]) then
|
||||
log.noticef("SQL: %s; params: %s", sql, json.encode(params));
|
||||
end
|
||||
local row = dbh:first_row(sql, params)
|
||||
if row then
|
||||
local caller_id_number = row.destination_caller_id_number
|
||||
if empty(caller_id_number) then
|
||||
caller_id_number = row.destination_number
|
||||
end
|
||||
|
||||
local caller_id_name = row.destination_caller_id_name
|
||||
if empty(caller_id_name) then
|
||||
caller_id_name = row.destination_description
|
||||
end
|
||||
|
||||
if not empty(caller_id_number) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_number=" .. caller_id_number ..
|
||||
",origination_caller_id_number=" .. caller_id_number
|
||||
end
|
||||
|
||||
if not empty(caller_id_name) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_name=" .. caller_id_name ..
|
||||
",origination_caller_id_name=" .. caller_id_name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--get default caller_id for outbound call
|
||||
if enabled == "true" and empty(forward_caller_id_uuid) then
|
||||
if settings:get('cdr', 'call_forward_fix', 'boolean') == 'true' then
|
||||
if not empty(row.outbound_caller_id_number) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_number=" .. row.outbound_caller_id_number ..
|
||||
",origination_caller_id_number=" .. row.outbound_caller_id_number
|
||||
end
|
||||
if not empty(row.outbound_caller_id_name) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_name=" .. row.outbound_caller_id_name ..
|
||||
",origination_caller_id_name=" .. row.outbound_caller_id_name
|
||||
end
|
||||
if enabled == "true" and settings:get('cdr', 'call_forward_fix', 'boolean') == 'true' then
|
||||
if not empty(row.outbound_caller_id_number) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_number=" .. row.outbound_caller_id_number ..
|
||||
",origination_caller_id_number=" .. row.outbound_caller_id_number
|
||||
end
|
||||
if not empty(row.outbound_caller_id_name) then
|
||||
forward_caller_id = forward_caller_id ..
|
||||
",outbound_caller_id_name=" .. row.outbound_caller_id_name ..
|
||||
",origination_caller_id_name=" .. row.outbound_caller_id_name
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user