From a6730e470d6abc0b8763296d0c54875224dc7363 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 28 Feb 2014 17:14:15 +0000 Subject: [PATCH] Add a member count announcement when joining the for conference room with conference center. --- .../scripts/app/conference_center/index.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/resources/install/scripts/app/conference_center/index.lua b/resources/install/scripts/app/conference_center/index.lua index c16bf8076d..0bf25223d3 100644 --- a/resources/install/scripts/app/conference_center/index.lua +++ b/resources/install/scripts/app/conference_center/index.lua @@ -1,6 +1,6 @@ -- conference_center/index.lua -- Part of FusionPBX --- Copyright (C) 2013 Mark J Crane +-- Copyright (C) 2013 - 2014 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -659,6 +659,23 @@ end end + --get the conference member count + cmd = "conference "..meeting_uuid.."-"..domain_name.." list count"; + freeswitch.consoleLog("notice", "[conference center] cmd: ".. cmd .."\n"); + member_count = api:executeString(cmd); + freeswitch.consoleLog("notice", "[conference center] member_count: ".. member_count .."\n"); + + --play member count + if (member_count == "1") then + --there is one other member in this conference + session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-one_other_member_conference.wav"); + else + --say the count + session:execute("say", default_language.." number pronounced "..member_count); + --members in this conference + session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-members_in_conference.wav"); + end + --send the call to the conference cmd = meeting_uuid.."-"..domain_name.."@"..profile.."+flags{".. flags .."}"; session:execute("conference", cmd);