From 706d34820b236d28e7dd12ba90dfc1dd585d698f Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 13:54:03 +0100 Subject: read event_manager configuration from database --- misc/freeswitch/scripts/event/event.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'misc/freeswitch/scripts/event') diff --git a/misc/freeswitch/scripts/event/event.lua b/misc/freeswitch/scripts/event/event.lua index 8e67bc9..c57b32a 100644 --- a/misc/freeswitch/scripts/event/event.lua +++ b/misc/freeswitch/scripts/event/event.lua @@ -28,10 +28,8 @@ end function EventManager.load_event_modules(self) - local CONFIG_FILE_NAME = '/opt/freeswitch/scripts/ini/events.ini'; - - require 'common.configuration_file' - self.config = common.configuration_file.get(CONFIG_FILE_NAME); + require 'common.configuration_table' + self.config = common.configuration_table.get(self.database, 'events'); return self.config.modules; end @@ -40,7 +38,7 @@ end function EventManager.load_event_handlers(self, event_modules) event_handlers = {} - for index, event_module_name in ipairs(event_modules) do + for event_module_name, index in pairs(event_modules) do event_module = require('event.' .. event_module_name); if event_module then self.log:info('[event] EVENT_MANAGER - loading handler module: ', event_module_name); -- cgit v1.2.3 From fb686a23421652f938c1ac5b6368d6f5918a15f5 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 13:54:33 +0100 Subject: read perimeter configuration from database --- misc/freeswitch/scripts/event/perimeter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc/freeswitch/scripts/event') diff --git a/misc/freeswitch/scripts/event/perimeter.lua b/misc/freeswitch/scripts/event/perimeter.lua index 3babba6..86c50d4 100644 --- a/misc/freeswitch/scripts/event/perimeter.lua +++ b/misc/freeswitch/scripts/event/perimeter.lua @@ -40,7 +40,8 @@ end function Perimeter.init(self) - local config = common.configuration_file.get('/opt/freeswitch/scripts/ini/perimeter.ini'); + require 'common.configuration_table'; + local config = common.configuration_table.get(self.database, 'perimeter'); if config and config.general then self.malicious_contact_count = tonumber(config.general.malicious_contact_count) or MALICIOUS_CONTACT_COUNT; self.malicious_contact_time_span = tonumber(config.general.malicious_contact_time_span) or MALICIOUS_CONTACT_TIME_SPAN; -- cgit v1.2.3 From 8744de13516c3fc2fbf2843e85aff08707f50de1 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Fri, 18 Jan 2013 12:54:45 +0100 Subject: adjust copyright date for 2013 --- misc/freeswitch/scripts/event/call_history_save.lua | 2 +- misc/freeswitch/scripts/event/cdr_save.lua | 2 +- misc/freeswitch/scripts/event/event.lua | 2 +- misc/freeswitch/scripts/event/perimeter.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'misc/freeswitch/scripts/event') diff --git a/misc/freeswitch/scripts/event/call_history_save.lua b/misc/freeswitch/scripts/event/call_history_save.lua index 057ca16..ba7a8f6 100644 --- a/misc/freeswitch/scripts/event/call_history_save.lua +++ b/misc/freeswitch/scripts/event/call_history_save.lua @@ -1,5 +1,5 @@ -- Gemeinschaft 5 module: call_history event handler class --- (c) AMOOMA GmbH 2012 +-- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall) diff --git a/misc/freeswitch/scripts/event/cdr_save.lua b/misc/freeswitch/scripts/event/cdr_save.lua index ed53aa3..e7ac64a 100644 --- a/misc/freeswitch/scripts/event/cdr_save.lua +++ b/misc/freeswitch/scripts/event/cdr_save.lua @@ -1,5 +1,5 @@ -- Gemeinschaft 5 module: cdr event handler class --- (c) AMOOMA GmbH 2012 +-- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall) diff --git a/misc/freeswitch/scripts/event/event.lua b/misc/freeswitch/scripts/event/event.lua index c57b32a..08d8bfe 100644 --- a/misc/freeswitch/scripts/event/event.lua +++ b/misc/freeswitch/scripts/event/event.lua @@ -1,5 +1,5 @@ -- Gemeinschaft 5 module: event manager class --- (c) AMOOMA GmbH 2012 +-- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall) diff --git a/misc/freeswitch/scripts/event/perimeter.lua b/misc/freeswitch/scripts/event/perimeter.lua index 86c50d4..5bbb032 100644 --- a/misc/freeswitch/scripts/event/perimeter.lua +++ b/misc/freeswitch/scripts/event/perimeter.lua @@ -1,5 +1,5 @@ -- Gemeinschaft 5 module: cdr event handler class --- (c) AMOOMA GmbH 2012 +-- (c) AMOOMA GmbH 2012-2013 -- module(...,package.seeall) -- cgit v1.2.3