Merge pull request #1237 from moteus/intercept_outbound

Fix. Call intercept - a scenario where an outgoing call can be intercepted
This commit is contained in:
FusionPBX
2015-11-12 08:31:55 -07:00

View File

@@ -254,9 +254,9 @@
-- next check should prevent pickup call from extension
-- e.g. if extension 100 dial some cell phone and some one else dial *8
-- he can pickup this call.
-- if not extension then
-- sql = sql .. "AND direction = 'outbound' ";
-- end
if not extension then
sql = sql .. "AND direction = 'outbound' ";
end
sql = sql .. "AND (1<>1 ";
for key,extension in pairs(extensions) do
sql = sql .. "OR presence_id = '"..extension.."@"..domain_name.."' ";