[Home]

Summary:ASTERISK-21882: Bridge API Enhancements - ensure that n-1 channels leaving a multi-party bridge ejects the last channel
Reporter:Matt Jordan (mjordan)Labels:Asterisk12
Date Opened:2013-06-07 09:05:12Date Closed:2013-07-12 16:11:01
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Bridging
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This issue is to address the BUGBUG comment in {{bridging_basic}}:

{noformat}
static int basic_hangup_hook(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
/* BUGBUG Race condition.  If all parties but one hangup at the same time, the bridge may not be dissolved on the remaining party. */
ast_bridge_channel_lock_bridge(bridge_channel);
if (2 < bridge_channel->bridge->num_channels) {
/* Just allow this channel to leave the multi-party bridge. */
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
}
ast_bridge_unlock(bridge_channel->bridge);
return 0;
}
{noformat}

The issue here is that if the bridge is currently in a multi-party mixing state, and {{n - 1}} channels leave, we should naturally transition to a two-party bridge with a single channel it. That should eject that channel from the bridge and the bridge should be disposed of.
Comments: