<div dir="ltr">Robert,<div><br></div><div>I kept it simple b/c my needs are simple — the marker file is an empty file with the filename matching the conference name. Then all of my conference recordings have the filename format [conf name]_[uuid].mp4</div><div><br></div><div>From there it’s pretty trivial to perform the matching. I think this method would fall down if I were recording multiple sequential files in the same conference, but I don’t ever do that. The next level would be also including the uuid in the marker filename, but I didn’t feel like doing the work to pass it down into the conference event for matching purposes.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 18, 2017 at 10:32 AM, Mundkowsky, Robert <span dir="ltr">&lt;<a href="mailto:rmundkowsky@ets.org" target="_blank">rmundkowsky@ets.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-4791781436845373233WordSection1">
<p class="MsoNormal"><a name="m_-4791781436845373233__MailEndCompose"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">If you have multiple conferences, is there a way to tell which file is for which conference?
<u></u><u></u></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Robert
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-<wbr>bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Chad Phillips<br>
<b>Sent:</b> Tuesday, April 18, 2017 11:25 AM<br>
<b>To:</b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>&gt;<br>
<b>Subject:</b> Re: [Freeswitch-users] Post-processing conference recording<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Thought I&#39;d follow up on this with my final implementation, which was a bit different than my original plan. It&#39;s certainly not as straightforward or elegant as I&#39;d hoped, but it works :)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The main sticky point is dealing with the Linux file permissions -- FreeSWITCH by default saves the recordings under the user and group it&#39;s running as, with 660 perms. Since the webserver and the node process both run under separate users
 as well, it made more sense to have the root user deal with the file manipulation. So...<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">1. Create a special directory to hold &#39;marker files&#39;, writeable by the FreeSWITCH user<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">2. Node process listens for the &#39;conference-destroy&#39; event (this doesn&#39;t seem to be a well-documented event, but it exists!)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">3. Since the file cleanup in mod_conference happens after the conference-destroy event, wait a small amount of time after receiving the event<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">4. Drop a marker file in the marker file directory<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">5. Run a periodic root cron job that inspects the marker file directory for new files, and process the ended recordings as necessary<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">This allows the cron idea offered by Sebastian without the concern about untimely moving of a file raised by Giovanni.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Apr 17, 2017 at 2:07 AM, Giovanni Maruzzelli &lt;<a href="mailto:gmaruzz@gmail.com" target="_blank">gmaruzz@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">Provided you&#39;re using Unix you can set up a simple cron job at an<br>
interval of your choice that checks for *.mp4 files in your recordings<br>
directory and in case it finds some moves them over to your web<br>
directory with the permissions you want.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Nope, you&#39;ll never be sure you are not moving files FreeSWITCH is actively writing to (eg, recording not yet ended).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I would go your way Chad, with a slight old-skool variation like doing that in a perl while loop (are that javascript thingies actually working? ;) )<span style="color:#888888"><br clear="all">
<br>
<span class="m_-4791781436845373233hoenzb">-- <u></u><u></u></span></span></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888"><br>
Sincerely,<br>
<br>
Giovanni Maruzzelli<br>
OpenTelecom.IT<br>
cell: +39 347 266 56 18</span><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
<br>
<hr>
<p>This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender;
 do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.</p>
<br>
<p>Thank you for your compliance.</p>
<hr>
</div>

<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>