summaryrefslogtreecommitdiff
path: root/apps/confbridge/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-12-13 21:28:15 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-12-13 21:28:15 +0000
commitb17f7cab952f61ce35bc62d227103ca6e8a94980 (patch)
tree73841c6f56ea5fac5c3f519238ef1d6c7167218d /apps/confbridge/include
parent5cf8a1f2e502f4b50bc0f2a8f955798ba3e73275 (diff)
confbridge: Fix MOH on simultaneous user entry to a new conference.
When two users entered a new conference simultaneously, one of the callers hears MOH. This happened if two unmarked users entered simultaneously and also if a waitmarked and a marked user entered simultaneously. * Created a confbridge internal MOH API to eliminate the inlined MOH handling code. Note that the conference mixing bridge needs to be locked when actually starting/stopping MOH because there is a small window between the conference join unsuspend MOH and actually joining the mixing bridge. * Created the concept of suspended MOH so it can be interrupted while conference join announcements to the user and DTMF features can operate. * Suspend any MOH until the user is about to actually join the mixing bridge of the conference. This way any pre-join file playback does not need to worry about MOH. * Made post-join actions only play deferred entry announcement files. Changing the user/conference state during that time is not protected or controlled by the state machine. (closes issue ASTERISK-20606) Reported by: Eugenia Belova Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/2232/ ........ Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/confbridge/include')
-rw-r--r--apps/confbridge/include/confbridge.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h
index 0891f5d4e..059262065 100644
--- a/apps/confbridge/include/confbridge.h
+++ b/apps/confbridge/include/confbridge.h
@@ -236,6 +236,7 @@ struct conference_bridge_user {
struct ast_channel *chan; /*!< Asterisk channel participating */
struct ast_bridge_features features; /*!< Bridge features structure */
struct ast_bridge_tech_optimizations tech_args; /*!< Bridge technology optimizations for talk detection */
+ unsigned int suspended_moh; /*!< Count of active suspended MOH actions. */
unsigned int kicked:1; /*!< User has been kicked from the conference */
unsigned int playing_moh:1; /*!< MOH is currently being played to the user */
AST_LIST_HEAD_NOLOCK(, post_join_action) post_join_list; /*!< List of sounds to play after joining */;
@@ -358,6 +359,24 @@ int play_sound_file(struct conference_bridge *conference_bridge, const char *fil
*/
void conf_ended(struct conference_bridge *conference_bridge);
+/*!
+ * \brief Stop MOH for the conference user.
+ *
+ * \param user Conference user to stop MOH on.
+ *
+ * \return Nothing
+ */
+void conf_moh_stop(struct conference_bridge_user *user);
+
+/*!
+ * \brief Start MOH for the conference user.
+ *
+ * \param user Conference user to start MOH on.
+ *
+ * \return Nothing
+ */
+void conf_moh_start(struct conference_bridge_user *user);
+
/*! \brief Attempt to mute/play MOH to the only user in the conference if they require it
* \param conference_bridge A conference bridge containing a single user
*/