diff options
Diffstat (limited to 'include/asterisk/bridging.h')
-rw-r--r-- | include/asterisk/bridging.h | 198 |
1 files changed, 1 insertions, 197 deletions
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h index bc16ae0bc..7e22dba64 100644 --- a/include/asterisk/bridging.h +++ b/include/asterisk/bridging.h @@ -447,7 +447,7 @@ void ast_bridge_notify_masquerade(struct ast_channel *chan); * If channel specific features are enabled a pointer to the features structure * can be specified in the features parameter. */ -enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, +enum bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, @@ -884,202 +884,6 @@ enum ast_transfer_result ast_bridge_transfer_blind(int is_external, */ enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target); -/*! - * \brief Set channel to goto specific location after the bridge. - * \since 12.0.0 - * - * \param chan Channel to setup after bridge goto location. - * \param context Context to goto after bridge. - * \param exten Exten to goto after bridge. - * \param priority Priority to goto after bridge. - * - * \note chan is locked by this function. - * - * \details Add a channel datastore to setup the goto location - * when the channel leaves the bridge and run a PBX from there. - * - * \return Nothing - */ -void ast_after_bridge_set_goto(struct ast_channel *chan, const char *context, const char *exten, int priority); - -/*! - * \brief Set channel to run the h exten after the bridge. - * \since 12.0.0 - * - * \param chan Channel to setup after bridge goto location. - * \param context Context to goto after bridge. - * - * \note chan is locked by this function. - * - * \details Add a channel datastore to setup the goto location - * when the channel leaves the bridge and run a PBX from there. - * - * \return Nothing - */ -void ast_after_bridge_set_h(struct ast_channel *chan, const char *context); - -/*! - * \brief Set channel to go on in the dialplan after the bridge. - * \since 12.0.0 - * - * \param chan Channel to setup after bridge goto location. - * \param context Current context of the caller channel. - * \param exten Current exten of the caller channel. - * \param priority Current priority of the caller channel - * \param parseable_goto User specified goto string from dialplan. - * - * \note chan is locked by this function. - * - * \details Add a channel datastore to setup the goto location - * when the channel leaves the bridge and run a PBX from there. - * - * If parseable_goto then use the given context/exten/priority - * as the relative position for the parseable_goto. - * Else goto the given context/exten/priority+1. - * - * \return Nothing - */ -void ast_after_bridge_set_go_on(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *parseable_goto); - -/*! - * \brief Setup any after bridge goto location to begin execution. - * \since 12.0.0 - * - * \param chan Channel to setup after bridge goto location. - * - * \note chan is locked by this function. - * - * \details Pull off any after bridge goto location datastore and - * setup for dialplan execution there. - * - * \retval 0 on success. The goto location is set for a PBX to run it. - * \retval non-zero on error or no goto location. - * - * \note If the after bridge goto is set to run an h exten it is - * run here immediately. - */ -int ast_after_bridge_goto_setup(struct ast_channel *chan); - -/*! - * \brief Run a PBX on any after bridge goto location. - * \since 12.0.0 - * - * \param chan Channel to execute after bridge goto location. - * - * \note chan is locked by this function. - * - * \details Pull off any after bridge goto location datastore - * and run a PBX at that location. - * - * \note On return, the chan pointer is no longer valid because - * the channel has hung up. - * - * \return Nothing - */ -void ast_after_bridge_goto_run(struct ast_channel *chan); - -/*! - * \brief Discard channel after bridge goto location. - * \since 12.0.0 - * - * \param chan Channel to discard after bridge goto location. - * - * \note chan is locked by this function. - * - * \return Nothing - */ -void ast_after_bridge_goto_discard(struct ast_channel *chan); - -/*! - * \brief Read after bridge goto if it exists - * \since 12.0.0 - * - * \param chan Channel to read the after bridge goto parseable goto string from - * \param buffer Buffer to write the after bridge goto data to - * \param buf_size size of the buffer being written to - */ -void ast_after_bridge_goto_read(struct ast_channel *chan, char *buffer, size_t buf_size); - -/*! Reason the the after bridge callback will not be called. */ -enum ast_after_bridge_cb_reason { - /*! The datastore is being destroyed. Likely due to hangup. (Enum value must be zero.) */ - AST_AFTER_BRIDGE_CB_REASON_DESTROY, - /*! Something else replaced the callback with another. */ - AST_AFTER_BRIDGE_CB_REASON_REPLACED, - /*! The callback was removed because of a masquerade. (fixup) */ - AST_AFTER_BRIDGE_CB_REASON_MASQUERADE, - /*! The channel was departed from the bridge. */ - AST_AFTER_BRIDGE_CB_REASON_DEPART, - /*! Was explicitly removed by external code. */ - AST_AFTER_BRIDGE_CB_REASON_REMOVED, -}; - -/*! - * \brief After bridge callback failed. - * \since 12.0.0 - * - * \param reason Reason callback is failing. - * \param data Extra data what setup the callback wanted to pass. - * - * \note Called when the channel leaves the bridging system or - * is destroyed. - * - * \return Nothing - */ -typedef void (*ast_after_bridge_cb_failed)(enum ast_after_bridge_cb_reason reason, void *data); - -/*! - * \brief After bridge callback function. - * \since 12.0.0 - * - * \param chan Channel just leaving bridging system. - * \param data Extra data what setup the callback wanted to pass. - * - * \return Nothing - */ -typedef void (*ast_after_bridge_cb)(struct ast_channel *chan, void *data); - -/*! - * \brief Discard channel after bridge callback. - * \since 12.0.0 - * - * \param chan Channel to discard after bridge callback. - * \param reason Why are we doing this. - * - * \note chan is locked by this function. - * - * \return Nothing - */ -void ast_after_bridge_callback_discard(struct ast_channel *chan, enum ast_after_bridge_cb_reason reason); - -/*! - * \brief Setup an after bridge callback for when the channel leaves the bridging system. - * \since 12.0.0 - * - * \param chan Channel to setup an after bridge callback on. - * \param callback Function to call when the channel leaves the bridging system. - * \param failed Function to call when it will not be calling the callback. - * \param data Extra data to pass with the callback. - * - * \note chan is locked by this function. - * - * \note failed is called when the channel leaves the bridging - * system or is destroyed. - * - * \retval 0 on success. - * \retval -1 on error. - */ -int ast_after_bridge_callback_set(struct ast_channel *chan, ast_after_bridge_cb callback, ast_after_bridge_cb_failed failed, void *data); - -/*! - * \brief Get a string representation of an after bridge callback reason - * \since 12.0.0 - * - * \param reason The reason to interpret to a string - * \retval NULL Unrecognized reason - * \retval non-NULL String representation of reason - */ -const char *ast_after_bridge_cb_reason_string(enum ast_after_bridge_cb_reason reason); /*! * \brief Get a container of all channels in the bridge |