[asterisk-bugs] [JIRA] (ASTERISK-22044) Set a cause code on a channel when it is ejected from a bridge

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Jul 7 21:39:03 CDT 2013


Matt Jordan created ASTERISK-22044:
--------------------------------------

             Summary: Set a cause code on a channel when it is ejected from a bridge
                 Key: ASTERISK-22044
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22044
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/Bridging
    Affects Versions: 12
            Reporter: Matt Jordan
      Target Release: 12


This addresses the following issues in {{main/bridging.c}}:


{noformat}
void ast_bridge_change_state_nolock(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_state new_state)
{
/* BUGBUG need cause code for the bridge_channel leaving the bridge. */
	if (bridge_channel->state != AST_BRIDGE_CHANNEL_STATE_WAIT) {
		return;
	}

	ast_debug(1, "Setting %p(%s) state from:%d to:%d\n",
		bridge_channel, ast_channel_name(bridge_channel->chan), bridge_channel->state,
		new_state);

	/* Change the state on the bridge channel */
	bridge_channel->state = new_state;

	bridge_channel_poke(bridge_channel);
}
{noformat}

And:

{noformat}
static void bridge_dissolve(struct ast_bridge *bridge)
{
	struct ast_bridge_channel *bridge_channel;
	struct ast_frame action = {
		.frametype = AST_FRAME_BRIDGE_ACTION,
		.subclass.integer = AST_BRIDGE_ACTION_DEFERRED_DISSOLVING,
	};

	if (bridge->dissolved) {
		return;
	}
	bridge->dissolved = 1;

	ast_debug(1, "Bridge %s: dissolving bridge\n", bridge->uniqueid);

/* BUGBUG need a cause code on the bridge for the later ejected channels. */
	AST_LIST_TRAVERSE(&bridge->channels, bridge_channel, entry) {
		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
	}

	/* Must defer dissolving bridge because it is already locked. */
	ast_bridge_queue_action(bridge, &action);
}
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list