mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-05 20:55:26 +00:00
func_channel: dtmf_features setting
Allows reading andsetting dtmf features via a channel function CHANNEL(dtmf_features) (closes issue ASTERISK-21876) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2648/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -35,6 +35,31 @@ extern "C" {
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
/*!
|
||||
* \brief Sets the features a channel will use upon being bridged.
|
||||
* \since 12.0.0
|
||||
*
|
||||
* \param chan Which channel to set features for
|
||||
* \param features Which feature codes to set for the channel
|
||||
*
|
||||
* \retval 0 on success
|
||||
* \retval -1 on failure
|
||||
*/
|
||||
int ast_bridge_features_ds_set_string(struct ast_channel *chan, const char *features);
|
||||
|
||||
/*!
|
||||
* \brief writes a channel's DTMF features to a buffer string
|
||||
* \since 12.0.0
|
||||
*
|
||||
* \param chan channel whose feature flags should be checked
|
||||
* \param buffer pointer string buffer where the output should be stored
|
||||
* \param buf_size size of the provided buffer (ideally enough for all features, 6+)
|
||||
*
|
||||
* \retval 0 on successful write
|
||||
* \retval -1 on failure
|
||||
*/
|
||||
int ast_bridge_features_ds_get_string(struct ast_channel *chan, char *buffer, size_t buf_size);
|
||||
|
||||
/*!
|
||||
* \brief Get DTMF feature flags from the channel.
|
||||
* \since 12.0.0
|
||||
@@ -42,9 +67,10 @@ extern "C" {
|
||||
* \param chan Channel to get DTMF features datastore.
|
||||
*
|
||||
* \note The channel should be locked before calling this function.
|
||||
* \note The channel must remain locked until the flags returned have been consumed.
|
||||
*
|
||||
* \retval flags on success.
|
||||
* \retval NULL on error.
|
||||
* \retval NULL if the datastore does not exist.
|
||||
*/
|
||||
struct ast_flags *ast_bridge_features_ds_get(struct ast_channel *chan);
|
||||
|
||||
|
Reference in New Issue
Block a user