diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-02-05 19:11:33 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-02-05 19:11:33 +0000 |
commit | fe6fc6e3b0395819fe905851324823c1b52c1b6a (patch) | |
tree | fce9f945007842b1ac74b7462237c541fee9b2f9 /apps/app_confbridge.c | |
parent | 128d7abb05328ba4b7d6fdde17fd7f3873fa587b (diff) |
app_page and app_confbridge: Fix custom announcement on entering conference.
The Page and ConfBridge custom announcement did not play when users
entered the conference.
* Fix the CONFBRIDGE(user,announcement) file not getting played. The code
to do this got removed accidentally when the ConfBridge code was
restructured to be more state machine like.
* Fixed play_prompt_to_user() doxygen comments.
* Fixed the Page A(x) and n options for the caller. The caller never
played the announcement file and totally ignored the n option. The code
to do this was lost when the application was converted to use ConfBridge.
* Factored out setup_profile_bridge(), setup_profile_paged(), and
setup_profile_caller() routines to setup ConfBridge profiles. Made each
profile setup routine use the default template if one has not already been
setup by dialplan.
(closes issue ASTERISK-20990)
Reported by: Jeremy Kister
Tested by: rmudgett
........
Merged revisions 380894 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_confbridge.c')
-rw-r--r-- | apps/app_confbridge.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index 8a4fdc329..65498bd90 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -748,9 +748,8 @@ static int announce_user_count(struct conference_bridge *conference_bridge, stru /*! * \brief Play back an audio file to a channel * - * \param conference_bridge Conference bridge they are in - * \param chan Channel to play audio prompt to - * \param file Prompt to play + * \param cbu User to play audio prompt to + * \param filename Prompt to play * * \return Returns 0 on success, -1 if the user hung up * \note Generally this should be called when the conference is unlocked to avoid blocking @@ -1216,6 +1215,15 @@ static struct conference_bridge *join_conference_bridge(const char *name, struct ao2_unlock(conference_bridge); + /* If an announcement is to be played play it */ + if (!ast_strlen_zero(conference_bridge_user->u_profile.announcement)) { + if (play_prompt_to_user(conference_bridge_user, + conference_bridge_user->u_profile.announcement)) { + leave_conference(conference_bridge_user); + return NULL; + } + } + /* Announce number of users if need be */ if (ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_ANNOUNCEUSERCOUNT)) { if (announce_user_count(conference_bridge, conference_bridge_user)) { @@ -1535,7 +1543,6 @@ static int confbridge_exec(struct ast_channel *chan, const char *data) if (args.argc > 2 && !ast_strlen_zero(args.u_profile_name)) { u_profile_name = args.u_profile_name; } - if (!conf_find_user_profile(chan, u_profile_name, &conference_bridge_user.u_profile)) { ast_log(LOG_WARNING, "Conference user profile %s does not exist\n", u_profile_name); res = -1; |