<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/1546/">https://reviewboard.asterisk.org/r/1546/</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;">This would send the CEL events when music on hold was started, not necessarily when there is an actual hold event. Some modules, e.g. confbridge, start music on hold without it really being an actual &quot;hold&quot;. Hold events are signified by the AST_CONTROL_HOLD/UNHOLD frames. It seems like a better place to do this might be in __ast_read() when we see those control frames.</pre>
 <br />







<p>- Terry</p>


<br />
<p>On October 26th, 2011, 4:32 p.m., whardier wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/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.</div>
<div>By whardier.</div>


<p style="color: grey;"><i>Updated Oct. 26, 2011, 4:32 p.m.</i></p>




<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 may help call centers and phone system administrators who are compiling analytic information based on call hold times or need events based notification of a call being placed on hold.

I liked the idea of querying CEL database sources for hold time information. In my workplace too many people hog phone calls and it&#39;s difficult to find a diplomatic solution that doesn&#39;t involve restricting call count.

On top of that I will be using ImportVar to check for the absence of a HOLDING channel variable for tagged channels in a list. Doing so allows me to automate through generic user interfaces and AMI hooks actions to be done on an active conversation - transfers, spying, and using ChanSPY and Playback for automated audio delivery. The goal here is to select the currently active call.

Using channel-&gt;moh_state might not work for what I want or be as predictable as I need it to be and it requires res_musiconhold to boot.

I&#39;d prefer to write a helper function to query the channel var without using ImportVar but I wanted to get feedback first.

Also.. there is a potential problem with res_musiconhold where if there was a problem with initializing music on hold an event isn&#39;t passed to AMI, however when a call is removed from hold an event is sent regardless.</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;">Brought into trunk from 1.8.4 where under 1.8.4 Linksys SPA9xx series phones and Bria 3 soft phone was used to test holding.

Tested under 1.8.7 and current (today) trunk using twinkle (two twinkle instances)</pre>
  </td>
 </tr>
</table>



<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-18037">ASTERISK-18037</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/include/asterisk/cel.h <span style="color: grey">(342541)</span></li>

 <li>/trunk/main/cel.c <span style="color: grey">(342541)</span></li>

 <li>/trunk/main/channel.c <span style="color: grey">(342541)</span></li>

 <li>/trunk/res/res_musiconhold.c <span style="color: grey">(342541)</span></li>

</ul>

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




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








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