Fix a bug with ring group where when sending the call from an IVR Menu where answer was called then the ring group timeout was not working. Now using last_bridge_hangup_cause to know whether the call was answered already or whether to send the call to the timeout destination.

This commit is contained in:
Mark Crane
2012-10-18 19:46:38 +00:00
parent 196c987f74
commit 5edcafef1a

View File

@@ -93,7 +93,9 @@
session:execute("set", "hangup_after_bridge=true");
session:execute("set", "continue_on_fail=true");
session:execute("bridge", app_data);
if (not session:answered()) then
if (session:getVariable("last_bridge_hangup_cause") == "NORMAL_CLEARING") then
--ring group was answered
else
session:execute(ring_group_timeout_app, ring_group_timeout_data);
end
end