From f5fda0eb74e4653282a2f5b25aa187c3ad16fe47 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Sat, 10 Mar 2012 20:06:46 +0000 Subject: [PATCH] Transition app_page to using app_confbridge internally for the conference bridge portion of paging. This also adds a new 'announcement' option to ConfBridge user profiles. Review: https://reviewboard.asterisk.org/r/1754/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358730 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- CHANGES | 2 + apps/app_confbridge.c | 11 ++++ apps/app_page.c | 91 +++++++++++++++++++--------- apps/confbridge/conf_config_parser.c | 5 ++ apps/confbridge/include/confbridge.h | 1 + configs/confbridge.conf.sample | 1 + include/asterisk/dial.h | 13 ++++ main/dial.c | 11 ++++ 8 files changed, 106 insertions(+), 29 deletions(-) diff --git a/CHANGES b/CHANGES index 10c179fba9..dccfb5cf27 100644 --- a/CHANGES +++ b/CHANGES @@ -39,6 +39,8 @@ ConfBridge occurs to be overriden using sound_participants_unmuted and sound_participants_muted. * Added menu action participant_count. This will playback the number of current participants in a conference. + * Added announcement configuration option to user profile. If set the sound file will + be played to the user, and only the user, upon joining the conference bridge. Voicemail ------------------ diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index b5b27ed2fe..89c4354b32 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -997,6 +997,17 @@ static struct conference_bridge *join_conference_bridge(const char *name, struct ast_devstate_changed(AST_DEVICE_INUSE, "confbridge:%s", conference_bridge->name); } + /* If an announcement is to be played play it */ + if (!ast_strlen_zero(conference_bridge_user->u_profile.announcement)) { + if (play_prompt_to_channel(conference_bridge, + conference_bridge_user->chan, + conference_bridge_user->u_profile.announcement)) { + ao2_unlock(conference_bridge); + leave_conference_bridge(conference_bridge, conference_bridge_user); + return NULL; + } + } + /* If the caller is a marked user or is waiting for a marked user to enter pass 'em off, otherwise pass them off to do regular joining stuff */ if (ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_MARKEDUSER | USER_OPT_WAITMARKED)) { if (post_join_marked(conference_bridge, conference_bridge_user)) { diff --git a/apps/app_page.c b/apps/app_page.c index d96b4b766c..f9170d43a6 100644 --- a/apps/app_page.c +++ b/apps/app_page.c @@ -26,8 +26,7 @@ */ /*** MODULEINFO - dahdi - app_meetme + app_confbridge core ***/ @@ -76,7 +75,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Quiet, do not play beep to caller