diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-07-08 14:26:40 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-07-08 14:26:40 +0000 |
commit | 30d379851e2d614d1b8bcc65fdb5952feb6d62de (patch) | |
tree | b3b42beaee73c653cc07a38ff1c85a3d9cc87091 /include/asterisk/core_local.h | |
parent | 7fdeb52910cd267ea8837d1246712e1a06812337 (diff) |
Create Local channel messages on the Stasis message bus and produce AMI events
This patch does the following:
* It adds a virtual table of callbacks to core_unreal. These callbacks can be
supplied by concrete implementations of "unreal" channel drivers, which lets
the unreal channel driver call specific functionality when it performs some
action. Currently, this is done to notify implementations when an
optimization operation has begun, and when an optimization operation has
succeeded.
* It adds Stasis-Core messages for Local channel bridging and Local channel
optimization. Local channel optimization is now two events: a Begin and an
End. Some consumers of Stasis-Core may want to know when an operation is
beginning so that they can 'prepare' their information; others will be more
concerned about when the operation has completed, so that they can 'fix up'
information. Stasis-Core allows for both, as does AMI.
Review: https://reviewboard.asterisk.org/r/2552
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/core_local.h')
-rw-r--r-- | include/asterisk/core_local.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/asterisk/core_local.h b/include/asterisk/core_local.h index 693c93b46..491112d2b 100644 --- a/include/asterisk/core_local.h +++ b/include/asterisk/core_local.h @@ -37,6 +37,7 @@ extern "C" { struct ast_channel; struct ast_bridge; struct ast_bridge_features; +struct stasis_message_type; /* ------------------------------------------------------------------- */ @@ -91,6 +92,44 @@ int ast_local_setup_masquerade(struct ast_channel *ast, struct ast_channel *masq /* ------------------------------------------------------------------- */ +/*! + * \brief Message type for when two local channel halves are bridged together + * \since 12.0.0 + * + * \note Payloads for the \ref ast_local_bridge_type are a \ref ast_multi_channel_blob. + * Roles for the channels in the \ref ast_multi_channel_blob are "1" and "2", reflecting + * the two halves. Unlike most other bridges, the 'bridge' between two local channels is + * not part of the bridge framework; as such, the message simply references the two local + * channel halves that are now bridged. + * + * \retval A \ref stasis message type + */ +struct stasis_message_type *ast_local_bridge_type(void); + +/*! + * \brief Message type for when a local channel optimization begins + * \since 12.0.0 + * + * \note Payloads for the \ref ast_local_optimization_begin_type are a + * \ref ast_multi_channel_blob. Roles for the channels in the \ref ast_multi_channel_blob + * are "1" and "2", reflecting the two halves. + * + * \retval A \ref stasis message type + */ +struct stasis_message_type *ast_local_optimization_begin_type(void); + +/*! + * \brief Message type for when a local channel optimization completes + * \since 12.0.0 + * + * \note Payloads for the \ref ast_local_optimization_end_type are a + * \ref ast_multi_channel_blob. Roles for the channels in the \ref ast_multi_channel_blob + * are "1" and "2", reflecting the two halves. + * + * \retval A \ref stasis message type + */ +struct stasis_message_type *ast_local_optimization_end_type(void); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |