Fix. Call intercept - a scenario where an outgoing call can be intercepted

This is same changes as in #1209.
This commit is contained in:
Alexey Melnichuk
2015-11-12 14:11:05 +03:00
parent cd6a52b1af
commit 3de12d6d1d

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.."' ";