<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/2668/">https://reviewboard.asterisk.org/r/2668/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been discarded.</h1>
</td>
</tr>
</table>
<br />
<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.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, David Lee, kmoore, Matt Jordan, and rmudgett.</div>
<div>By jrose.</div>
<p style="color: grey;"><i>Updated July 12, 2013, 4:24 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-21592">ASTERISK-21592</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;">This works in the following manner:
On receiving the request, we first try to grab a reference to the bridge being played to in stasis. If it exists, we proceed.
>From here, a new type of unreal channel (core_announcer) is created. The ;2 part of this channel is then put into the bridge while the ;1 part is left dangling for a little while. For the rest of the playback starting operations, if anything fails this channel will be hungup.
Next a control structure is created for the new channel. This is one place where I think there might be contention on how things should be done...
Most of the rest of this process work in the same way as playback on a channel with the ;1 of the announcer channel being the target of playback. Once the playback is successfully queued, things start to deviate again.
With all of that in place, a new thread is spun off which will take care of executing the stasis_app_control pool until it is empty. If the thread is created successfully, we will succeed and put out a reply with a playback control object which can then be used to manipulate the playback as it runs.
Back on the other thread, the control queue will have all of its operations run continuously until the queue is empty at which point the channel will be hung up and the control object disposed of.</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;">Tested playback with channels put into a stasis bridge by a stasis application. In the process I hammered out a few validation bugs. I also made sure no allocations were left over in the bridging resource or the announcer and unreal channel drivers. That is hardly exhaustive though, as the actual places where objects are being allocated for this process are numerous.</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>/trunk/apps/confbridge/conf_chan_announce.c <span style="color: grey">(393998)</span></li>
<li>/trunk/include/asterisk/_private.h <span style="color: grey">(393998)</span></li>
<li>/trunk/include/asterisk/bridging.h <span style="color: grey">(393998)</span></li>
<li>/trunk/include/asterisk/channel.h <span style="color: grey">(393998)</span></li>
<li>/trunk/include/asterisk/core_announcer.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/stasis_app.h <span style="color: grey">(393998)</span></li>
<li>/trunk/include/asterisk/stasis_app_playback.h <span style="color: grey">(393998)</span></li>
<li>/trunk/main/asterisk.c <span style="color: grey">(393998)</span></li>
<li>/trunk/main/bridging.c <span style="color: grey">(393998)</span></li>
<li>/trunk/main/channel.c <span style="color: grey">(393998)</span></li>
<li>/trunk/main/core_announcer.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/res_stasis.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/res_stasis_http_bridges.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/res_stasis_http_playback.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/res_stasis_playback.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/stasis/control.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/stasis_http/resource_bridges.h <span style="color: grey">(393998)</span></li>
<li>/trunk/res/stasis_http/resource_bridges.c <span style="color: grey">(393998)</span></li>
<li>/trunk/res/stasis_http/resource_channels.c <span style="color: grey">(393998)</span></li>
<li>/trunk/rest-api/api-docs/bridges.json <span style="color: grey">(393998)</span></li>
<li>/trunk/rest-api/api-docs/playback.json <span style="color: grey">(393998)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2668/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>