]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
confbridge: announce to the marked users when they join an empty conference
authorAlexei Gradinari <alex2grad@gmail.com>
Fri, 7 Dec 2018 20:22:29 +0000 (15:22 -0500)
committerAlexei Gradinari <alex2grad@gmail.com>
Wed, 12 Dec 2018 17:16:15 +0000 (12:16 -0500)
Currently the file sound_only_person is not played when a marked
user (with announce_only_user=yes) joins an empty conference.

This patch fixes it.

ASTERISK-28201 #close

Change-Id: I85b67687e6b220939c3af8091d83a70a7b174cf4

apps/app_confbridge.c
apps/confbridge/conf_state_empty.c
apps/confbridge/conf_state_inactive.c
apps/confbridge/include/confbridge.h

index ad871e0fe7d70eff94358bd52c753610a30c7e60..33cfbb3e597c0d0159ce490be42667d310969ec4 100644 (file)
@@ -1360,7 +1360,7 @@ int conf_handle_inactive_waitmarked(struct confbridge_user *user)
        return 0;
 }
 
-int conf_handle_only_unmarked(struct confbridge_user *user)
+int conf_handle_only_person(struct confbridge_user *user)
 {
        /* If audio prompts have not been quieted or this prompt quieted play it on out */
        if (!ast_test_flag(&user->u_profile, USER_OPT_QUIET | USER_OPT_NOONLYPERSON)) {
index 285f22abbee75a3631ea2e8719e0c6c12b621b46..d2f4c8d109e52266198c3ade0a982abb2a65f093 100644 (file)
@@ -56,7 +56,7 @@ static void join_unmarked(struct confbridge_user *user)
 {
        conf_add_user_active(user->conference, user);
        conf_handle_first_join(user->conference);
-       conf_add_post_join_action(user, conf_handle_only_unmarked);
+       conf_add_post_join_action(user, conf_handle_only_person);
 
        conf_change_state(user, CONF_STATE_SINGLE);
 }
@@ -73,6 +73,7 @@ static void join_marked(struct confbridge_user *user)
 {
        conf_add_user_marked(user->conference, user);
        conf_handle_first_join(user->conference);
+       conf_add_post_join_action(user, conf_handle_only_person);
 
        conf_change_state(user, CONF_STATE_SINGLE_MARKED);
 }
index bc41e611a969a1ea84e3efafa7f630eef28e4482..b1a4a2ee2a0e2bf1ac8d001ad19a5b1e32e07e68 100644 (file)
@@ -51,7 +51,7 @@ struct confbridge_state *CONF_STATE_INACTIVE = &STATE_INACTIVE;
 static void join_unmarked(struct confbridge_user *user)
 {
        conf_add_user_active(user->conference, user);
-       conf_add_post_join_action(user, conf_handle_only_unmarked);
+       conf_add_post_join_action(user, conf_handle_only_person);
 
        conf_change_state(user, CONF_STATE_SINGLE);
 }
index ac403d890ff1357cefdcb84fdf6c259b4cd76ebb..4b8249f414696e391d5837fa6ba06c1018af9167 100644 (file)
@@ -490,13 +490,11 @@ void conf_handle_first_join(struct confbridge_conference *conference);
  */
 int conf_handle_inactive_waitmarked(struct confbridge_user *user);
 
-/*! \brief Handle actions whenever an unmarked user joins an inactive conference
- * \note These actions seem like they could apply just as well to a marked user
- * and possibly be made to happen any time transitioning to a single state.
+/*! \brief Handle actions whenever an user joins an empty conference
  *
- * \param user The unmarked user
+ * \param user The user
  */
-int conf_handle_only_unmarked(struct confbridge_user *user);
+int conf_handle_only_person(struct confbridge_user *user);
 
 /*! \brief Handle when a conference moves to having more than one active participant
  * \param conference The conference bridge with more than one active participant