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
This commit is contained in:
Richard Mudgett
2013-08-21 15:51:19 +00:00
parent 25e38dfc9b
commit d213dfa30f
10 changed files with 375 additions and 264 deletions

View File

@@ -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");