diff options
author | Jonathan Rose <jrose@digium.com> | 2013-08-05 16:59:13 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2013-08-05 16:59:13 +0000 |
commit | e47794ead1fb35527728a0c655585af35679e258 (patch) | |
tree | c3e08fcd907c1b0a2390a388d69905394b5c307e /include | |
parent | 98b02d98f389d922da568882cd3f350fe28b473d (diff) |
ARI: bridges/{bridgeID}/addChannel: add roles parameter
Roles are now cleared with each entry into a bridge with addChannel.
If the roles parameter is present, the role specified will be applied
to all channels being added with the addChannel command.
(closes issue ASTERISK-21973)
Reported by: Matt Jordan
https://reviewboard.asterisk.org/r/2691/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/bridge_roles.h | 7 | ||||
-rw-r--r-- | include/asterisk/stasis_app.h | 18 |
2 files changed, 25 insertions, 0 deletions
diff --git a/include/asterisk/bridge_roles.h b/include/asterisk/bridge_roles.h index d90e564b7..f91a6b0aa 100644 --- a/include/asterisk/bridge_roles.h +++ b/include/asterisk/bridge_roles.h @@ -52,6 +52,13 @@ int ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name) void ast_channel_remove_bridge_role(struct ast_channel *chan, const char *role_name); /*! + * \brief Removes all bridge roles currently on a channel + * + * \param chan Channel the roles are being removed from + */ +void ast_channel_clear_bridge_roles(struct ast_channel *chan); + +/*! * \brief Set a role option on a channel * \param channel Channel receiving the role option * \param role_name Role the role option is applied to diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h index 898cb1840..87b4bdb41 100644 --- a/include/asterisk/stasis_app.h +++ b/include/asterisk/stasis_app.h @@ -174,6 +174,24 @@ const char *stasis_app_control_get_channel_id( int stasis_app_control_dial(struct stasis_app_control *control, const char *endpoint, int timeout); /*! + * \brief Apply a bridge role to a channel controlled by a stasis app control + * + * \param control Control for \c res_stasis + * \param role Role to apply + * + * \return 0 for success + * \return -1 for error. + */ +int stasis_app_control_add_role(struct stasis_app_control *control, const char *role); + +/*! + * \brief Clear bridge roles currently applied to a channel controlled by a stasis app control + * + * \param control Control for \c res_stasis + */ +void stasis_app_control_clear_roles(struct stasis_app_control *control); + +/*! * \brief Exit \c res_stasis and continue execution in the dialplan. * * If the channel is no longer in \c res_stasis, this function does nothing. |