From 31a039257709f608a074b2e8cf6265df57bf869b Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Thu, 12 Nov 2015 14:11:05 +0300 Subject: [PATCH] Fix. Call intercept - a scenario where an outgoing call can be intercepted This is same changes as in #1209. --- resources/install/scripts/intercept.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/install/scripts/intercept.lua b/resources/install/scripts/intercept.lua index ca9af9d38b..326d93b985 100644 --- a/resources/install/scripts/intercept.lua +++ b/resources/install/scripts/intercept.lua @@ -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.."' ";