From c1a7567d24a08377438837ed26b1f8a886867c10 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Thu, 18 Jul 2013 16:03:12 +0000 Subject: 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 --- include/asterisk/channel.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include/asterisk/channel.h') 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 */ -- cgit v1.2.3