summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/bridge.h15
-rw-r--r--include/asterisk/bridge_internal.h6
-rw-r--r--include/asterisk/stasis_app.h3
-rw-r--r--include/asterisk/stasis_bridges.h4
4 files changed, 22 insertions, 6 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.
diff --git a/include/asterisk/bridge_internal.h b/include/asterisk/bridge_internal.h
index 871abb8c5..e9726a1ab 100644
--- a/include/asterisk/bridge_internal.h
+++ b/include/asterisk/bridge_internal.h
@@ -87,6 +87,8 @@ struct ast_bridge *bridge_alloc(size_t size, const struct ast_bridge_methods *v_
* \param self Bridge to operate upon. (Tolerates a NULL pointer)
* \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 self on success
* \retval NULL on failure, self is already destroyed
@@ -96,13 +98,13 @@ struct ast_bridge *bridge_alloc(size_t size, const struct ast_bridge_methods *v_
* \code
* struct ast_bridge *bridge;
* bridge = bridge_alloc(sizeof(*bridge), &ast_bridge_base_v_table);
- * bridge = bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_FLAG_DISSOLVE_HANGUP);
+ * bridge = bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_FLAG_DISSOLVE_HANGUP, NULL, NULL);
* \endcode
*
* This creates a no frills two party bridge that will be
* destroyed once one of the channels hangs up.
*/
-struct ast_bridge *bridge_base_init(struct ast_bridge *self, uint32_t capabilities, unsigned int flags);
+struct ast_bridge *bridge_base_init(struct ast_bridge *self, uint32_t capabilities, unsigned int flags, const char *creator, const char *name);
/*!
* \internal
diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h
index 56e039b43..ac5c64893 100644
--- a/include/asterisk/stasis_app.h
+++ b/include/asterisk/stasis_app.h
@@ -597,11 +597,12 @@ int stasis_app_control_queue_control(struct stasis_app_control *control,
* \brief Create a bridge of the specified type.
*
* \param type The type of bridge to be created
+ * \param name Optional name to give to the bridge
*
* \return New bridge.
* \return \c NULL on error.
*/
-struct ast_bridge *stasis_app_bridge_create(const char *type);
+struct ast_bridge *stasis_app_bridge_create(const char *type, const char *name);
/*!
* \brief Returns the bridge with the given id.
diff --git a/include/asterisk/stasis_bridges.h b/include/asterisk/stasis_bridges.h
index 9412bf0b7..2d15a3332 100644
--- a/include/asterisk/stasis_bridges.h
+++ b/include/asterisk/stasis_bridges.h
@@ -42,6 +42,10 @@ struct ast_bridge_snapshot {
AST_STRING_FIELD(technology);
/*! Bridge subclass that is handling the bridge */
AST_STRING_FIELD(subclass);
+ /*! Creator of the bridge */
+ AST_STRING_FIELD(creator);
+ /*! Name given to the bridge by its creator */
+ AST_STRING_FIELD(name);
);
/*! AO2 container of bare channel uniqueid strings participating in the bridge.
* Allocated from ast_str_container_alloc() */