summaryrefslogtreecommitdiff
path: root/misc/freeswitch
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-07 10:17:41 +0200
committerPeter Kozak <spag@golwen.net>2013-06-07 10:17:41 +0200
commit313eef1e54b0858ab50a81e7929761744a262c0c (patch)
tree79a5edd1c39c7e6fc90ebb422ff65df0777180c9 /misc/freeswitch
parentb3a9f757bf86533c64f6ced8cae5901e2d1aec96 (diff)
pager config generator added
Diffstat (limited to 'misc/freeswitch')
-rw-r--r--misc/freeswitch/scripts/configuration.lua25
1 files changed, 23 insertions, 2 deletions
diff --git a/misc/freeswitch/scripts/configuration.lua b/misc/freeswitch/scripts/configuration.lua
index 16dbed7..2486565 100644
--- a/misc/freeswitch/scripts/configuration.lua
+++ b/misc/freeswitch/scripts/configuration.lua
@@ -194,8 +194,8 @@ function conf_conference(database)
local conf_name = params:getHeader('conf_name');
local profile_name = params:getHeader('profile_name');
- if conf_name then
- require 'common.conference'
+ if conf_name:find('^conference%d+') then
+ require 'common.conference';
conference = common.conference.Conference:new{log=log, database=database}:find_by_id(common.str.to_i(conf_name));
if conference then
log:debug('CONFIG_CONFERENCE ', conf_name, ' name: ', conference.record.name, ', profile: ', profile_name);
@@ -211,6 +211,27 @@ function conf_conference(database)
else
log:error('CONFIG_CONFERENCE ', conf_name, ' - conference not found');
end
+ elseif conf_name:find('^pager%d+') then
+ local parameters = {
+ ['moh-sound'] = '',
+ ['caller-controls'] = "speaker",
+ ['moderator-controls'] = "moderator",
+ ['comfort-noise'] = false,
+ }
+
+ require 'common.pager';
+ pager = common.pager.Pager:new{log=log, database=database}:find_by_id(common.str.to_i(conf_name));
+ if pager then
+ log:debug('CONFIG_PAGER ', conf_name, ', profile: ', profile_name);
+ profiles = xml:element{
+ 'profiles',
+ xml:element{
+ 'profile',
+ name = profile_name,
+ xml:from_hash('param', parameters, 'name', 'value'),
+ },
+ };
+ end
else
log:notice('CONFIG_CONFERENCE - no conference name');
end