Update index.lua
This commit is contained in:
parent
e0555de2d3
commit
ce8ac1d3e2
|
|
@ -237,15 +237,20 @@
|
||||||
record_path = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d");
|
record_path = recordings_dir .. "/" .. domain_name .. "/archive/" .. os.date("%Y/%b/%d");
|
||||||
record_path = record_path:gsub("\\", "/");
|
record_path = record_path:gsub("\\", "/");
|
||||||
|
|
||||||
--set the recording file
|
--set the recording file name
|
||||||
record_name = uuid .. "." .. record_ext;
|
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
|
---set the call_timeout to a higher value to prevent the early timeout of the ring group
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
if (ring_group_call_timeout and #ring_group_call_timeout == 0) then
|
if (ring_group_call_timeout and #ring_group_call_timeout == 0) then
|
||||||
ring_group_call_timeout = '300';
|
ring_group_call_timeout = '300';
|
||||||
end
|
end
|
||||||
session:setVariable("call_timeout",ring_group_call_timeout);
|
session:setVariable("call_timeout", ring_group_call_timeout);
|
||||||
end
|
end
|
||||||
|
|
||||||
--play the greeting
|
--play the greeting
|
||||||
|
|
@ -380,7 +385,7 @@
|
||||||
--process the ring group
|
--process the ring group
|
||||||
if (ring_group_forward_enabled == "true" and string.len(ring_group_forward_destination) > 0) then
|
if (ring_group_forward_enabled == "true" and string.len(ring_group_forward_destination) > 0) then
|
||||||
--forward the ring group
|
--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);
|
session:execute("transfer", ring_group_forward_destination.." XML "..context);
|
||||||
else
|
else
|
||||||
--get the strategy of the ring group, if random, we use random() to order the destinations
|
--get the strategy of the ring group, if random, we use random() to order the destinations
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue