From 08cbbc86ba24945ef8cd466dd090820835b111ff Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Wed, 4 Sep 2019 11:35:05 -0400 Subject: [PATCH] Update follow_me.lua (#4491) --- resources/install/scripts/follow_me.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/install/scripts/follow_me.lua b/resources/install/scripts/follow_me.lua index bafb80cc38..ec8a71b7e2 100644 --- a/resources/install/scripts/follow_me.lua +++ b/resources/install/scripts/follow_me.lua @@ -64,7 +64,7 @@ local dbh = Database.new('system'); --determine whether to update the dial string - local sql = "select extension, number_alias, accountcode, follow_me_uuid "; + local sql = "select extension, number_alias, accountcode, follow_me_uuid, follow_me_enabled "; sql = sql .. "from v_extensions "; sql = sql .. "where domain_uuid = :domain_uuid "; sql = sql .. "and extension_uuid = :extension_uuid "; @@ -80,6 +80,7 @@ local number_alias = row.number_alias or ''; local accountcode = row.accountcode; local follow_me_uuid = row.follow_me_uuid; + local enabled = row.follow_me_enabled; --determine whether to update the dial string sql = "select follow_me_enabled, cid_name_prefix, cid_number_prefix, dial_string " @@ -94,7 +95,7 @@ row = dbh:first_row(sql, params) if not row then return end - local enabled = row.follow_me_enabled; + --local enabled = row.follow_me_enabled; local cid_name_prefix = row.cid_name_prefix; local cid_number_prefix = row.cid_number_prefix; local dial_string = row.dial_string; @@ -122,7 +123,7 @@ end --enable or disable follow me - sql = "update v_follow_me set "; + sql = "update v_extensions set "; if (enabled == "true") then sql = sql .. "follow_me_enabled = 'false' "; else