summaryrefslogtreecommitdiff
path: root/include/asterisk/bridge.h
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-12-17 23:25:49 +0000
committerJonathan Rose <jrose@digium.com>2013-12-17 23:25:49 +0000
commitb0bb03e916da4b4a37aa65b694e3aa1cecee8648 (patch)
tree697d4ba1137ca3b28fc79d1c976b2e342274c1fe /include/asterisk/bridge.h
parent91d0f305061a6111d9996750c04d54daa67b67bb (diff)
bridging: Give bridges a name and a known creator
Bridges have two new optional properties, a creator and a name. Certain consumers of bridges will automatically provide bridges that they create with these properties. Examples include app_bridgewait, res_parking, app_confbridge, and app_agent_pool. In addition, a name may now be provided as an argument to the POST function for creating new bridges via ARI. (closes issue AFS-47) Review: https://reviewboard.asterisk.org/r/3070/ ........ Merged revisions 404042 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/bridge.h')
-rw-r--r--include/asterisk/bridge.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h
index fdb3803ad..0706b3aed 100644
--- a/include/asterisk/bridge.h
+++ b/include/asterisk/bridge.h
@@ -312,8 +312,15 @@ struct ast_bridge {
unsigned int dissolved:1;
/*! TRUE if the bridge construction was completed. */
unsigned int construction_completed:1;
- /*! Immutable bridge UUID. */
- char uniqueid[AST_UUID_STR_LEN];
+
+ AST_DECLARE_STRING_FIELDS(
+ /*! Immutable name of the creator for the bridge */
+ AST_STRING_FIELD(creator);
+ /*! Immutable name given to the bridge by its creator */
+ AST_STRING_FIELD(name);
+ /*! Immutable bridge UUID. */
+ AST_STRING_FIELD(uniqueid);
+ );
};
/*! \brief Bridge base class virtual method table. */
@@ -324,6 +331,8 @@ extern struct ast_bridge_methods ast_bridge_base_v_table;
*
* \param capabilities The capabilities that we require to be used on the bridge
* \param flags Flags that will alter the behavior of the bridge
+ * \param creator Entity that created the bridge (optional)
+ * \param name Name given to the bridge by its creator (optional, requires named creator)
*
* \retval a pointer to a new bridge on success
* \retval NULL on failure
@@ -338,7 +347,7 @@ extern struct ast_bridge_methods ast_bridge_base_v_table;
* This creates a no frills two party bridge that will be
* destroyed once one of the channels hangs up.
*/
-struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, unsigned int flags);
+struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, unsigned int flags, const char *creator, const char *name);
/*!
* \brief Try locking the bridge.