<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6495">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bridge : Fix one-way direct-media when early bridging with native_rtp<br><br>When two channels were early bridged in a native_rtp bridge, the RTP description<br>on one side was not updated when the other side answered.<br>This patch forbids non-answered channels to enter a native_rtp bridge, and<br>triggers a bridge reconfiguration when an ANSWER frame is received.<br><br>ASTERISK-27257<br><br>Change-Id: If1aaee1b4ed9658a1aa91ab715ee0a6413b878df<br>---<br>M bridges/bridge_native_rtp.c<br>M include/asterisk/bridge_technology.h<br>M main/bridge_channel.c<br>3 files changed, 9 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c<br>index 58af24c..122c132 100644<br>--- a/bridges/bridge_native_rtp.c<br>+++ b/bridges/bridge_native_rtp.c<br>@@ -600,7 +600,8 @@<br> */<br> static int native_rtp_bridge_capable(struct ast_channel *chan)<br> {<br>- return !ast_channel_has_hook_requiring_audio(chan);<br>+ return !ast_channel_has_hook_requiring_audio(chan)<br>+ && ast_channel_state(chan) == AST_STATE_UP;<br> }<br> <br> /*!<br>diff --git a/include/asterisk/bridge_technology.h b/include/asterisk/bridge_technology.h<br>index 5add455..e4091e0 100644<br>--- a/include/asterisk/bridge_technology.h<br>+++ b/include/asterisk/bridge_technology.h<br>@@ -108,11 +108,13 @@<br> *<br> * \note On entry, bridge is already locked.<br> *<br>- * \note The bridge technology must tollerate a failed to join channel<br>+ * \note The bridge technology must tolerate a failed to join channel<br> * until it can be kicked from the bridge.<br> *<br> * \note A channel may be in a suspended state already when joining a bridge<br> * technology. The technology must handle this case.<br>+ *<br>+ * \note A channel may not be answered when joining a bridge technology.<br> */<br> int (*join)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel);<br> /*!<br>diff --git a/main/bridge_channel.c b/main/bridge_channel.c<br>index 0af688a..08aea5b 100644<br>--- a/main/bridge_channel.c<br>+++ b/main/bridge_channel.c<br>@@ -2258,6 +2258,10 @@<br> case AST_CONTROL_ANSWER:<br> if (ast_channel_state(chan) != AST_STATE_UP) {<br> ast_answer(chan);<br>+ ast_bridge_channel_lock_bridge(bridge_channel);<br>+ bridge_channel->bridge->reconfigured = 1;<br>+ bridge_reconfigured(bridge_channel->bridge, 0);<br>+ ast_bridge_unlock(bridge_channel->bridge);<br> } else {<br> ast_indicate(chan, -1);<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6495">change 6495</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6495"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If1aaee1b4ed9658a1aa91ab715ee0a6413b878df </div>
<div style="display:none"> Gerrit-Change-Number: 6495 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Jean Aunis - Prescom <jean.aunis@prescom.fr> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>