<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 17, 2014 at 11:52 AM, Bryant Zimmerman <span dir="ltr"><<a href="mailto:BryantZ@zktech.com" target="_blank">BryantZ@zktech.com</a>></span> wrote:<br>
<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:arial,helvetica,sans-serif;font-size:12px"><div>A simple way that we use to do the move is to create a cron job that looks for a .move file.</div>


<div>It has the same name as the recorded file. asterisk writes the .move file which is just a text file with some stats in it.</div>

<div>The .move file is written from the dial plan  at the end of the recording.</div>

<div>In the exten = h we write a .delete file for an abandon call.</div>

<div> </div>

<div>The cron then processes the .move and .delete files at a given interval. We actually write special instructions into our .move files that the cron parses and can then act accordingly. So we have a single smart cron job handling moves for each type of task. In some cases our .delete files are processed as moves to an abandon cache for recovery if a customer did not intend to abandon it.</div>


<div> </div>

<div>The sky's the limit on how complex you want to make it, but in the long run it is fairly simple and it just works.</div>

<div> </div>

<div>Thanks<br>
<br>
Bryant Zimmerman (ZK Tech Inc.)<br>
<a href="tel:616-855-1030%20Ext.%202003" value="+16168551030" target="_blank">616-855-1030 Ext. 2003</a></div></span><br></blockquote><div><br></div><div>We record locally and move the files to the storage server with a cron job once a minute. The script uses lsof to check to see if Asterisk is writing to the file.<br>
<br>/usr/sbin/lsof | grep filename | wc -l<br><br></div><div>Thanks,<br></div><div>Ryan <br></div></div></div></div>