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
This commit is contained in:
Jason Parker
2013-07-18 16:03:12 +00:00
parent 3a2a12ca1a
commit c1a7567d24
6 changed files with 346 additions and 167 deletions

View File

@@ -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 */