Update index.lua

This commit is contained in:
FusionPBX 2019-06-03 08:24:13 -06:00 committed by GitHub
parent 67881888bb
commit a98e5087cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -237,15 +237,20 @@
record_path = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d");
record_path = record_path:gsub("\\", "/");
--set the recording file
record_name = uuid .. "." .. record_ext;
--set the recording file name
if (session:ready()) then
record_name = session:getVariable("record_name");
if (not record_name) then
record_name = uuid .. "." .. record_ext;
end
end
---set the call_timeout to a higher value to prevent the early timeout of the ring group
if (session:ready()) then
if (ring_group_call_timeout and #ring_group_call_timeout == 0) then
ring_group_call_timeout = '300';
end
session:setVariable("call_timeout",ring_group_call_timeout);
session:setVariable("call_timeout", ring_group_call_timeout);
end
--play the greeting
@ -380,7 +385,7 @@
--process the ring group
if (ring_group_forward_enabled == "true" and string.len(ring_group_forward_destination) > 0) then
--forward the ring group
session:setVariable("toll_allow",ring_group_forward_toll_allow);
session:setVariable("toll_allow", ring_group_forward_toll_allow);
session:execute("transfer", ring_group_forward_destination.." XML "..context);
else
--get the strategy of the ring group, if random, we use random() to order the destinations