confbridge.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2011, Digium, Inc.
00005  *
00006  * David Vossel <dvossel@digium.com>
00007  * Joshua Colp <jcolp@digium.com>
00008  *
00009  * See http://www.asterisk.org for more information about
00010  * the Asterisk project. Please do not directly contact
00011  * any of the maintainers of this project for assistance;
00012  * the project provides a web site, mailing lists and IRC
00013  * channels for your use.
00014  *
00015  * This program is free software, distributed under the terms of
00016  * the GNU General Public License Version 2. See the LICENSE file
00017  * at the top of the source tree.
00018  */
00019 
00020 
00021 #ifndef _CONFBRIDGE_H
00022 #define _CONFBRIDGE_H
00023 
00024 #include "asterisk.h"
00025 #include "asterisk/app.h"
00026 #include "asterisk/logger.h"
00027 #include "asterisk/linkedlists.h"
00028 #include "asterisk/channel.h"
00029 #include "asterisk/bridge.h"
00030 #include "asterisk/bridge_features.h"
00031 #include "conf_state.h"
00032 
00033 /* Maximum length of a conference bridge name */
00034 #define MAX_CONF_NAME AST_MAX_EXTENSION
00035 /* Maximum length of a conference pin */
00036 #define MAX_PIN     80
00037 /* Maximum length of bridge/user/menu profile names */
00038 #define MAX_PROFILE_NAME 128
00039 
00040 #define DEFAULT_USER_PROFILE "default_user"
00041 #define DEFAULT_BRIDGE_PROFILE "default_bridge"
00042 #define DEFAULT_MENU_PROFILE "default_menu"
00043 
00044 #define DEFAULT_TALKING_THRESHOLD 160
00045 #define DEFAULT_SILENCE_THRESHOLD 2500
00046 
00047 enum user_profile_flags {
00048    USER_OPT_ADMIN =        (1 << 0), /*!< Set if the caller is an administrator */
00049    USER_OPT_NOONLYPERSON = (1 << 1), /*!< Set if the "you are currently the only person in this conference" sound file should not be played */
00050    USER_OPT_MARKEDUSER =   (1 << 2), /*!< Set if the caller is a marked user */
00051    USER_OPT_STARTMUTED =   (1 << 3), /*!< Set if the caller should be initially set muted */
00052    USER_OPT_MUSICONHOLD =  (1 << 4), /*!< Set if music on hold should be played if nobody else is in the conference bridge */
00053    USER_OPT_QUIET =        (1 << 5), /*!< Set if no audio prompts should be played */
00054    USER_OPT_ANNOUNCEUSERCOUNT = (1 << 6), /*!< Set if the number of users should be announced to the caller */
00055    USER_OPT_WAITMARKED =   (1 << 7), /*!< Set if the user must wait for a marked user before starting */
00056    USER_OPT_ENDMARKED =    (1 << 8), /*!< Set if the user should be kicked after the last Marked user exits */
00057    USER_OPT_DENOISE =      (1 << 9), /*!< Sets if denoise filter should be used on audio before mixing. */
00058    USER_OPT_ANNOUNCE_JOIN_LEAVE = (1 << 10), /*!< Sets if the user's name should be recorded and announced on join and leave. */
00059    USER_OPT_TALKER_DETECT = (1 << 11), /*!< Sets if start and stop talking events should generated for this user over AMI. */
00060    USER_OPT_DROP_SILENCE =  (1 << 12), /*!< Sets if silence should be dropped from the mix or not. */
00061    USER_OPT_DTMF_PASS    =  (1 << 13), /*!< Sets if dtmf should be passed into the conference or not */
00062    USER_OPT_ANNOUNCEUSERCOUNTALL = (1 << 14), /*!< Sets if the number of users should be announced to everyone. */
00063    USER_OPT_JITTERBUFFER =  (1 << 15), /*!< Places a jitterbuffer on the user. */
00064    USER_OPT_ANNOUNCE_JOIN_LEAVE_REVIEW = (1 << 16), /*!< modifies ANNOUNCE_JOIN_LEAVE - user reviews the recording before continuing */
00065 };
00066 
00067 enum bridge_profile_flags {
00068    BRIDGE_OPT_RECORD_CONFERENCE = (1 << 0), /*!< Set if the conference should be recorded */
00069    BRIDGE_OPT_VIDEO_SRC_LAST_MARKED = (1 << 1), /*!< Set if conference should feed video of last marked user to all participants. */
00070    BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED = (1 << 2), /*!< Set if conference should feed video of first marked user to all participants. */
00071    BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER = (1 << 3), /*!< Set if conference set the video feed to follow the loudest talker.  */
00072    BRIDGE_OPT_RECORD_FILE_APPEND = (1 << 4), /*!< Set if the record file should be appended to between start/stops.  */
00073    BRIDGE_OPT_RECORD_FILE_TIMESTAMP = (1 << 5), /*< Set if the record file should have a timestamp appended */
00074 };
00075 
00076 enum conf_menu_action_id {
00077    MENU_ACTION_TOGGLE_MUTE = 1,
00078    MENU_ACTION_PLAYBACK,
00079    MENU_ACTION_PLAYBACK_AND_CONTINUE,
00080    MENU_ACTION_INCREASE_LISTENING,
00081    MENU_ACTION_DECREASE_LISTENING,
00082    MENU_ACTION_RESET_LISTENING,
00083    MENU_ACTION_RESET_TALKING,
00084    MENU_ACTION_INCREASE_TALKING,
00085    MENU_ACTION_DECREASE_TALKING,
00086    MENU_ACTION_DIALPLAN_EXEC,
00087    MENU_ACTION_ADMIN_TOGGLE_LOCK,
00088    MENU_ACTION_ADMIN_KICK_LAST,
00089    MENU_ACTION_LEAVE,
00090    MENU_ACTION_NOOP,
00091    MENU_ACTION_SET_SINGLE_VIDEO_SRC,
00092    MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC,
00093    MENU_ACTION_PARTICIPANT_COUNT,
00094    MENU_ACTION_ADMIN_TOGGLE_MUTE_PARTICIPANTS,
00095 };
00096 
00097 /*! The conference menu action contains both
00098  *  the action id that represents the action that
00099  *  must take place, along with any data associated
00100  *  with that action. */
00101 struct conf_menu_action {
00102    enum conf_menu_action_id id;
00103    union {
00104       char playback_file[PATH_MAX];
00105       struct {
00106          char context[AST_MAX_CONTEXT];
00107          char exten[AST_MAX_EXTENSION];
00108          int priority;
00109       } dialplan_args;
00110    } data;
00111    AST_LIST_ENTRY(conf_menu_action) action;
00112 };
00113 
00114 /*! Conference menu entries contain the DTMF sequence
00115  *  and the list of actions that are associated with that
00116  *  sequence. */
00117 struct conf_menu_entry {
00118    /*! the DTMF sequence that triggers the actions */
00119    char dtmf[MAXIMUM_DTMF_FEATURE_STRING];
00120    /*! The actions associated with this menu entry. */
00121    AST_LIST_HEAD_NOLOCK(, conf_menu_action) actions;
00122    AST_LIST_ENTRY(conf_menu_entry) entry;
00123 };
00124 
00125 /*! Conference menu structure.  Contains a list
00126  * of DTMF sequences coupled with the actions those
00127  * sequences invoke.*/
00128 struct conf_menu {
00129    char name[MAX_PROFILE_NAME];
00130    AST_LIST_HEAD_NOLOCK(, conf_menu_entry) entries;
00131 };
00132 
00133 struct user_profile {
00134    char name[MAX_PROFILE_NAME];
00135    char pin[MAX_PIN];
00136    char moh_class[128];
00137    char announcement[PATH_MAX];
00138    unsigned int flags;
00139    unsigned int announce_user_count_all_after;
00140    /*! The time in ms of talking before a user is considered to be talking by the dsp. */
00141    unsigned int talking_threshold;
00142    /*! The time in ms of silence before a user is considered to be silent by the dsp. */
00143    unsigned int silence_threshold;
00144 };
00145 
00146 enum conf_sounds {
00147    CONF_SOUND_HAS_JOINED,
00148    CONF_SOUND_HAS_LEFT,
00149    CONF_SOUND_KICKED,
00150    CONF_SOUND_MUTED,
00151    CONF_SOUND_UNMUTED,
00152    CONF_SOUND_ONLY_ONE,
00153    CONF_SOUND_THERE_ARE,
00154    CONF_SOUND_OTHER_IN_PARTY,
00155    CONF_SOUND_PLACE_IN_CONF,
00156    CONF_SOUND_WAIT_FOR_LEADER,
00157    CONF_SOUND_LEADER_HAS_LEFT,
00158    CONF_SOUND_GET_PIN,
00159    CONF_SOUND_INVALID_PIN,
00160    CONF_SOUND_ONLY_PERSON,
00161    CONF_SOUND_LOCKED,
00162    CONF_SOUND_LOCKED_NOW,
00163    CONF_SOUND_UNLOCKED_NOW,
00164    CONF_SOUND_ERROR_MENU,
00165    CONF_SOUND_JOIN,
00166    CONF_SOUND_LEAVE,
00167    CONF_SOUND_PARTICIPANTS_MUTED,
00168    CONF_SOUND_PARTICIPANTS_UNMUTED,
00169    CONF_SOUND_BEGIN,
00170 };
00171 
00172 struct bridge_profile_sounds {
00173    AST_DECLARE_STRING_FIELDS(
00174       AST_STRING_FIELD(hasjoin);
00175       AST_STRING_FIELD(hasleft);
00176       AST_STRING_FIELD(kicked);
00177       AST_STRING_FIELD(muted);
00178       AST_STRING_FIELD(unmuted);
00179       AST_STRING_FIELD(onlyone);
00180       AST_STRING_FIELD(thereare);
00181       AST_STRING_FIELD(otherinparty);
00182       AST_STRING_FIELD(placeintoconf);
00183       AST_STRING_FIELD(waitforleader);
00184       AST_STRING_FIELD(leaderhasleft);
00185       AST_STRING_FIELD(getpin);
00186       AST_STRING_FIELD(invalidpin);
00187       AST_STRING_FIELD(onlyperson);
00188       AST_STRING_FIELD(locked);
00189       AST_STRING_FIELD(lockednow);
00190       AST_STRING_FIELD(unlockednow);
00191       AST_STRING_FIELD(errormenu);
00192       AST_STRING_FIELD(leave);
00193       AST_STRING_FIELD(join);
00194       AST_STRING_FIELD(participantsmuted);
00195       AST_STRING_FIELD(participantsunmuted);
00196       AST_STRING_FIELD(begin);
00197    );
00198 };
00199 
00200 struct bridge_profile {
00201    char name[MAX_PROFILE_NAME];
00202    char language[MAX_LANGUAGE];       /*!< Language used for playback_chan */
00203    char rec_file[PATH_MAX];
00204    char rec_options[128];
00205    char rec_command[128];
00206    unsigned int flags;
00207    unsigned int max_members;          /*!< The maximum number of participants allowed in the conference */
00208    unsigned int internal_sample_rate; /*!< The internal sample rate of the bridge. 0 when set to auto adjust mode. */
00209    unsigned int mix_interval;  /*!< The internal mixing interval used by the bridge. When set to 0 the bridgewill use a default interval. */
00210    struct bridge_profile_sounds *sounds;
00211 };
00212 
00213 /*! \brief The structure that represents a conference bridge */
00214 struct confbridge_conference {
00215    char name[MAX_CONF_NAME];                                         /*!< Name of the conference bridge */
00216    struct confbridge_state *state;                                   /*!< Conference state information */
00217    struct ast_bridge *bridge;                                        /*!< Bridge structure doing the mixing */
00218    struct bridge_profile b_profile;                                  /*!< The Bridge Configuration Profile */
00219    unsigned int activeusers;                                         /*!< Number of active users present */
00220    unsigned int markedusers;                                         /*!< Number of marked users present */
00221    unsigned int waitingusers;                                        /*!< Number of waiting users present */
00222    unsigned int locked:1;                                            /*!< Is this conference bridge locked? */
00223    unsigned int muted:1;                                             /*!< Is this conference bridge muted? */
00224    struct ast_channel *playback_chan;                                /*!< Channel used for playback into the conference bridge */
00225    struct ast_channel *record_chan;                                  /*!< Channel used for recording the conference */
00226    struct ast_str *record_filename;                                  /*!< Recording filename. */
00227    struct ast_str *orig_rec_file;                                    /*!< Previous b_profile.rec_file. */
00228    ast_mutex_t playback_lock;                                        /*!< Lock used for playback channel */
00229    AST_LIST_HEAD_NOLOCK(, confbridge_user) active_list;              /*!< List of users participating in the conference bridge */
00230    AST_LIST_HEAD_NOLOCK(, confbridge_user) waiting_list;             /*!< List of users waiting to join the conference bridge */
00231 };
00232 
00233 extern struct ao2_container *conference_bridges;
00234 
00235 struct post_join_action {
00236    int (*func)(struct confbridge_user *user);
00237    AST_LIST_ENTRY(post_join_action) list;
00238 };
00239 
00240 /*! \brief The structure that represents a conference bridge user */
00241 struct confbridge_user {
00242    struct confbridge_conference *conference;    /*!< Conference bridge they are participating in */
00243    struct bridge_profile b_profile;             /*!< The Bridge Configuration Profile */
00244    struct user_profile u_profile;               /*!< The User Configuration Profile */
00245    char menu_name[MAX_PROFILE_NAME];            /*!< The name of the DTMF menu assigned to this user */
00246    char name_rec_location[PATH_MAX];            /*!< Location of the User's name recorded file if it exists */
00247    struct ast_channel *chan;                    /*!< Asterisk channel participating */
00248    struct ast_bridge_features features;         /*!< Bridge features structure */
00249    struct ast_bridge_tech_optimizations tech_args; /*!< Bridge technology optimizations for talk detection */
00250    unsigned int suspended_moh;                  /*!< Count of active suspended MOH actions. */
00251    unsigned int muted:1;                        /*!< Has the user requested to be muted? */
00252    unsigned int kicked:1;                       /*!< User has been kicked from the conference */
00253    unsigned int playing_moh:1;                  /*!< MOH is currently being played to the user */
00254    AST_LIST_HEAD_NOLOCK(, post_join_action) post_join_list; /*!< List of sounds to play after joining */;
00255    AST_LIST_ENTRY(confbridge_user) list;        /*!< Linked list information */
00256 };
00257 
00258 /*! \brief load confbridge.conf file */
00259 int conf_load_config(void);
00260 
00261 /*! \brief reload confbridge.conf file */
00262 int conf_reload_config(void);
00263 
00264 /*! \brief destroy the information loaded from the confbridge.conf file*/
00265 void conf_destroy_config(void);
00266 
00267 /*!
00268  * \brief find a user profile given a user profile's name and store
00269  * that profile in result structure.
00270  *
00271  * \param chan channel the user profile is requested for
00272  * \param user_profile_name name of the profile requested (optional)
00273  * \param result data contained by the user profile will be copied to this struct pointer
00274  *
00275  * \details If user_profile_name is not provided, this function will
00276  * check for the presence of a user profile set by the CONFBRIDGE
00277  * function on a channel datastore. If that doesn't exist, the
00278  * default_user profile is used.
00279  *
00280  * \retval user profile on success
00281  * \retval NULL on failure
00282  */
00283 const struct user_profile *conf_find_user_profile(struct ast_channel *chan, const char *user_profile_name, struct user_profile *result);
00284 
00285 /*!
00286  * \brief Find a bridge profile given a bridge profile's name and store
00287  * that profile in result structure.
00288  *
00289  * \param chan channel the bridge profile is requested for
00290  * \param bridge_profile_name name of the profile requested (optional)
00291  * \param result data contained by the bridge profile will be copied to this struct pointer
00292  *
00293  * \details If bridge_profile_name is not provided, this function will
00294  * check for the presence of a bridge profile set by the CONFBRIDGE
00295  * function on a channel datastore. If that doesn't exist, the
00296  * default_bridge profile is used.
00297  *
00298  * \retval bridge profile on success
00299  * \retval NULL on failure
00300  */
00301 const struct bridge_profile *conf_find_bridge_profile(struct ast_channel *chan, const char *bridge_profile_name, struct bridge_profile *result);
00302 
00303 /*!
00304  * \brief find a menu profile given a menu profile's name and apply
00305  * the menu in DTMF hooks.
00306  *
00307  * \param chan channel the menu profile is requested for
00308  * \param user user profile the menu is being applied to
00309  * \param menu_profile_name name of the profile requested (optional)
00310  *
00311  * \details If menu_profile_name is not provided, this function will
00312  * check for the presence of a menu profile set by the CONFBRIDGE
00313  * function on a channel datastore. If that doesn't exist, the
00314  * default_menu profile is used.
00315  *
00316  * \retval 0 on success
00317  * \retval -1 on failure
00318  */
00319 int conf_set_menu_to_user(struct ast_channel *chan, struct confbridge_user *user, const char *menu_profile_name);
00320 
00321 /*!
00322  * \brief Destroy a bridge profile found by 'conf_find_bridge_profile'
00323  */
00324 void conf_bridge_profile_destroy(struct bridge_profile *b_profile);
00325 
00326 /*!
00327  * \brief copies a bridge profile
00328  * \note conf_bridge_profile_destroy must be called on the dst structure
00329  */
00330 void conf_bridge_profile_copy(struct bridge_profile *dst, struct bridge_profile *src);
00331 
00332 /*!
00333  * \brief Finds a menu_entry in a menu structure matched by DTMF sequence.
00334  *
00335  * \note the menu entry found must be destroyed using conf_menu_entry_destroy()
00336  *
00337  * \retval 1 success, entry is found and stored in result
00338  * \retval 0 failure, no entry found for given DTMF sequence
00339  */
00340 int conf_find_menu_entry_by_sequence(const char *dtmf_sequence, struct conf_menu *menu, struct conf_menu_entry *result);
00341 
00342 /*!
00343  * \brief Destroys and frees all the actions stored in a menu_entry structure
00344  */
00345 void conf_menu_entry_destroy(struct conf_menu_entry *menu_entry);
00346 
00347 /*!
00348  * \brief Once a DTMF sequence matches a sequence in the user's DTMF menu, this function will get
00349  * called to perform the menu action.
00350  *
00351  * \param bridge_channel Bridged channel this is involving
00352  * \param user the conference user to perform the action on.
00353  * \param menu_entry the menu entry that invoked this callback to occur.
00354  * \param menu an AO2 referenced pointer to the entire menu structure the menu_entry
00355  *        derived from.
00356  *
00357  * \note The menu_entry is a deep copy of the entry found in the menu structure.  This allows
00358  * for the menu_entry to be accessed without requiring the menu lock.  If the menu must
00359  * be accessed, the menu lock must be held.  Reference counting of the menu structure is
00360  * handled outside of the scope of this function.
00361  *
00362  * \retval 0 success
00363  * \retval -1 failure
00364  */
00365 int conf_handle_dtmf(
00366    struct ast_bridge_channel *bridge_channel,
00367    struct confbridge_user *user,
00368    struct conf_menu_entry *menu_entry,
00369    struct conf_menu *menu);
00370 
00371 
00372 /*! \brief Looks to see if sound file is stored in bridge profile sounds, if not
00373  *  default sound is provided.*/
00374 const char *conf_get_sound(enum conf_sounds sound, struct bridge_profile_sounds *custom_sounds);
00375 
00376 int func_confbridge_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value);
00377 
00378 /*!
00379  * \brief Play sound file into conference bridge
00380  *
00381  * \param conference The conference bridge to play sound file into
00382  * \param filename Sound file to play
00383  *
00384  * \retval 0 success
00385  * \retval -1 failure
00386  */
00387 int play_sound_file(struct confbridge_conference *conference, const char *filename);
00388 
00389 /*! \brief Callback to be called when the conference has become empty
00390  * \param conference The conference bridge
00391  */
00392 void conf_ended(struct confbridge_conference *conference);
00393 
00394 /*!
00395  * \brief Update the actual mute status of the user and set it on the bridge.
00396  *
00397  * \param user User to update the mute status.
00398  *
00399  * \return Nothing
00400  */
00401 void conf_update_user_mute(struct confbridge_user *user);
00402 
00403 /*!
00404  * \brief Stop MOH for the conference user.
00405  *
00406  * \param user Conference user to stop MOH on.
00407  *
00408  * \return Nothing
00409  */
00410 void conf_moh_stop(struct confbridge_user *user);
00411 
00412 /*!
00413  * \brief Start MOH for the conference user.
00414  *
00415  * \param user Conference user to start MOH on.
00416  *
00417  * \return Nothing
00418  */
00419 void conf_moh_start(struct confbridge_user *user);
00420 
00421 /*! \brief Attempt to mute/play MOH to the only user in the conference if they require it
00422  * \param conference A conference bridge containing a single user
00423  */
00424 void conf_mute_only_active(struct confbridge_conference *conference);
00425 
00426 /*! \brief Callback to execute any time we transition from zero to one active users
00427  * \param conference The conference bridge with a single active user joined
00428  * \retval 0 success
00429  * \retval -1 failure
00430  */
00431 void conf_handle_first_join(struct confbridge_conference *conference);
00432 
00433 /*! \brief Handle actions every time a waitmarked user joins w/o a marked user present
00434  * \param user The waitmarked user
00435  * \retval 0 success
00436  * \retval -1 failure
00437  */
00438 int conf_handle_inactive_waitmarked(struct confbridge_user *user);
00439 
00440 /*! \brief Handle actions whenever an unmarked user joins an inactive conference
00441  * \note These actions seem like they could apply just as well to a marked user
00442  * and possibly be made to happen any time transitioning to a single state.
00443  *
00444  * \param user The unmarked user
00445  */
00446 int conf_handle_only_unmarked(struct confbridge_user *user);
00447 
00448 /*! \brief Handle when a conference moves to having more than one active participant
00449  * \param conference The conference bridge with more than one active participant
00450  */
00451 void conf_handle_second_active(struct confbridge_conference *conference);
00452 
00453 /*! \brief Add a conference bridge user as an unmarked active user of the conference
00454  * \param conference The conference bridge to add the user to
00455  * \param user The conference bridge user to add to the conference
00456  */
00457 void conf_add_user_active(struct confbridge_conference *conference, struct confbridge_user *user);
00458 
00459 /*! \brief Add a conference bridge user as a marked active user of the conference
00460  * \param conference The conference bridge to add the user to
00461  * \param user The conference bridge user to add to the conference
00462  */
00463 void conf_add_user_marked(struct confbridge_conference *conference, struct confbridge_user *user);
00464 
00465 /*! \brief Add a conference bridge user as an waiting user of the conference
00466  * \param conference The conference bridge to add the user to
00467  * \param user The conference bridge user to add to the conference
00468  */
00469 void conf_add_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user);
00470 
00471 /*! \brief Remove a conference bridge user from the unmarked active conference users in the conference
00472  * \param conference The conference bridge to remove the user from
00473  * \param user The conference bridge user to remove from the conference
00474  */
00475 void conf_remove_user_active(struct confbridge_conference *conference, struct confbridge_user *user);
00476 
00477 /*! \brief Remove a conference bridge user from the marked active conference users in the conference
00478  * \param conference The conference bridge to remove the user from
00479  * \param user The conference bridge user to remove from the conference
00480  */
00481 void conf_remove_user_marked(struct confbridge_conference *conference, struct confbridge_user *user);
00482 
00483 /*! \brief Remove a conference bridge user from the waiting conference users in the conference
00484  * \param conference The conference bridge to remove the user from
00485  * \param user The conference bridge user to remove from the conference
00486  */
00487 void conf_remove_user_waiting(struct confbridge_conference *conference, struct confbridge_user *user);
00488 
00489 /*! \brief Queue a function to run with the given conference bridge user as an argument once the state transition is complete
00490  * \param user The conference bridge user to pass to the function
00491  * \param func The function to queue
00492  * \retval 0 success
00493  * \retval non-zero failure
00494  */
00495 int conf_add_post_join_action(struct confbridge_user *user, int (*func)(struct confbridge_user *user));
00496 
00497 /*!
00498  * \since 12.0
00499  * \brief get the confbridge start stasis message type
00500  *
00501  * \retval stasis message type for confbridge start messages if it's available
00502  * \retval NULL if it isn't
00503  */
00504 struct stasis_message_type *confbridge_start_type(void);
00505 
00506 /*!
00507  * \since 12.0
00508  * \brief get the confbridge end stasis message type
00509  *
00510  * \retval stasis message type for confbridge end messages if it's available
00511  * \retval NULL if it isn't
00512  */
00513 struct stasis_message_type *confbridge_end_type(void);
00514 
00515 /*!
00516  * \since 12.0
00517  * \brief get the confbridge join stasis message type
00518  *
00519  * \retval stasis message type for confbridge join messages if it's available
00520  * \retval NULL if it isn't
00521  */
00522 struct stasis_message_type *confbridge_join_type(void);
00523 
00524 /*!
00525  * \since 12.0
00526  * \brief get the confbridge leave stasis message type
00527  *
00528  * \retval stasis message type for confbridge leave messages if it's available
00529  * \retval NULL if it isn't
00530  */
00531 struct stasis_message_type *confbridge_leave_type(void);
00532 
00533 /*!
00534  * \since 12.0
00535  * \brief get the confbridge start_record stasis message type
00536  *
00537  * \retval stasis message type for confbridge start_record messages if it's available
00538  * \retval NULL if it isn't
00539  */
00540 struct stasis_message_type *confbridge_start_record_type(void);
00541 
00542 /*!
00543  * \since 12.0
00544  * \brief get the confbridge stop_record stasis message type
00545  *
00546  * \retval stasis message type for confbridge stop_record messages if it's available
00547  * \retval NULL if it isn't
00548  */
00549 struct stasis_message_type *confbridge_stop_record_type(void);
00550 
00551 /*!
00552  * \since 12.0
00553  * \brief get the confbridge mute stasis message type
00554  *
00555  * \retval stasis message type for confbridge mute messages if it's available
00556  * \retval NULL if it isn't
00557  */
00558 struct stasis_message_type *confbridge_mute_type(void);
00559 
00560 /*!
00561  * \since 12.0
00562  * \brief get the confbridge unmute stasis message type
00563  *
00564  * \retval stasis message type for confbridge unmute messages if it's available
00565  * \retval NULL if it isn't
00566  */
00567 struct stasis_message_type *confbridge_unmute_type(void);
00568 
00569 /*!
00570  * \since 12.0
00571  * \brief get the confbridge talking stasis message type
00572  *
00573  * \retval stasis message type for confbridge talking messages if it's available
00574  * \retval NULL if it isn't
00575  */
00576 struct stasis_message_type *confbridge_talking_type(void);
00577 
00578 /*!
00579  * \since 12.0
00580  * \brief register stasis message routers to handle manager events for confbridge messages
00581  *
00582  * \retval 0 success
00583  * \retval non-zero failure
00584  */
00585 int manager_confbridge_init(void);
00586 
00587 /*!
00588  * \since 12.0
00589  * \brief unregister stasis message routers to handle manager events for confbridge messages
00590  */
00591 void manager_confbridge_shutdown(void);
00592 
00593 /*!
00594  * \brief Get ConfBridge record channel technology struct.
00595  * \since 12.0.0
00596  *
00597  * \return ConfBridge record channel technology.
00598  */
00599 struct ast_channel_tech *conf_record_get_tech(void);
00600 
00601 /*!
00602  * \brief Get ConfBridge announce channel technology struct.
00603  * \since 12.0.0
00604  *
00605  * \return ConfBridge announce channel technology.
00606  */
00607 struct ast_channel_tech *conf_announce_get_tech(void);
00608 
00609 /*!
00610  * \brief Remove the announcer channel from the conference.
00611  * \since 12.0.0
00612  *
00613  * \param chan Either channel in the announcer channel pair.
00614  *
00615  * \return Nothing
00616  */
00617 void conf_announce_channel_depart(struct ast_channel *chan);
00618 
00619 /*!
00620  * \brief Push the announcer channel into the conference.
00621  * \since 12.0.0
00622  *
00623  * \param ast Either channel in the announcer channel pair.
00624  *
00625  * \retval 0 on success.
00626  * \retval -1 on error.
00627  */
00628 int conf_announce_channel_push(struct ast_channel *ast);
00629 #endif

Generated on Thu Apr 16 06:27:31 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6