summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/event
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/event')
-rw-r--r--misc/freeswitch/scripts/event/call_history_save.lua2
-rw-r--r--misc/freeswitch/scripts/event/cdr_save.lua2
-rw-r--r--misc/freeswitch/scripts/event/event.lua10
-rw-r--r--misc/freeswitch/scripts/event/perimeter.lua5
4 files changed, 9 insertions, 10 deletions
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 8e67bc9..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)
@@ -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);
diff --git a/misc/freeswitch/scripts/event/perimeter.lua b/misc/freeswitch/scripts/event/perimeter.lua
index 3babba6..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)
@@ -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;