summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/bridge.h31
-rw-r--r--include/asterisk/bridge_channel.h13
2 files changed, 44 insertions, 0 deletions
diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h
index 973490769..9522962bc 100644
--- a/include/asterisk/bridge.h
+++ b/include/asterisk/bridge.h
@@ -563,6 +563,37 @@ int ast_bridge_depart(struct ast_channel *chan);
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan);
/*!
+ * \brief Kick a channel from a bridge
+ *
+ * \param bridge Bridge that the channel is to be kicked from
+ * \param chan Channel to kick
+ *
+ * \retval 0 on success
+ * \retval -1 on failure
+ *
+ * Example usage:
+ *
+ * \code
+ * ast_bridge_kick(bridge, chan);
+ * \endcode
+ *
+ * \details
+ * This kicks the channel pointed to by the chan pointer from
+ * the bridge pointed to by the bridge pointer and requests that
+ * it be hung up. Control over the channel will NOT be given to
+ * the calling thread.
+ *
+ * \note The functional difference between ast_bridge_kick() and
+ * ast_bridge_remove() is that the bridge may dissolve as a
+ * result of the channel being kicked.
+ *
+ * \note This API call can be used on channels that were added
+ * to the bridge using both ast_bridge_join and
+ * ast_bridge_impart.
+ */
+int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan);
+
+/*!
* \brief Merge two bridges together
*
* \param dst_bridge Destination bridge of merge.
diff --git a/include/asterisk/bridge_channel.h b/include/asterisk/bridge_channel.h
index 32ef66248..39526611a 100644
--- a/include/asterisk/bridge_channel.h
+++ b/include/asterisk/bridge_channel.h
@@ -583,6 +583,19 @@ int ast_bridge_channel_queue_callback(struct ast_bridge_channel *bridge_channel,
int ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, const char *parkee_uuid,
const char *parker_uuid, const char *app_data);
+/*!
+ * \brief Kick the channel out of the bridge.
+ * \since 12.0.0
+ *
+ * \param bridge_channel Which channel is being kicked or hungup.
+ *
+ * \note This is intended to be called by bridge hooks and the
+ * bridge channel thread.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_kick(struct ast_bridge_channel *bridge_channel);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif