Account for single tenant on the intercept.lua

This commit is contained in:
Mark Crane
2012-12-05 09:08:36 +00:00
parent a049b10cf2
commit ba1324b95b

View File

@@ -99,7 +99,9 @@ if ( session:ready() ) then
if (extension) then
sql = sql .. "and presence_id = '"..extension.."@"..domain_name.."' ";
else
sql = sql .. "and context = '"..domain_name.."' ";
if (domain_count > 1) then
sql = sql .. "and context = '"..domain_name.."' ";
end
end
if (debug["sql"]) then
freeswitch.consoleLog("NOTICE", "sql "..sql.."\n");