diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-07-03 22:36:38 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-07-03 22:36:38 +0000 |
commit | 0227e00eb3d76f933c13d7d96be7fcba6dfbf24e (patch) | |
tree | 38922ad19b67d67640cd04d26c2751ac4db36742 /include/asterisk/bridging_features.h | |
parent | ad5dc3c159081d792b879b1bc29935cc79cc09b0 (diff) |
OneTouchRecord: Make so Monitor/MixMonitor can be toggled/started/stopped.
The OneTouchRecord feature has historically been a toggle. This patch
adds the ability to make the OneTouchRecord hook optionally start/stop
recording only. If OneTouchRecord is already doing what is requested then
only the invoker hears the courtesy tone and/or start/stop recording
message.
The new feature is written so we could easily add explicit start/stop
recording DTMF hooks for Monitor and MixMonitor.
The majority of the changes in bridge_builtin_features.c is a refactoring
of the OneTouchRecord code (Monitor and MixMonitor versions) so it is easy
to direct the toggle/start/stop functionality.
Review: https://reviewboard.asterisk.org/r/2655/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/bridging_features.h')
-rw-r--r-- | include/asterisk/bridging_features.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/asterisk/bridging_features.h b/include/asterisk/bridging_features.h index 2a0511ec6..d03219705 100644 --- a/include/asterisk/bridging_features.h +++ b/include/asterisk/bridging_features.h @@ -267,6 +267,25 @@ struct ast_bridge_features_attended_transfer { char complete[MAXIMUM_DTMF_FEATURE_STRING]; }; +enum ast_bridge_features_monitor { + /*! Toggle start/stop of Monitor/MixMonitor. */ + AUTO_MONITOR_TOGGLE, + /*! Start Monitor/MixMonitor if not already started. */ + AUTO_MONITOR_START, + /*! Stop Monitor/MixMonitor if not already stopped. */ + AUTO_MONITOR_STOP, +}; + +struct ast_bridge_features_automonitor { + /*! Start/Stop behavior. */ + enum ast_bridge_features_monitor start_stop; +}; + +struct ast_bridge_features_automixmonitor { + /*! Start/Stop behavior. */ + enum ast_bridge_features_monitor start_stop; +}; + /*! * \brief Structure that contains configuration information for the limits feature */ @@ -330,6 +349,26 @@ int ast_bridge_features_register(enum ast_bridge_builtin_feature feature, ast_br int ast_bridge_features_unregister(enum ast_bridge_builtin_feature feature); /*! + * \brief Invoke a built in feature hook now. + * + * \param feature The feature to invoke + * + * \note This API call is only meant to be used by bridge + * subclasses and hook callbacks to request a builtin feature + * hook to be executed. + * + * \retval 0 on success + * \retval -1 on failure + * + * Example usage: + * + * \code + * ast_bridge_features_do(AST_BRIDGE_BUILTIN_ATTENDED_TRANSFER, bridge, bridge_channel, hook_pvt); + * \endcode + */ +int ast_bridge_features_do(enum ast_bridge_builtin_feature feature, struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt); + +/*! * \brief Attach interval hooks to a bridge features structure * * \param features Bridge features structure |