diff --git a/app/scripts/resources/scripts/app/follow_me/index.lua b/app/scripts/resources/scripts/app/follow_me/index.lua index a43d46587a..4ade174cf2 100644 --- a/app/scripts/resources/scripts/app/follow_me/index.lua +++ b/app/scripts/resources/scripts/app/follow_me/index.lua @@ -50,7 +50,11 @@ call_direction = "local"; end +--connect to the database + local dbh = Database.new('system'); + --set the strategy + local settings = Settings.new(dbh, domain_name, domain_uuid); local follow_me_strategy = settings:get('follow_me', 'strategy', 'text') or 'enterprise'; --simultaneous, enterprise --include json library @@ -90,9 +94,6 @@ return count, destination_number, toll_allow; end ---connect to the database - local dbh = Database.new('system'); - --get the forward busy --cmd = "user_data ".. destination_number .."@"..domain_name.." var forward_busy_enabled="; --forward_busy_enabled = trim(api:executeString(cmd));