summaryrefslogtreecommitdiff
path: root/bridges/bridge_builtin_interval_features.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-08-21 15:51:19 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-08-21 15:51:19 +0000
commitd213dfa30ffbc834dcc643beb46a8ba0b0f49f01 (patch)
tree2e9641ff56b0a301ecb4e312654392142800abbe /bridges/bridge_builtin_interval_features.c
parent25e38dfc9b8a0dd96851f5de970e6a293e37dda6 (diff)
Fix several interrelated issues dealing with the holding bridge technology.
* Added an option flags parameter to interval hooks. Interval hooks now can specify if the callback will affect the media path or not. * Added an option flags parameter to the bridge action custom callback. The action callback now can specify if the callback will affect the media path or not. * Made the holding bridge technology reexamine the participant idle mode option whenever the entertainment is restarted. * Fixed app_agent_pool waiting agents needlessly starting and stopping MOH every second by specifying the heartbeat interval hook as not affecting the media path. * Fixed app_agent_pool agent alert from restarting the MOH after the alert beep. The agent entertainment is now changed from MOH to silence after the alert beep. * Fixed holding bridge technology to defer starting the entertainment. It was previously a mixture of immediate and deferred. * Fixed holding bridge technology to immediately stop the entertainment. It was previously a mixture of immediate and deferred. If the channel left the bridging system, any deferred stopping was discarded before taking effect. * Miscellaneous holding bridge technology rework coding improvements. Review: https://reviewboard.asterisk.org/r/2761/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'bridges/bridge_builtin_interval_features.c')
-rw-r--r--bridges/bridge_builtin_interval_features.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bridges/bridge_builtin_interval_features.c b/bridges/bridge_builtin_interval_features.c
index 6b8e91b1e..edaddf3ea 100644
--- a/bridges/bridge_builtin_interval_features.c
+++ b/bridges/bridge_builtin_interval_features.c
@@ -170,7 +170,8 @@ static int bridge_builtin_set_limits(struct ast_bridge_features *features,
/* Install limit hooks. */
ao2_ref(feature_limits, +1);
- if (ast_bridge_interval_hook(features, feature_limits->duration,
+ if (ast_bridge_interval_hook(features, AST_BRIDGE_HOOK_TIMER_OPTION_MEDIA,
+ feature_limits->duration,
bridge_features_duration_callback, feature_limits, __ao2_cleanup, remove_flags)) {
ast_log(LOG_ERROR, "Failed to schedule the duration limiter to the bridge channel.\n");
ao2_ref(feature_limits, -1);
@@ -178,7 +179,7 @@ static int bridge_builtin_set_limits(struct ast_bridge_features *features,
}
if (!ast_strlen_zero(feature_limits->connect_sound)) {
ao2_ref(feature_limits, +1);
- if (ast_bridge_interval_hook(features, 1,
+ if (ast_bridge_interval_hook(features, AST_BRIDGE_HOOK_TIMER_OPTION_MEDIA, 1,
bridge_features_connect_callback, feature_limits, __ao2_cleanup, remove_flags)) {
ast_log(LOG_WARNING, "Failed to schedule connect sound to the bridge channel.\n");
ao2_ref(feature_limits, -1);
@@ -186,7 +187,7 @@ static int bridge_builtin_set_limits(struct ast_bridge_features *features,
}
if (feature_limits->warning && feature_limits->warning < feature_limits->duration) {
ao2_ref(feature_limits, +1);
- if (ast_bridge_interval_hook(features,
+ if (ast_bridge_interval_hook(features, AST_BRIDGE_HOOK_TIMER_OPTION_MEDIA,
feature_limits->duration - feature_limits->warning,
bridge_features_warning_callback, feature_limits, __ao2_cleanup, remove_flags)) {
ast_log(LOG_WARNING, "Failed to schedule warning sound playback to the bridge channel.\n");