Add option for diversion header for ring group forward

This commit is contained in:
FusionPBX
2025-06-18 17:10:19 -06:00
committed by GitHub
parent 780af3dd29
commit 1e2e7ea441

View File

@@ -525,6 +525,12 @@ log = require "resources.functions.log".ring_group
caller_id_number = ring_group_caller_id_number;
end
--set the diversion header
local diversion_enabled = settings:get('ring_group', 'diversion_enabled', 'boolean') or 'false';
if (diversion_enabled == 'true') then
session:setVariable("sip_h_Diversion", "<sip:"..ring_group_forward_destination.."@"..context..":5060>;reason=unconditional");
end
--forward the ring group
if (caller_id_name) then
session:setVariable("effective_caller_id_name", caller_id_name);