mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-09 18:18:53 +00:00
Add additional protection to prevent intercepting calls that have already been answered.
This commit is contained in:
@@ -149,16 +149,18 @@ end
|
|||||||
|
|
||||||
--intercept a call that is ringing
|
--intercept a call that is ringing
|
||||||
if (uuid) then
|
if (uuid) then
|
||||||
if (hostname == call_hostname) then
|
if (session:getVariable("billmsec") == nil) then
|
||||||
session:execute("intercept", uuid);
|
if (hostname == call_hostname) then
|
||||||
else
|
session:execute("intercept", uuid);
|
||||||
session:execute("export", "sip_h_X-intercept_uuid="..uuid);
|
else
|
||||||
session:execute("export", "sip_h_X-domain_uuid="..domain_uuid);
|
session:execute("export", "sip_h_X-intercept_uuid="..uuid);
|
||||||
session:execute("export", "sip_h_X-domain_name="..domain_name);
|
session:execute("export", "sip_h_X-domain_uuid="..domain_uuid);
|
||||||
session:execute("export", "sip_h_X-callee_num="..callee_num);
|
session:execute("export", "sip_h_X-domain_name="..domain_name);
|
||||||
port = freeswitch.getGlobalVariable(sofia_profile_name.."_sip_port");
|
session:execute("export", "sip_h_X-callee_num="..callee_num);
|
||||||
session:execute("bridge", "sofia/"..sofia_profile_name.."/**@"..call_hostname..":"..port);
|
port = freeswitch.getGlobalVariable(sofia_profile_name.."_sip_port");
|
||||||
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
|
session:execute("bridge", "sofia/"..sofia_profile_name.."/**@"..call_hostname..":"..port);
|
||||||
|
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -194,15 +194,17 @@
|
|||||||
|
|
||||||
--intercept a call that is ringing
|
--intercept a call that is ringing
|
||||||
if (uuid ~= nil) then
|
if (uuid ~= nil) then
|
||||||
if (hostname == call_hostname) then
|
if (session:getVariable("billmsec") == nil) then
|
||||||
session:execute("intercept", uuid);
|
if (hostname == call_hostname) then
|
||||||
else
|
session:execute("intercept", uuid);
|
||||||
session:execute("export", "sip_h_X-intercept_uuid="..uuid);
|
else
|
||||||
session:execute("export", "sip_h_X-domain_uuid="..domain_uuid);
|
session:execute("export", "sip_h_X-intercept_uuid="..uuid);
|
||||||
session:execute("export", "sip_h_X-domain_name="..domain_name);
|
session:execute("export", "sip_h_X-domain_uuid="..domain_uuid);
|
||||||
port = freeswitch.getGlobalVariable(sofia_profile_name.."_sip_port");
|
session:execute("export", "sip_h_X-domain_name="..domain_name);
|
||||||
session:execute("bridge", "sofia/"..sofia_profile_name.."/*8@"..call_hostname..":"..port);
|
port = freeswitch.getGlobalVariable(sofia_profile_name.."_sip_port");
|
||||||
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
|
session:execute("bridge", "sofia/"..sofia_profile_name.."/*8@"..call_hostname..":"..port);
|
||||||
|
freeswitch.consoleLog("NOTICE", "Send call to other host.... \n");
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user