Add additional protection to prevent intercepting calls that have already been answered.
This commit is contained in:
parent
7887e4ddd3
commit
bf8247d332
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue