<div dir="ltr">Robert, reading through the code, the destroy event is fired before the closing of recorded files, so I share your concern about using that as a trigger. I currently get around that by simply putting a 10 second delay between receiving the event and writing my metadata file that says the recording can be moved.<div><br></div><div>Brian and Mike, thanks for the additional info on the conference CDR approach — sounds like that would be a more reliable thing to use as a trigger.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 9:02 AM, Mundkowsky, Robert <span dir="ltr"><<a href="mailto:rmundkowsky@ets.org" target="_blank">rmundkowsky@ets.org</a>></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_4901639104893752363WordSection1">
<p class="MsoNormal"><a name="m_4901639104893752363__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Just to be clear, I assume the mp4 recording is processed by a different thread, so even if the “conference-destroy” event triggered,
the writing to the mp4 files might shave not finished yet?<u></u><u></u></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Robert
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",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>Brian West<br>
<b>Sent:</b> Thursday, April 20, 2017 9:57 AM<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>><br>
<b>Subject:</b> Re: [Freeswitch-users] Post-processing conference recording<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">You have conference-destroy events, or you can turn on conference CDRs then consume those and process the recordings from that data.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">/b<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Apr 18, 2017 at 4:39 PM, Chad Phillips <<a href="mailto:chad@apartmentlines.com" target="_blank">chad@apartmentlines.com</a>> 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">Robert,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Apr 18, 2017 at 10:32 AM, Mundkowsky, Robert <<a href="mailto:rmundkowsky@ets.org" target="_blank">rmundkowsky@ets.org</a>> 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>
<div>
<p class="MsoNormal"><a name="m_4901639104893752363_m_7448767956729985877_m_-479178143684537"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If you have multiple conferences, is there a way
to tell which file is for which conference? </span></a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Robert
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",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 <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>><br>
<b>Subject:</b> Re: [Freeswitch-users] Post-processing conference recording</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Thought I'd follow up on this with my final implementation, which was a bit different than my original plan. It's certainly not as straightforward or elegant as I'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'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 'marker files', writeable by the FreeSWITCH user<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">2. Node process listens for the 'conference-destroy' event (this doesn'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 <<a href="mailto:gmaruzz@gmail.com" target="_blank">gmaruzz@gmail.com</a>> 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-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<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-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Provided you'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'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_4901639104893752363m7448767956729985877m-4791781436845373233hoenzb">-- </span></span><u></u><u></u></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>
<p class="MsoNormal"><u></u> <u></u></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p>Thank you for your compliance.<u></u><u></u></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</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>
<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"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p><b><i><span style="font-size:13.5pt;font-family:"Courier New"">Brian West</span></i></b><span style="font-family:"Courier New""><br>
</span><span style="font-size:10.0pt;font-family:"Courier New""><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span><u></u><u></u></p>
<p><b><i><span style="font-family:"Courier New"">Twitter: @FreeSWITCH , @briankwest</span></i></b><u></u><u></u></p>
<p><span style="font-size:10.0pt;font-family:"Courier New""><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a> <br>
<a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.<wbr>com</a></span><u></u><u></u></p>
<p><span style="font-size:10.0pt;font-family:"Courier New""><a href="https://freeswitch.com/appointment" target="_blank">Book a phone call (CST)</a><br>
<br>
Allison prompts for FreeSWITCH:</span><u></u><u></u></p>
<table class="m_4901639104893752363MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0in 0in 0in 0in">
<p><span style="font-size:9.5pt"><a href="https://www.gofundme.com/allison-prompts-for-freeswitch" target="_blank"><b>https://www.gofundme.com/<wbr>allison-prompts-for-freeswitch</b></a><u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size:9.5pt;font-family:"Courier New"">Got Bugs? Report them </span>
<a href="https://freeswitch.org/jira" target="_blank"><span style="font-size:9.5pt;font-family:"Courier New"">here</span></a><span style="font-size:9.5pt;font-family:"Courier New"">! | Reddit: </span><a href="https://www.reddit.com/r/freeswitch" target="_blank"><span style="font-size:9.5pt;font-family:"Courier New"">/r/freeswitch</span></a><u></u><u></u></p>
<p><b><span style="font-size:10.0pt;font-family:"Courier New"">T:</span></b><span style="font-size:10.0pt;font-family:"Courier New"">+19184209001 |
<b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br>
<b>Skype:</b>briankwest</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</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>