summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorSebastien Duthil <sduthil@proformatique.com>2016-11-11 11:45:37 -0500
committerSebastien Duthil <sduthil@proformatique.com>2016-11-14 13:51:56 -0500
commitc6d755de11e98c1f6f33b1b35db9725f64f72053 (patch)
tree2299d268ffdce70a50dafacc20cc56509a79f4c4 /include/asterisk/channel.h
parent7540036427f87bfe3c87357ac33c08561f191e98 (diff)
res_ari: Add support for channel variables in ARI events.
This works the same as for AMI manager variables. Set "channelvars=foo,bar" in your ari.conf general section, and then the channel variables "foo" and "bar" (along with their values), will appear in every Stasis websocket channel event. ASTERISK-26492 #close patches: ari_vars.diff submitted by Mark Michelson Change-Id: I5609ba239259577c0948645df776d7f3bc864229
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index ff92cc878..cfd8384cb 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -4340,6 +4340,36 @@ void ast_channel_set_manager_vars(size_t varc, char **vars);
struct varshead *ast_channel_get_manager_vars(struct ast_channel *chan);
/*!
+ * \since 14.2.0
+ * \brief Return whether or not any ARI variables have been set
+ *
+ * \retval 0 if no ARI variables are expected
+ * \retval 1 if ARI variables are expected
+ */
+int ast_channel_has_ari_vars(void);
+
+/*!
+ * \since 14.2.0
+ * \brief Sets the variables to be stored in the \a ari_vars field of all
+ * snapshots.
+ * \param varc Number of variable names.
+ * \param vars Array of variable names.
+ */
+void ast_channel_set_ari_vars(size_t varc, char **vars);
+
+/*!
+ * \since 14.2.0
+ * \brief Gets the variables for a given channel, as specified by ast_channel_set_ari_vars().
+ *
+ * The returned variable list is an AO2 object, so ao2_cleanup() to free it.
+ *
+ * \param chan Channel to get variables for.
+ * \return List of channel variables.
+ * \return \c NULL on error
+ */
+struct varshead *ast_channel_get_ari_vars(struct ast_channel *chan);
+
+/*!
* \since 12
* \brief Gets the variables for a given channel, as set using pbx_builtin_setvar_helper().
*