From cac9ea18b24837f3e6835c3db6273ce78a1c0747 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 31 May 2013 20:53:16 +0000 Subject: [PATCH] Fix the conference center member type so that it can mute participants when it is set to true. --- .../scripts/app/conference_center/index.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/includes/install/scripts/app/conference_center/index.lua b/includes/install/scripts/app/conference_center/index.lua index afc860780c..054e68f3c4 100644 --- a/includes/install/scripts/app/conference_center/index.lua +++ b/includes/install/scripts/app/conference_center/index.lua @@ -29,6 +29,9 @@ max_tries = 3; digit_timeout = 5000; +--debug + debug["sql"] = true; + --connect to the database dofile(scripts_dir.."/resources/functions/database_handle.lua"); dbh = database_handle('system'); @@ -355,7 +358,7 @@ --context = session:getVariable("context"); chan_name = session:getVariable("chan_name"); - --get the pin number + --define the function get_pin_number function get_pin_number(domain_uuid) --if the pin number is provided then require it if (not pin_number) then @@ -421,7 +424,8 @@ profile = string.lower(row["profile"]); max_members = row["max_members"]; wait_mod = row["wait_mod"]; - member_type = row["member_type"]; + moderator_pin = row["moderator_pin"]; + participant_pin = row["participant_pin"]; announce = row["announce"]; mute = row["mute"]; sounds = row["sounds"]; @@ -434,6 +438,14 @@ freeswitch.consoleLog("INFO","conference_room_uuid: " .. conference_room_uuid .. "\n"); end + --set the member type + if (pin_number == moderator_pin) then + member_type = "moderator"; + end + if (pin_number == participant_pin) then + member_type = "participant"; + end + --close the database connection dbh:release();