[Freeswitch-users] Post-processing conference recording

Mundkowsky, Robert rmundkowsky at ets.org
Thu Apr 20 18:41:50 MSD 2017


We did something similar and I think it works. I just prefer to have something that is trigger based rather than polling.  And I am not sure how long a recording might get delayed due to buffering or maybe blocking.

Robert

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Oleg Stolyar
Sent: Thursday, April 20, 2017 10:21 AM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Post-processing conference recording

I just have my cron job look for recording files that are at least 1 min old.
This way I know I am not moving active files.  In my case, I can live with a 1-2 minute delay.

Also, in this case I don't need any FS events to tell me whether the conference ended or marker files.

Are there any issues with this approach that I am missing?

On Thu, Apr 20, 2017 at 6:56 AM, Brian West <brian at freeswitch.org<mailto:brian at freeswitch.org>> wrote:
You have conference-destroy events, or you can turn on conference CDRs then consume those and process the recordings from that data.

/b


On Tue, Apr 18, 2017 at 4:39 PM, Chad Phillips <chad at apartmentlines.com<mailto:chad at apartmentlines.com>> wrote:
Robert,

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

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.

On Tue, Apr 18, 2017 at 10:32 AM, Mundkowsky, Robert <rmundkowsky at ets.org<mailto:rmundkowsky at ets.org>> wrote:
If you have multiple conferences, is there a way to tell which file is for which conference?

Robert

From: freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org> [mailto:freeswitch-users-bounces at lists.freeswitch.org<mailto:freeswitch-users-bounces at lists.freeswitch.org>] On Behalf Of Chad Phillips
Sent: Tuesday, April 18, 2017 11:25 AM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org<mailto:freeswitch-users at lists.freeswitch.org>>
Subject: Re: [Freeswitch-users] Post-processing conference recording

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 event
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<mailto:gmaruzz at gmail.com>> wrote:

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


________________________________

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.


Thank you for your compliance.

________________________________

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto: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<mailto: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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto: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<mailto: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



--

Brian West
brian at freeswitch.org<mailto:brian at freeswitch.org>

Twitter: @FreeSWITCH , @briankwest

http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

Book a phone call (CST)<https://freeswitch.com/appointment>

Allison prompts for FreeSWITCH:

https://www.gofundme.com/allison-prompts-for-freeswitch


Got Bugs? Report them here<https://freeswitch.org/jira>! | Reddit: /r/freeswitch<https://www.reddit.com/r/freeswitch>

T:+19184209001<tel:(918)%20420-9001> | F:+19184209002<tel:(918)%20420-9002> | M:+1918424WEST (9378)
Skype:briankwest

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto: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<mailto: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


________________________________

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.


Thank you for your compliance.

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170420/21448dbf/attachment-0001.html 


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