[Freeswitch-users] Post-processing conference recording
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
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
> ;) )
> Giovanni Maruzzelli
> cell: +39 347 266 56 18
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users