[Freeswitch-users] Post-processing conference recording

Chad Phillips chad at apartmentlines.com
Tue Apr 18 19:25:17 MSD 2017

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 :)

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...

1. Create a special directory to hold 'marker files', writeable by the
FreeSWITCH user
2. Node process listens for the 'conference-destroy' event (this doesn't
seem to be a well-documented event, but it exists!)
3. Since the file cleanup in mod_conference happens after the
conference-destroy event, wait a small amount of time after receiving the
4. Drop a marker file in the marker file directory
5. Run a periodic root cron job that inspects the marker file directory for
new files, and process the ended recordings as necessary

This allows the cron idea offered by Sebastian without the concern about
untimely moving of a file raised by Giovanni.

On Mon, Apr 17, 2017 at 2:07 AM, Giovanni Maruzzelli <gmaruzz at gmail.com>

>> Provided you're using Unix you can set up a simple cron job at an
>> interval of your choice that checks for *.mp4 files in your recordings
>> directory and in case it finds some moves them over to your web
>> directory with the permissions you want.
> Nope, you'll never be sure you are not moving files FreeSWITCH is actively
> writing to (eg, recording not yet ended).
> 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?
> ;) )
> --
> Sincerely,
> Giovanni Maruzzelli
> OpenTelecom.IT
> cell: +39 347 266 56 18
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170418/e8613121/attachment-0001.html 

Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list