summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-07-23 21:32:33 +0000
committerJonathan Rose <jrose@digium.com>2013-07-23 21:32:33 +0000
commitf3fcf0aa2ebde966c1cb3094b8d2a1c9fd365416 (patch)
tree9d15312cf2d5d9129689128e17053f696705feb4 /include
parentc780fd5498c12a32026d441de40278fd5ba718e2 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/bridging_basic.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/asterisk/bridging_basic.h b/include/asterisk/bridging_basic.h
index cc42354dc..4db142946 100644
--- a/include/asterisk/bridging_basic.h
+++ b/include/asterisk/bridging_basic.h
@@ -36,15 +36,41 @@ 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
*
* \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);