Fix call timeout for ring strategy enterprise
Call timeout ignored with enterprise adjust the destinaton_timeout to honor the call timeout
This commit is contained in:
parent
89eeeb84ae
commit
8a1421eb97
|
|
@ -932,6 +932,25 @@ log = require "resources.functions.log".ring_group
|
||||||
end
|
end
|
||||||
row.record_session = record_session
|
row.record_session = record_session
|
||||||
|
|
||||||
|
--call timeout ignored with enterprise adjust the destinaton_timeout to honor the call timeout
|
||||||
|
if (ring_group_strategy == "enterprise") then
|
||||||
|
delay = tonumber(destination_delay)
|
||||||
|
if (delay >= 1000) then
|
||||||
|
delay = delay / 1000;
|
||||||
|
end
|
||||||
|
timeout = tonumber(destination_timeout);
|
||||||
|
call_timeout = tonumber(ring_group_call_timeout);
|
||||||
|
if (delay == 0 and call_timeout < timeout) then
|
||||||
|
destination_timeout = call_timeout;
|
||||||
|
end
|
||||||
|
if (delay > 0 and call_timeout < delay + timeout) then
|
||||||
|
destination_timeout = (delay + timeout) - call_timeout;
|
||||||
|
if (delay >= call_timeout) then
|
||||||
|
goto continue
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--process according to user_exists, sip_uri, external number
|
--process according to user_exists, sip_uri, external number
|
||||||
if (user_exists == "true") then
|
if (user_exists == "true") then
|
||||||
--get the extension_uuid
|
--get the extension_uuid
|
||||||
|
|
@ -1045,6 +1064,7 @@ log = require "resources.functions.log".ring_group
|
||||||
--increment the value of x
|
--increment the value of x
|
||||||
x = x + 1;
|
x = x + 1;
|
||||||
end
|
end
|
||||||
|
::continue::
|
||||||
end
|
end
|
||||||
|
|
||||||
--release dbh before bridge
|
--release dbh before bridge
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue