mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-21 04:03:28 +00:00
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:
@@ -1699,7 +1699,7 @@ int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan)
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = ast_bridge_channel_queue_callback(bridge_channel, kick_it, NULL, 0);
|
||||
res = ast_bridge_channel_queue_callback(bridge_channel, 0, kick_it, NULL, 0);
|
||||
|
||||
ast_bridge_unlock(bridge);
|
||||
|
||||
@@ -2963,6 +2963,7 @@ int ast_bridge_talk_detector_hook(struct ast_bridge_features *features,
|
||||
}
|
||||
|
||||
int ast_bridge_interval_hook(struct ast_bridge_features *features,
|
||||
enum ast_bridge_hook_timer_option flags,
|
||||
unsigned int interval,
|
||||
ast_bridge_hook_callback callback,
|
||||
void *hook_pvt,
|
||||
@@ -2984,8 +2985,9 @@ int ast_bridge_interval_hook(struct ast_bridge_features *features,
|
||||
}
|
||||
hook->generic.type = AST_BRIDGE_HOOK_TYPE_TIMER;
|
||||
hook->timer.interval = interval;
|
||||
hook->timer.trip_time = ast_tvadd(ast_tvnow(), ast_samp2tv(hook->timer.interval, 1000));
|
||||
hook->timer.trip_time = ast_tvadd(ast_tvnow(), ast_samp2tv(interval, 1000));
|
||||
hook->timer.seqno = ast_atomic_fetchadd_int((int *) &features->interval_sequence, +1);
|
||||
hook->timer.flags = flags;
|
||||
|
||||
ast_debug(1, "Putting interval hook %p with interval %u in the heap on features %p\n",
|
||||
hook, hook->timer.interval, features);
|
||||
|
Reference in New Issue
Block a user