bridge : Fix one-way direct-media when early bridging with native_rtp

When two channels were early bridged in a native_rtp bridge, the RTP description
on one side was not updated when the other side answered.
This patch forbids non-answered channels to enter a native_rtp bridge, and
triggers a bridge reconfiguration when an ANSWER frame is received.

ASTERISK-27257

Change-Id: If1aaee1b4ed9658a1aa91ab715ee0a6413b878df
This commit is contained in:
Jean Aunis
2017-09-07 11:41:09 +02:00
committed by Richard Mudgett
parent 4bde3d8634
commit da40976987
3 changed files with 9 additions and 2 deletions

View File

@@ -2258,6 +2258,10 @@ static void bridge_channel_handle_control(struct ast_bridge_channel *bridge_chan
case AST_CONTROL_ANSWER:
if (ast_channel_state(chan) != AST_STATE_UP) {
ast_answer(chan);
ast_bridge_channel_lock_bridge(bridge_channel);
bridge_channel->bridge->reconfigured = 1;
bridge_reconfigured(bridge_channel->bridge, 0);
ast_bridge_unlock(bridge_channel->bridge);
} else {
ast_indicate(chan, -1);
}