From 44059b1cb8348c2ee24e056f81c3380abd55096d Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 10 Jan 2013 14:22:49 +0100 Subject: read conference controls from database --- .../scripts/configuration/freeswitch_xml.lua | 42 ++++++++++------------ 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'misc/freeswitch/scripts/configuration') diff --git a/misc/freeswitch/scripts/configuration/freeswitch_xml.lua b/misc/freeswitch/scripts/configuration/freeswitch_xml.lua index 65e7998..09472bf 100644 --- a/misc/freeswitch/scripts/configuration/freeswitch_xml.lua +++ b/misc/freeswitch/scripts/configuration/freeswitch_xml.lua @@ -252,6 +252,20 @@ function FreeSwitchXml.conference(self, profiles_xml, speaker, moderator) profiles_xml = { "" } end + local speaker_xml = {} + if speaker then + for name, value in pairs(speaker) do + speaker_xml[#speaker_xml+1] = self:to_tag{ tag_name = 'control', action = name, digits = value }; + end + end + + local moderator_xml = {} + if moderator then + for name, value in pairs(speaker) do + moderator_xml[#moderator_xml+1] = self:to_tag{ tag_name = 'control', action = name, digits = value }; + end + end + local xml_string = [[
@@ -260,32 +274,12 @@ function FreeSwitchXml.conference(self, profiles_xml, speaker, moderator) - - - - - - - - - - - - +]] .. table.concat(speaker_xml, "\n") .. [[ + - - - - - - - - - - - - +]] .. table.concat(moderator_xml, "\n") .. [[ + -- cgit v1.2.3