2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 2011, Digium, Inc.
6 * David Vossel <dvossel@digium.com>
7 * Joshua Colp <jcolp@digium.com>
9 * See http://www.asterisk.org for more information about
10 * the Asterisk project. Please do not directly contact
11 * any of the maintainers of this project for assistance;
12 * the project provides a web site, mailing lists and IRC
13 * channels for your use.
15 * This program is free software, distributed under the terms of
16 * the GNU General Public License Version 2. See the LICENSE file
17 * at the top of the source tree.
25 #include "asterisk/app.h"
26 #include "asterisk/logger.h"
27 #include "asterisk/linkedlists.h"
28 #include "asterisk/channel.h"
29 #include "asterisk/bridge.h"
30 #include "asterisk/bridge_features.h"
31 #include "asterisk/stasis_bridges.h"
32 #include "conf_state.h"
34 /*! Maximum length of a conference bridge name */
35 #define MAX_CONF_NAME AST_MAX_EXTENSION
36 /*! Maximum length of a conference pin */
38 /*! Maximum length of bridge/user/menu profile names */
39 #define MAX_PROFILE_NAME 128
41 #define DEFAULT_USER_PROFILE "default_user"
42 #define DEFAULT_BRIDGE_PROFILE "default_bridge"
43 #define DEFAULT_MENU_PROFILE "default_menu"
45 /*! Default minimum average magnitude threshold to determine talking by the DSP. */
46 #define DEFAULT_TALKING_THRESHOLD 160
48 /*! Default time in ms of silence necessary to declare talking stopped by the bridge. */
49 #define DEFAULT_SILENCE_THRESHOLD 2500
51 enum user_profile_flags {
52 USER_OPT_ADMIN = (1 << 0), /*!< Set if the caller is an administrator */
53 USER_OPT_NOONLYPERSON = (1 << 1), /*!< Set if the "you are currently the only person in this conference" sound file should not be played */
54 USER_OPT_MARKEDUSER = (1 << 2), /*!< Set if the caller is a marked user */
55 USER_OPT_STARTMUTED = (1 << 3), /*!< Set if the caller should be initially set muted */
56 USER_OPT_MUSICONHOLD = (1 << 4), /*!< Set if music on hold should be played if nobody else is in the conference bridge */
57 USER_OPT_QUIET = (1 << 5), /*!< Set if no audio prompts should be played */
58 USER_OPT_ANNOUNCEUSERCOUNT = (1 << 6), /*!< Set if the number of users should be announced to the caller */
59 USER_OPT_WAITMARKED = (1 << 7), /*!< Set if the user must wait for a marked user before starting */
60 USER_OPT_ENDMARKED = (1 << 8), /*!< Set if the user should be kicked after the last Marked user exits */
61 USER_OPT_DENOISE = (1 << 9), /*!< Sets if denoise filter should be used on audio before mixing. */
62 USER_OPT_ANNOUNCE_JOIN_LEAVE = (1 << 10), /*!< Sets if the user's name should be recorded and announced on join and leave. */
63 USER_OPT_TALKER_DETECT = (1 << 11), /*!< Sets if start and stop talking events should generated for this user over AMI. */
64 USER_OPT_DROP_SILENCE = (1 << 12), /*!< Sets if silence should be dropped from the mix or not. */
65 USER_OPT_DTMF_PASS = (1 << 13), /*!< Sets if dtmf should be passed into the conference or not */
66 USER_OPT_ANNOUNCEUSERCOUNTALL = (1 << 14), /*!< Sets if the number of users should be announced to everyone. */
67 USER_OPT_JITTERBUFFER = (1 << 15), /*!< Places a jitterbuffer on the user. */
68 USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW = (1 << 16), /*!< modifies ANNOUNCE_JOIN_LEAVE - user reviews the recording before continuing */
69 USER_OPT_SEND_EVENTS = (1 << 17), /*!< Send text message events to users */
70 USER_OPT_ECHO_EVENTS = (1 << 18), /*!< Send events only to the admin(s) */
71 USER_OPT_TEXT_MESSAGING = (1 << 19), /*!< Send text messages to the user */
72 USER_OPT_ANSWER_CHANNEL = (1 << 20), /*!< Sets if the channel should be answered if currently unanswered */
73 USER_OPT_HEAR_OWN_JOIN_SOUND = (1 << 21), /*!< Set if the caller should hear the join sound */
76 enum bridge_profile_flags {
77 BRIDGE_OPT_RECORD_CONFERENCE = (1 << 0), /*!< Set if the conference should be recorded */
78 BRIDGE_OPT_VIDEO_SRC_LAST_MARKED = (1 << 1), /*!< Set if conference should feed video of last marked user to all participants. */
79 BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED = (1 << 2), /*!< Set if conference should feed video of first marked user to all participants. */
80 BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER = (1 << 3), /*!< Set if conference set the video feed to follow the loudest talker. */
81 BRIDGE_OPT_RECORD_FILE_APPEND = (1 << 4), /*!< Set if the record file should be appended to between start/stops. */
82 BRIDGE_OPT_RECORD_FILE_TIMESTAMP = (1 << 5), /*!< Set if the record file should have a timestamp appended */
83 BRIDGE_OPT_BINAURAL_ACTIVE = (1 << 6), /*!< Set if binaural convolution is activated */
84 BRIDGE_OPT_VIDEO_SRC_SFU = (1 << 7), /*!< Selective forwarding unit */
85 BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE = (1 << 8), /*!< The average of all REMB reports is sent to the sender */
86 BRIDGE_OPT_REMB_BEHAVIOR_LOWEST = (1 << 9), /*!< The lowest estimated maximum bitrate is sent to the sender */
87 BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST = (1 << 10), /*!< The highest estimated maximum bitrate is sent to the sender */
88 BRIDGE_OPT_ENABLE_EVENTS = (1 << 11), /*!< Enable sending events to participants */
89 BRIDGE_OPT_REMB_BEHAVIOR_AVERAGE_ALL = (1 << 12), /*!< The average of all REMB reports in the entire bridge is sent to each sender */
90 BRIDGE_OPT_REMB_BEHAVIOR_LOWEST_ALL = (1 << 13), /*!< The lowest estimated maximum bitrate from all receivers is sent to each sender */
91 BRIDGE_OPT_REMB_BEHAVIOR_HIGHEST_ALL = (1 << 14), /*!< The highest estimated maximum bitrate from all receivers is sent to each sender */
92 BRIDGE_OPT_REMB_BEHAVIOR_FORCE = (1 << 15), /*!< Force the REMB estimated bitrate to that specifiec in remb_estimated_bitrate */
95 enum conf_menu_action_id {
96 MENU_ACTION_TOGGLE_MUTE = 1,
98 MENU_ACTION_PLAYBACK_AND_CONTINUE,
99 MENU_ACTION_INCREASE_LISTENING,
100 MENU_ACTION_DECREASE_LISTENING,
101 MENU_ACTION_RESET_LISTENING,
102 MENU_ACTION_RESET_TALKING,
103 MENU_ACTION_INCREASE_TALKING,
104 MENU_ACTION_DECREASE_TALKING,
105 MENU_ACTION_DIALPLAN_EXEC,
106 MENU_ACTION_ADMIN_TOGGLE_LOCK,
107 MENU_ACTION_ADMIN_KICK_LAST,
110 MENU_ACTION_SET_SINGLE_VIDEO_SRC,
111 MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC,
112 MENU_ACTION_PARTICIPANT_COUNT,
113 MENU_ACTION_ADMIN_TOGGLE_MUTE_PARTICIPANTS,
114 MENU_ACTION_TOGGLE_BINAURAL,
117 /*! The conference menu action contains both
118 * the action id that represents the action that
119 * must take place, along with any data associated
120 * with that action. */
121 struct conf_menu_action {
122 enum conf_menu_action_id id;
124 char playback_file[PATH_MAX];
126 char context[AST_MAX_CONTEXT];
127 char exten[AST_MAX_EXTENSION];
131 AST_LIST_ENTRY(conf_menu_action) action;
134 /*! Conference menu entries contain the DTMF sequence
135 * and the list of actions that are associated with that
137 struct conf_menu_entry {
138 /*! the DTMF sequence that triggers the actions */
139 char dtmf[MAXIMUM_DTMF_FEATURE_STRING];
140 /*! The actions associated with this menu entry. */
141 AST_LIST_HEAD_NOLOCK(, conf_menu_action) actions;
142 AST_LIST_ENTRY(conf_menu_entry) entry;
145 /*! Conference menu structure. Contains a list
146 * of DTMF sequences coupled with the actions those
147 * sequences invoke.*/
149 char name[MAX_PROFILE_NAME];
150 AST_LIST_HEAD_NOLOCK(, conf_menu_entry) entries;
153 struct user_profile {
154 char name[MAX_PROFILE_NAME];
157 char announcement[PATH_MAX];
159 unsigned int announce_user_count_all_after;
160 /*! Minimum average magnitude threshold to determine talking by the DSP. */
161 unsigned int talking_threshold;
162 /*! Time in ms of silence necessary to declare talking stopped by the bridge. */
163 unsigned int silence_threshold;
164 /*! The time in ms the user may stay in the confbridge */
165 unsigned int timeout;
169 CONF_SOUND_HAS_JOINED,
175 CONF_SOUND_THERE_ARE,
176 CONF_SOUND_OTHER_IN_PARTY,
177 CONF_SOUND_PLACE_IN_CONF,
178 CONF_SOUND_WAIT_FOR_LEADER,
179 CONF_SOUND_LEADER_HAS_LEFT,
181 CONF_SOUND_INVALID_PIN,
182 CONF_SOUND_ONLY_PERSON,
184 CONF_SOUND_LOCKED_NOW,
185 CONF_SOUND_UNLOCKED_NOW,
186 CONF_SOUND_ERROR_MENU,
189 CONF_SOUND_PARTICIPANTS_MUTED,
190 CONF_SOUND_PARTICIPANTS_UNMUTED,
192 CONF_SOUND_BINAURAL_ON,
193 CONF_SOUND_BINAURAL_OFF,
196 struct bridge_profile_sounds {
197 AST_DECLARE_STRING_FIELDS(
198 AST_STRING_FIELD(hasjoin);
199 AST_STRING_FIELD(hasleft);
200 AST_STRING_FIELD(kicked);
201 AST_STRING_FIELD(muted);
202 AST_STRING_FIELD(unmuted);
203 AST_STRING_FIELD(onlyone);
204 AST_STRING_FIELD(thereare);
205 AST_STRING_FIELD(otherinparty);
206 AST_STRING_FIELD(placeintoconf);
207 AST_STRING_FIELD(waitforleader);
208 AST_STRING_FIELD(leaderhasleft);
209 AST_STRING_FIELD(getpin);
210 AST_STRING_FIELD(invalidpin);
211 AST_STRING_FIELD(onlyperson);
212 AST_STRING_FIELD(locked);
213 AST_STRING_FIELD(lockednow);
214 AST_STRING_FIELD(unlockednow);
215 AST_STRING_FIELD(errormenu);
216 AST_STRING_FIELD(leave);
217 AST_STRING_FIELD(join);
218 AST_STRING_FIELD(participantsmuted);
219 AST_STRING_FIELD(participantsunmuted);
220 AST_STRING_FIELD(begin);
221 AST_STRING_FIELD(binauralon);
222 AST_STRING_FIELD(binauraloff);
226 struct bridge_profile {
227 char name[MAX_PROFILE_NAME];
228 char language[MAX_LANGUAGE]; /*!< Language used for playback_chan */
229 char rec_file[PATH_MAX];
230 char rec_options[128];
231 char rec_command[128];
233 unsigned int max_members; /*!< The maximum number of participants allowed in the conference */
234 unsigned int internal_sample_rate; /*!< The internal sample rate of the bridge. 0 when set to auto adjust mode. */
235 unsigned int maximum_sample_rate; /*!< The maximum sample rate of the bridge. 0 when set to no maximum. */
236 unsigned int mix_interval; /*!< The internal mixing interval used by the bridge. When set to 0 the bridgewill use a default interval. */
237 struct bridge_profile_sounds *sounds;
238 char regcontext[AST_MAX_CONTEXT];
239 unsigned int video_update_discard; /*!< Amount of time after sending a video update request that subsequent requests should be discarded */
240 unsigned int remb_send_interval; /*!< Interval at which a combined REMB frame is sent to video sources */
241 unsigned int remb_estimated_bitrate; /*!< Bitrate sent when BRIDGE_OPT_REMB_BEHAVIOR_FORCE is set */
244 /*! \brief The structure that represents a conference bridge */
245 struct confbridge_conference {
246 char name[MAX_CONF_NAME]; /*!< Name of the conference bridge */
247 struct confbridge_state *state; /*!< Conference state information */
248 struct ast_bridge *bridge; /*!< Bridge structure doing the mixing */
249 struct bridge_profile b_profile; /*!< The Bridge Configuration Profile */
250 unsigned int activeusers; /*!< Number of active users present */
251 unsigned int markedusers; /*!< Number of marked users present */
252 unsigned int waitingusers; /*!< Number of waiting users present */
253 unsigned int locked:1; /*!< Is this conference bridge locked? */
254 unsigned int muted:1; /*!< Is this conference bridge muted? */
255 struct ast_channel *playback_chan; /*!< Channel used for playback into the conference bridge */
256 struct ast_channel *record_chan; /*!< Channel used for recording the conference */
257 struct ast_str *record_filename; /*!< Recording filename. */
258 struct ast_str *orig_rec_file; /*!< Previous b_profile.rec_file. */
259 AST_LIST_HEAD_NOLOCK(, confbridge_user) active_list; /*!< List of users participating in the conference bridge */
260 AST_LIST_HEAD_NOLOCK(, confbridge_user) waiting_list; /*!< List of users waiting to join the conference bridge */
261 struct ast_taskprocessor *playback_queue; /*!< Queue for playing back bridge announcements and managing the announcer channel */
264 extern struct ao2_container *conference_bridges;
266 struct post_join_action {
267 int (*func)(struct confbridge_user *user);
268 AST_LIST_ENTRY(post_join_action) list;
271 /*! \brief The structure that represents a conference bridge user */
272 struct confbridge_user {
273 struct confbridge_conference *conference; /*!< Conference bridge they are participating in */
274 struct bridge_profile b_profile; /*!< The Bridge Configuration Profile */
275 struct user_profile u_profile; /*!< The User Configuration Profile */
276 char menu_name[MAX_PROFILE_NAME]; /*!< The name of the DTMF menu assigned to this user */
277 char name_rec_location[PATH_MAX]; /*!< Location of the User's name recorded file if it exists */
278 struct ast_channel *chan; /*!< Asterisk channel participating */
279 struct ast_bridge_features features; /*!< Bridge features structure */
280 struct ast_bridge_tech_optimizations tech_args; /*!< Bridge technology optimizations for talk detection */
281 unsigned int suspended_moh; /*!< Count of active suspended MOH actions. */
282 unsigned int muted:1; /*!< Has the user requested to be muted? */
283 unsigned int kicked:1; /*!< User has been kicked from the conference */
284 unsigned int playing_moh:1; /*!< MOH is currently being played to the user */
285 unsigned int talking:1; /*!< User is currently talking */
286 AST_LIST_HEAD_NOLOCK(, post_join_action) post_join_list; /*!< List of sounds to play after joining */;
287 AST_LIST_ENTRY(confbridge_user) list; /*!< Linked list information */
290 /*! \brief load confbridge.conf file */
291 int conf_load_config(void);
293 /*! \brief reload confbridge.conf file */
294 int conf_reload_config(void);
296 /*! \brief destroy the information loaded from the confbridge.conf file*/
297 void conf_destroy_config(void);
300 * \brief find a user profile given a user profile's name and store
301 * that profile in result structure.
303 * \param chan channel the user profile is requested for
304 * \param user_profile_name name of the profile requested (optional)
305 * \param result data contained by the user profile will be copied to this struct pointer
307 * \details If user_profile_name is not provided, this function will
308 * check for the presence of a user profile set by the CONFBRIDGE
309 * function on a channel datastore. If that doesn't exist, the
310 * default_user profile is used.
312 * \retval user profile on success
313 * \retval NULL on failure
315 const struct user_profile *conf_find_user_profile(struct ast_channel *chan, const char *user_profile_name, struct user_profile *result);
318 * \brief Find a bridge profile given a bridge profile's name and store
319 * that profile in result structure.
321 * \param chan channel the bridge profile is requested for
322 * \param bridge_profile_name name of the profile requested (optional)
323 * \param result data contained by the bridge profile will be copied to this struct pointer
325 * \details If bridge_profile_name is not provided, this function will
326 * check for the presence of a bridge profile set by the CONFBRIDGE
327 * function on a channel datastore. If that doesn't exist, the
328 * default_bridge profile is used.
330 * \retval bridge profile on success
331 * \retval NULL on failure
333 const struct bridge_profile *conf_find_bridge_profile(struct ast_channel *chan, const char *bridge_profile_name, struct bridge_profile *result);
336 * \brief find a menu profile given a menu profile's name and apply
337 * the menu in DTMF hooks.
339 * \param chan channel the menu profile is requested for
340 * \param user user profile the menu is being applied to
341 * \param menu_profile_name name of the profile requested (optional)
343 * \details If menu_profile_name is not provided, this function will
344 * check for the presence of a menu profile set by the CONFBRIDGE
345 * function on a channel datastore. If that doesn't exist, the
346 * default_menu profile is used.
348 * \retval 0 on success
349 * \retval -1 on failure
351 int conf_set_menu_to_user(struct ast_channel *chan, struct confbridge_user *user, const char *menu_profile_name);
354 * \brief Destroy a bridge profile found by 'conf_find_bridge_profile'
356 void conf_bridge_profile_destroy(struct bridge_profile *b_profile);
359 * \brief copies a bridge profile
360 * \note conf_bridge_profile_destroy must be called on the dst structure
362 void conf_bridge_profile_copy(struct bridge_profile *dst, struct bridge_profile *src);
365 * \brief Finds a menu_entry in a menu structure matched by DTMF sequence.
367 * \note the menu entry found must be destroyed using conf_menu_entry_destroy()
369 * \retval 1 success, entry is found and stored in result
370 * \retval 0 failure, no entry found for given DTMF sequence
372 int conf_find_menu_entry_by_sequence(const char *dtmf_sequence, struct conf_menu *menu, struct conf_menu_entry *result);
375 * \brief Destroys and frees all the actions stored in a menu_entry structure
377 void conf_menu_entry_destroy(struct conf_menu_entry *menu_entry);
380 * \brief Once a DTMF sequence matches a sequence in the user's DTMF menu, this function will get
381 * called to perform the menu action.
383 * \param bridge_channel Bridged channel this is involving
384 * \param user the conference user to perform the action on.
385 * \param menu_entry the menu entry that invoked this callback to occur.
386 * \param menu an AO2 referenced pointer to the entire menu structure the menu_entry
389 * \note The menu_entry is a deep copy of the entry found in the menu structure. This allows
390 * for the menu_entry to be accessed without requiring the menu lock. If the menu must
391 * be accessed, the menu lock must be held. Reference counting of the menu structure is
392 * handled outside of the scope of this function.
397 int conf_handle_dtmf(
398 struct ast_bridge_channel *bridge_channel,
399 struct confbridge_user *user,
400 struct conf_menu_entry *menu_entry,
401 struct conf_menu *menu);
404 /*! \brief Looks to see if sound file is stored in bridge profile sounds, if not
405 * default sound is provided.*/
406 const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds);
408 int func_confbridge_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value);
411 * \brief Play sound file into conference bridge
413 * \param conference The conference bridge to play sound file into
414 * \param filename Sound file to play
419 int play_sound_file(struct confbridge_conference *conference, const char *filename);
422 * \brief Play sound file into conference bridge asynchronously
424 * If the initiator parameter is non-NULL, then the playback will wait for
425 * that initiator channel to get back in the bridge before playing the sound
426 * file. This way, the initiator has no danger of hearing a "clipped" file.
428 * \param conference The conference bridge to play sound file into
429 * \param filename Sound file to play
430 * \param initiator Channel that initiated playback.
435 int async_play_sound_file(struct confbridge_conference *conference, const char *filename,
436 struct ast_channel *initiator);
439 * \brief Indicate the initiator of an async sound file is ready for it to play.
441 * When playing an async sound file, the initiator is typically either out of the bridge
442 * or not in a position to hear the queued announcement. This function lets the announcement
443 * thread know that the initiator is now ready for the sound to play.
445 * If an async announcement was queued and no initiator channel was provided, then this is
448 * \param chan The channel that initiated the async announcement
450 void async_play_sound_ready(struct ast_channel *chan);
452 /*! \brief Callback to be called when the conference has become empty
453 * \param conference The conference bridge
455 void conf_ended(struct confbridge_conference *conference);
458 * \brief Update the actual mute status of the user and set it on the bridge.
460 * \param user User to update the mute status.
462 void conf_update_user_mute(struct confbridge_user *user);
465 * \brief Stop MOH for the conference user.
467 * \param user Conference user to stop MOH on.
469 void conf_moh_stop(struct confbridge_user *user);
472 * \brief Start MOH for the conference user.
474 * \param user Conference user to start MOH on.
476 void conf_moh_start(struct confbridge_user *user);
478 /*! \brief Attempt to mute/play MOH to the only user in the conference if they require it
479 * \param conference A conference bridge containing a single user
481 void conf_mute_only_active(struct confbridge_conference *conference);
483 /*! \brief Callback to execute any time we transition from zero to one active users
484 * \param conference The conference bridge with a single active user joined
486 void conf_handle_first_join(struct confbridge_conference *conference);
488 /*! \brief Handle actions every time a waitmarked user joins w/o a marked user present
489 * \param user The waitmarked user
493 int conf_handle_inactive_waitmarked(struct confbridge_user *user);
495 /*! \brief Handle actions whenever an user joins an empty conference
497 * \param user The user
499 int conf_handle_only_person(struct confbridge_user *user);
501 /*! \brief Handle when a conference moves to having more than one active participant
502 * \param conference The conference bridge with more than one active participant
504 void conf_handle_second_active(struct confbridge_conference *conference);
506 /*! \brief Add a conference bridge user as an unmarked active user of the conference
507 * \param conference The conference bridge to add the user to
508 * \param user The conference bridge user to add to the conference
510 void conf_add_user_active(struct confbridge_conference *conference, struct confbridge_user *user);
512 /*! \brief Add a conference bridge user as a marked active user of the conference
513 * \param conference The conference bridge to add the user to
514 * \param user The conference bridge user to add to the conference
516 void conf_add_user_marked(struct confbridge_conference *conference, struct confbridge_user *user);
518 /*! \brief Add a conference bridge user as an waiting user of the conference
519 * \param conference The conference bridge to add the user to
520 * \param user The conference bridge user to add to the conference
522 void conf_add_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user);
524 /*! \brief Remove a conference bridge user from the unmarked active conference users in the conference
525 * \param conference The conference bridge to remove the user from
526 * \param user The conference bridge user to remove from the conference
528 void conf_remove_user_active(struct confbridge_conference *conference, struct confbridge_user *user);
530 /*! \brief Remove a conference bridge user from the marked active conference users in the conference
531 * \param conference The conference bridge to remove the user from
532 * \param user The conference bridge user to remove from the conference
534 void conf_remove_user_marked(struct confbridge_conference *conference, struct confbridge_user *user);
536 /*! \brief Remove a conference bridge user from the waiting conference users in the conference
537 * \param conference The conference bridge to remove the user from
538 * \param user The conference bridge user to remove from the conference
540 void conf_remove_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user);
542 /*! \brief Queue a function to run with the given conference bridge user as an argument once the state transition is complete
543 * \param user The conference bridge user to pass to the function
544 * \param func The function to queue
546 * \retval non-zero failure
548 int conf_add_post_join_action(struct confbridge_user *user, int (*func)(struct confbridge_user *user));
552 * \brief get the confbridge start stasis message type
554 * \retval stasis message type for confbridge start messages if it's available
555 * \retval NULL if it isn't
557 struct stasis_message_type *confbridge_start_type(void);
561 * \brief get the confbridge end stasis message type
563 * \retval stasis message type for confbridge end messages if it's available
564 * \retval NULL if it isn't
566 struct stasis_message_type *confbridge_end_type(void);
570 * \brief get the confbridge join stasis message type
572 * \retval stasis message type for confbridge join messages if it's available
573 * \retval NULL if it isn't
575 struct stasis_message_type *confbridge_join_type(void);
579 * \brief get the confbridge leave stasis message type
581 * \retval stasis message type for confbridge leave messages if it's available
582 * \retval NULL if it isn't
584 struct stasis_message_type *confbridge_leave_type(void);
588 * \brief get the confbridge start_record stasis message type
590 * \retval stasis message type for confbridge start_record messages if it's available
591 * \retval NULL if it isn't
593 struct stasis_message_type *confbridge_start_record_type(void);
597 * \brief get the confbridge stop_record stasis message type
599 * \retval stasis message type for confbridge stop_record messages if it's available
600 * \retval NULL if it isn't
602 struct stasis_message_type *confbridge_stop_record_type(void);
606 * \brief get the confbridge mute stasis message type
608 * \retval stasis message type for confbridge mute messages if it's available
609 * \retval NULL if it isn't
611 struct stasis_message_type *confbridge_mute_type(void);
615 * \brief get the confbridge unmute stasis message type
617 * \retval stasis message type for confbridge unmute messages if it's available
618 * \retval NULL if it isn't
620 struct stasis_message_type *confbridge_unmute_type(void);
624 * \brief get the confbridge talking stasis message type
626 * \retval stasis message type for confbridge talking messages if it's available
627 * \retval NULL if it isn't
629 struct stasis_message_type *confbridge_talking_type(void);
633 * \brief get the confbridge welcome stasis message type
635 * \retval stasis message type for confbridge welcome messages if it's available
636 * \retval NULL if it isn't
638 struct stasis_message_type *confbridge_welcome_type(void);
642 * \brief Get the string representation of a confbridge stasis message type
644 * \param event_type The confbridge event type such as 'confbridge_welcome_type()'
646 * \retval The string representation of the message type
647 * \retval "unknown" if not found
649 const char *confbridge_event_type_to_string(struct stasis_message_type *event_type);
653 * \brief register stasis message routers to handle manager events for confbridge messages
656 * \retval non-zero failure
658 int manager_confbridge_init(void);
662 * \brief unregister stasis message routers to handle manager events for confbridge messages
664 void manager_confbridge_shutdown(void);
667 * \brief Get ConfBridge record channel technology struct.
670 * \return ConfBridge record channel technology.
672 struct ast_channel_tech *conf_record_get_tech(void);
675 * \brief Get ConfBridge announce channel technology struct.
678 * \return ConfBridge announce channel technology.
680 struct ast_channel_tech *conf_announce_get_tech(void);
683 * \brief Push the announcer channel into the conference.
686 * \param ast Either channel in the announcer channel pair.
688 * \retval 0 on success.
689 * \retval -1 on error.
691 int conf_announce_channel_push(struct ast_channel *ast);
694 * \brief Find a confbridge by name.
698 * \param conference_name The name to search for
700 * \return ConfBridge (which must be unreffed) or NULL.
702 struct confbridge_conference *conf_find_bridge(const char *conference_name);
705 * \brief Send events to bridge participants.
709 * \param conference The conference bridge
710 * \param chan The channel triggering the action
711 * \param msg The stasis message describing the event
713 void conf_send_event_to_participants(struct confbridge_conference *conference,
714 struct ast_channel *chan, struct stasis_message *msg);
717 * \brief Create join/leave events for attended transfers
721 * \param msg The attended transfer stasis message
724 void confbridge_handle_atxfer(struct ast_attended_transfer_message *msg);