Ensure that call forward doesn't update follow me if follow_me_uuid is an empty string.

This commit is contained in:
Mark Crane
2014-11-28 20:40:59 +00:00
parent fb02f54a6a
commit cbe9e9f619

View File

@@ -223,14 +223,16 @@
--disable the follow me
if (session:ready() and enabled == "true" and follow_me_uuid ~= nil) then
sql = "update v_follow_me set ";
sql = sql .. "follow_me_enabled = 'false' ";
sql = sql .. "where domain_uuid = '"..domain_uuid.."' ";
sql = sql .. "and follow_me_uuid = '"..follow_me_uuid.."' ";
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[call_forward] "..sql.."\n");
if (string.len(follow_me_uuid) > 0) then
sql = "update v_follow_me set ";
sql = sql .. "follow_me_enabled = 'false' ";
sql = sql .. "where domain_uuid = '"..domain_uuid.."' ";
sql = sql .. "and follow_me_uuid = '"..follow_me_uuid.."' ";
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[call_forward] "..sql.."\n");
end
dbh:query(sql);
end
dbh:query(sql);
end
--check the destination