<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/2068/">https://reviewboard.asterisk.org/r/2068/</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;">I&#39;m pretty sure this in in Asterisk 10 and up only, but MixMonitor can record up to three files simultaneously write three separate files (I think the options are &#39;r&#39; and &#39;t&#39;, but I&#39;m not 100% sure), all of which would exhibit this problem. Two of them are unidirectional audio and one is the mixed audio stream. All of these should be addressed with this fix since they handle the file stream in the same basic manner.</pre>
 <br />







<p>- jrose</p>


<br />
<p>On August 14th, 2012, 4:49 p.m., elguero 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 elguero.</div>


<p style="color: grey;"><i>Updated Aug. 14, 2012, 4:49 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;">When the MixMonitor application is started, it creates an empty audio file (just the header is present) for writing an audio stream.

In the event that MixMonitor is started before dialing (in the case on the issue, record only a bridged channel) but the bridge never is setup due to the other side not answering or for whatever reason the bridge did not succeed in being created, MixMonitor does not clean up the empty audio file.  This has the effect of leaving empty audio files behind.

This proposed patch is a simple one.  I took a look at app_record to see how it handles files that do not contain any audio and proceeded to create this patch to match that behavior.</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;">Reproducing this issue is pretty straight forward.  I tested this patch on one of my local dev machines.  I have yet to get a response on the issue as to whether it is working for the original reporter.</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-20156">ASTERISK-20156</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>/branches/10/UPGRADE.txt <span style="color: grey">(371249)</span></li>

 <li>/branches/10/apps/app_mixmonitor.c <span style="color: grey">(371249)</span></li>

</ul>

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




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








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