Add additional protection to prevent intercepting calls that have already been answered.

This commit is contained in:
Mark Crane 2015-02-21 20:33:23 +00:00
parent 7887e4ddd3
commit bf8247d332
2 changed files with 23 additions and 19 deletions

View File

@ -149,6 +149,7 @@ end
--intercept a call that is ringing --intercept a call that is ringing
if (uuid) then if (uuid) then
if (session:getVariable("billmsec") == nil) then
if (hostname == call_hostname) then if (hostname == call_hostname) then
session:execute("intercept", uuid); session:execute("intercept", uuid);
else else
@ -161,6 +162,7 @@ end
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n"); freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
end end
end end
end
--notes --notes
--originate a call --originate a call

View File

@ -194,6 +194,7 @@
--intercept a call that is ringing --intercept a call that is ringing
if (uuid ~= nil) then if (uuid ~= nil) then
if (session:getVariable("billmsec") == nil) then
if (hostname == call_hostname) then if (hostname == call_hostname) then
session:execute("intercept", uuid); session:execute("intercept", uuid);
else else
@ -205,6 +206,7 @@
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n"); freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
end end
end end
end
--notes --notes
--originate a call --originate a call