Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
commit
8d82bdc2f1
|
|
@ -626,36 +626,27 @@ local log = require "resources.functions.log".ring_group
|
|||
app_data = app_data:gsub("%]", "}");
|
||||
end
|
||||
freeswitch.consoleLog("NOTICE", "[ring group] app_data: "..app_data.."\n");
|
||||
-- log.noticef("bridge begin: originate_disposition:%s answered:%s ready:%s bridged:%s", session:getVariable("originate_disposition"), session:answered() and "true" or "false", session:ready() and "true" or "false", session:bridged() and "true" or "false")
|
||||
session:execute("bridge", app_data);
|
||||
-- log.noticef("bridge done: originate_disposition:%s answered:%s ready:%s bridged:%s", session:getVariable("originate_disposition"), session:answered() and "true" or "false", session:ready() and "true" or "false", session:bridged() and "true" or "false")
|
||||
end
|
||||
|
||||
--timeout destination
|
||||
if (app_data ~= nil) then
|
||||
if ring_group_strategy == "enterprise"
|
||||
and ( true
|
||||
--- I see 2 errors here `failure` and `PICKED_OFF`
|
||||
--- but they be more. I think check `answered` is enough.
|
||||
-- or session:getVariable("originate_disposition") == "failure"
|
||||
-- or session:getVariable("originate_disposition") == "PICKED_OFF"
|
||||
)
|
||||
and session:answered() then
|
||||
-- for enterprise calls when intercept we get "failure" but session answered
|
||||
return
|
||||
end
|
||||
|
||||
if (session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
|
||||
if session:ready() and (
|
||||
session:getVariable("originate_disposition") == "ALLOTTED_TIMEOUT"
|
||||
or session:getVariable("originate_disposition") == "NO_ANSWER"
|
||||
or session:getVariable("originate_disposition") == "NO_USER_RESPONSE"
|
||||
or session:getVariable("originate_disposition") == "USER_NOT_REGISTERED"
|
||||
or session:getVariable("originate_disposition") == "NORMAL_TEMPORARY_FAILURE"
|
||||
or session:getVariable("originate_disposition") == "NO_ROUTE_DESTINATION"
|
||||
or session:getVariable("originate_disposition") == "USER_BUSY"
|
||||
or session:getVariable("originate_disposition") == "failure") then
|
||||
--send missed call notification
|
||||
missed();
|
||||
--execute the time out action
|
||||
session:execute(ring_group_timeout_app, ring_group_timeout_data);
|
||||
or session:getVariable("originate_disposition") == "failure"
|
||||
) then
|
||||
--send missed call notification
|
||||
missed();
|
||||
--execute the time out action
|
||||
session:execute(ring_group_timeout_app, ring_group_timeout_data);
|
||||
end
|
||||
else
|
||||
if (ring_group_timeout_app ~= nil) then
|
||||
|
|
|
|||
Loading…
Reference in New Issue