diff options
author | Jason Parker <jparker@digium.com> | 2013-07-18 16:03:12 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2013-07-18 16:03:12 +0000 |
commit | c1a7567d24a08377438837ed26b1f8a886867c10 (patch) | |
tree | 4e137b98205c9c96b590b3707ec81c69df84f96b /include/asterisk/channel.h | |
parent | 3a2a12ca1ad8097482fe621e8b877db682601905 (diff) |
ARI: Add support for suppressing media streams.
Also convert res_mutestream to use the core feature behind this.
(closes issue ASTERISK-21618)
Review: https://reviewboard.asterisk.org/r/2652/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 94053eec2..59145fc08 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -4334,4 +4334,35 @@ const char *ast_channel_oldest_linkedid(const char *a, const char *b); */ void ast_channel_name_to_dial_string(char *channel_name); +#define AST_MUTE_DIRECTION_READ (1 << 0) +#define AST_MUTE_DIRECTION_WRITE (1 << 1) + +/*! + * \brief Suppress passing of a frame type on a channel + * + * \note The channel should be locked before calling this function. + * + * \param chan The channel to suppress + * \param direction The direction in which to suppress + * \param frametype The type of frame (AST_FRAME_VOICE, etc) to suppress + * + * \retval 0 Success + * \retval -1 Failure + */ +int ast_channel_suppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype); + +/*! + * \brief Stop suppressing of a frame type on a channel + * + * \note The channel should be locked before calling this function. + * + * \param chan The channel to stop suppressing + * \param direction The direction in which to stop suppressing + * \param frametype The type of frame (AST_FRAME_VOICE, etc) to stop suppressing + * + * \retval 0 Success + * \retval -1 Failure + */ +int ast_channel_unsuppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype); + #endif /* _ASTERISK_CHANNEL_H */ |