<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3929/">https://reviewboard.asterisk.org/r/3929/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 29th, 2014, 3:52 p.m. CDT, <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/3929/diff/2/?file=66975#file66975line140" style="color: black; font-weight: bold; text-decoration: underline;">/branches/12/res/stasis/stasis_bridge.c</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static int bridge_stasis_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">140</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Optional nit: Extra blank line :)</pre>
</blockquote>
<p>On August 29th, 2014, 7:30 p.m. CDT, <b>Matt Jordan</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well, that extra blank line was there to prevent the conditional clauses in the if statement from lining up to closely with the code inside the if statement. I can remove the tabs for the conditional clauses and use spaces instead, but I'm not sure how much it will improve readability.</pre>
</blockquote>
<p>On August 29th, 2014, 8:29 p.m. CDT, <b>rmudgett</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't think simply removing the blank line alters the readability because the guidelines make it that way. Though mixing tabs and spaces tends to make people see red. :)</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">True, true. I can remove the spaces if desired. Formatting long if statements: blech.</pre>
<br />
<p>- Matt</p>
<br />
<p>On August 29th, 2014, 7:31 p.m. CDT, Matt Jordan wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Matt Jordan.</div>
<p style="color: grey;"><i>Updated Aug. 29, 2014, 7:31 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-24264">ASTERISK-24264</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When ARI manipulates a bridge, it generally doesn't care what the mixing technology is. Operations should initiate on the bridge regardless of its mixing technology - and while that mixing technology may determine the experience channels within the bridge have, the actual operations themselves should be the same.
This isn't the case with holding bridges. Currently, the following issues exist:
* Music on Hold is played into a bridge using an Announcer channel. There are two issues with it currently:
(1) The Music on Hold channel is also not marked as being allowed within a Stasis bridge, so it generally never makes it into the bridge (of any type).
(2) Even if it did, because it does not have a bridge role of "announcer", it joins the holding bridge as a participant. Additionally, the holding bridge starts MoH on the Announcer channel (which is ironic, but not super useful).
* Playback channels do not join as an announcer. Playing back announcements using the /play operation would not be heard by participants.
* Participants join without a role. As such, MoH is started for the channels automatically; however, subsequent bridge operations that would stop MoH would fail (as there is no Announcer channel playing MoH to the bridge). From the perspective of ARI users, this is counter-intuitive - I would not expect MoH to be started for me. The mixing technology determines how media is shared between participants, not the application experience.
This patch does the following:
* The Stasis bridge class now inspects channels as they are going into a bridge. If the bridge has a holding capability, and the channel has no roles, we give it a participant role and mark the default behaviour to have no entertainment. This allows addChannel operations to continue to set a participant role with an entertainment option if it felt like it (or could do it).
* The playback channel now gets a role of announcer, as does the music on hold channel. For mixing technologies this is a NoOp; for holding bridges it means the channels should have the expected behaviour.
* The music on hold channel is now Stasis approved (tm)
* Finally, a small bug in 'core show channel' was observed, in that we attempted to calculate CDR variables for internal channels. That generates an annoying warning; internal channels now no longer attempt to access CDR data.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The bridge-infinite-wait examples on the wiki (that Sam and I are working on) now ... work.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/branches/12/res/stasis/stasis_bridge.c <span style="color: grey">(422438)</span></li>
<li>/branches/12/res/res_stasis.c <span style="color: grey">(422438)</span></li>
<li>/branches/12/main/cli.c <span style="color: grey">(422438)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3929/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>