diff options
Diffstat (limited to 'include/asterisk/core_unreal.h')
-rw-r--r-- | include/asterisk/core_unreal.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/asterisk/core_unreal.h b/include/asterisk/core_unreal.h index 9a8d2e1f5..cd8a2cdf7 100644 --- a/include/asterisk/core_unreal.h +++ b/include/asterisk/core_unreal.h @@ -46,6 +46,11 @@ struct ast_callid; struct ast_unreal_pvt; +enum ast_unreal_channel_indicator { + AST_UNREAL_OWNER, + AST_UNREAL_CHAN, +}; + /*! * \brief Callbacks that can be provided by concrete implementations of the unreal * channel driver that will be called when events occur in the unreal layer @@ -55,8 +60,14 @@ struct ast_unreal_pvt_callbacks { * \brief Called when an optimization attempt has started * \note p is locked when this callback is called * \param p The \ref ast_unreal_pvt object + * \param source The channel that is optimizing into an unreal_pvt channel's bridge. + * If NULL, the optimization is being accomplished via a bridge merge. + * \param dest Indicator of which channel's bridge in the unreal_pvt will survive the + * optimization + * \param id Unique identifier for this optimization operation. */ - void (* const optimization_started)(struct ast_unreal_pvt *p); + void (* const optimization_started)(struct ast_unreal_pvt *p, struct ast_channel *source, + enum ast_unreal_channel_indicator dest, unsigned int id); /*! * \brief Called when an optimization attempt completed successfully @@ -64,8 +75,10 @@ struct ast_unreal_pvt_callbacks { * \param p The \ref ast_unreal_pvt object * \param success Non-zero if the optimization succeeded, zero if the optimization * met with fatal and permanent error + * \param id Unique identifier for this optimization. Same as the one from the optimization_started + * call */ - void (* const optimization_finished)(struct ast_unreal_pvt *p); + void (* const optimization_finished)(struct ast_unreal_pvt *p, int success, unsigned int id); }; /*! |