<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/4549/">https://reviewboard.asterisk.org/r/4549/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">One thing to take into consideration here is that there are some places within Asterisk where we will send an AST_CONTROL_UNHOLD frame on a channel, even though it may not currently be on hold. This means you may send some unhold ARI events that don't match up with a previous hold event. This is probably worth documenting somewhere so that ARI application writers know what they might have to deal with.</pre>
 <br />









<p>- Mark Michelson</p>


<br />
<p>On March 28th, 2015, 3:19 a.m. UTC, 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 and Joshua Colp.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated March 28, 2015, 3:19 a.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-24922">ASTERISK-24922</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;">For some applications - such as SLA - a phone pressing hold should not behave in the fashion that the Asterisk core would like it to. Instead, the hold action has some application specific behaviour associated with it - such as disconnecting the channel that initiated the hold; only playing MoH to channels in the bridge if the channels are of a particular type, etc.

One way of accomplishing this is to use a framehook to intercept the hold/unhold frames, raise an event, and eat the frame. Tasty. The patch attached to this issue accomplished that as a new dialplan function, HOLD_INTERCEPT.

In addition:
* ARI now queues hold/unhold frames instead of indicating frames directly. This allows for the Stasis hold/unhold messages to be raised.
* Some general cleanup of raising hold/unhold Stasis messages was done, including removing some RAII_VAR usage.</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;">See Gerrit reviews:

https://gerrit.asterisk.org/#/c/16
https://gerrit.asterisk.org/#/c/17</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/13/rest-api/api-docs/events.json <span style="color: grey">(433677)</span></li>

 <li>/branches/13/res/stasis/control.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/res/stasis/app.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/res/ari/ari_model_validators.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/res/ari/ari_model_validators.h <span style="color: grey">(433677)</span></li>

 <li>/branches/13/main/stasis_channels.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/main/manager_channels.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/main/channel.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/main/bridge_channel.c <span style="color: grey">(433677)</span></li>

 <li>/branches/13/funcs/func_holdintercept.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/branches/13/CHANGES <span style="color: grey">(433677)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/4549/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>