Hi All, Is there a way in freeswitch wherein if the call recording is not successfully stored, it can store it in some separate path? Basically the idea is, I am planning to use NFS for data storage. So freeswitch is actually storing the recordings on an NFS mounted directory. For some reason, if the NFS mount fails, or if the disc on the storage server is full or whatever may be the reason, could there be a way that freeswitch can store it on a separate directory which is local to the server. Does this sound like a feature or a requirement?? Thanks. --- Jayesh
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup. 2012-12-27 20:05 keltezéssel, Jayesh Nambiar írta:
Hi All, Is there a way in freeswitch wherein if the call recording is not successfully stored, it can store it in some separate path? Basically the idea is, I am planning to use NFS for data storage. So freeswitch is actually storing the recordings on an NFS mounted directory. For some reason, if the NFS mount fails, or if the disc on the storage server is full or whatever may be the reason, could there be a way that freeswitch can store it on a separate directory which is local to the server. Does this sound like a feature or a requirement?? Thanks.
--- Jayesh
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Are there any particular suggestions for how to trigger that copy script afterwards, preferably with the path/name of the file that was just written? Also, the same thing when a file gets deleted. I didn't see an event being fired in those cases last time I checked. -Avi On Fri, Dec 28, 2012 at 12:20 AM, Puskás Zsolt <errotan@elder.hu> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
2012-12-27 20:05 keltezéssel, Jayesh Nambiar írta:
Hi All, Is there a way in freeswitch wherein if the call recording is not successfully stored, it can store it in some separate path? Basically the idea is, I am planning to use NFS for data storage. So freeswitch is actually storing the recordings on an NFS mounted directory.. For some reason, if the NFS mount fails, or if the disc on the storage server is full or whatever may be the reason, could there be a way that freeswitch can store it on a separate directory which is local to the server. Does this sound like a feature or a requirement?? Thanks.
--- Jayesh
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1 You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage. -MC
http://wiki.freeswitch.org/wiki/Channel_Variables#record_post_process_exec_a... On 12/27/2012 7:36 PM, Michael Collins wrote:
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu <mailto:errotan@elder.hu>> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage.
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
That gets triggered for VM too? How do you pass in the name of the file that was recorded? -Avi On Fri, Dec 28, 2012 at 2:50 AM, Abaci <abaci64@gmail.com> wrote:
http://wiki.freeswitch.org/wiki/Channel_Variables#record_post_process_exec_a...
On 12/27/2012 7:36 PM, Michael Collins wrote:
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage.
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I've never actually used that. I prefer to do all that stuff after the fact or in a hangup hook. -MC On Thu, Dec 27, 2012 at 5:08 PM, Avi Marcus <avi@avimarcus.net> wrote:
That gets triggered for VM too? How do you pass in the name of the file that was recorded?
-Avi
On Fri, Dec 28, 2012 at 2:50 AM, Abaci <abaci64@gmail.com> wrote:
http://wiki.freeswitch.org/wiki/Channel_Variables#record_post_process_exec_a...
On 12/27/2012 7:36 PM, Michael Collins wrote:
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage.
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
His question was about call recording not voicemail, not sure if that's triggered for voicemail (I think it is), you can probably add a var in mod_voicemail.c to the file_path and use that var in the post_process api/app. On 12/27/2012 8:08 PM, Avi Marcus wrote:
That gets triggered for VM too? How do you pass in the name of the file that was recorded?
-Avi
On Fri, Dec 28, 2012 at 2:50 AM, Abaci <abaci64@gmail.com <mailto:abaci64@gmail.com>> wrote:
http://wiki.freeswitch.org/wiki/Channel_Variables#record_post_process_exec_a...
On 12/27/2012 7:36 PM, Michael Collins wrote:
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu <mailto:errotan@elder.hu>> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage.
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com <http://www.cudatel.com/>
Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://wiki.freeswitch.org <http://wiki.freeswitch.org/> http://www.cluecon.com <http://www.cluecon.com/>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org <http://www.freeswitch.org/>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com <http://www.cudatel.com/>
Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://wiki.freeswitch.org <http://wiki.freeswitch.org/> http://www.cluecon.com <http://www.cluecon.com/>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org <http://www.freeswitch.org/>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
maybe look at inotifywait ( http://stackoverflow.com/questions/10533200/processing-data-with-inotify-too...) or http://code.google.com/p/lsyncd/ or use inotify in your own daemon if you want. On 28 December 2012 11:29, Abaci <abaci64@gmail.com> wrote:
His question was about call recording not voicemail, not sure if that's triggered for voicemail (I think it is), you can probably add a var in mod_voicemail.c to the file_path and use that var in the post_process api/app.
On 12/27/2012 8:08 PM, Avi Marcus wrote:
That gets triggered for VM too? How do you pass in the name of the file that was recorded?
-Avi
On Fri, Dec 28, 2012 at 2:50 AM, Abaci <abaci64@gmail.com> wrote:
http://wiki.freeswitch.org/wiki/Channel_Variables#record_post_process_exec_a...
On 12/27/2012 7:36 PM, Michael Collins wrote:
On Thu, Dec 27, 2012 at 2:20 PM, Puskás Zsolt <errotan@elder.hu> wrote:
Would be simpler and more reliable to store the file during the recording on the local machine (hard or RAM disk) than copy the file after hangup.
+1
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box). You could even write a daemon that runs constantly and waits for a lull in system activity and moves the files when things are quiet. You could get really fancy if you wanted to but I think most sysadmins around here would say: keep it simple, try a cron job that runs every 10 minutes or so and uses "nice" or something similar to make sure the copy process doesn't spike your disk, network, or cpu usage.
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Sincerely Jay
On Thu, Dec 27, 2012 at 5:36 PM, Michael Collins <msc@freeswitch.org> wrote:
You're better off doing a cron job that copies the files to the target host, confirms they made it, then deletes the files from the local host (i.e. the FreeSWITCH box).
I'm a fan of inotify's incron: http://inotify.aiken.cz/?section=incron&page=doc&lang=en Basically you configure incron to watch the files and dirs that you care about, and when it sees the type of activity that you're looking for, it will call the scripts that you'd like run on them. This will save me some typing, but give you a feel for how it works; from the docs: #################################################################### The user table rows have the following syntax (use one or more spaces between elements): <path> <mask> <command> Where: <path> is a filesystem path (each whitespace must be prepended by a backslash) <mask> is a symbolic (see inotify.h; use commas for separating symbols) or numeric mask for events <command> is an application or script to run on the events The command may contain these wildcards: $$ - a dollar sign $@ - the watched filesystem path (see above) $# - the event-related file name $% - the event flags (textually) $& - the event flags (numerically) The mask may additionaly contain a special symbol IN_NO_LOOP which disables events occurred during processing the event (to avoid loops). Example: You need to run program 'abc' with the full file path as an argument every time a file is changed in /var/mail. One of the solutions follows: /var/mail IN_CLOSE_WRITE abc $@/$# #################################################################### Hope that helps. Best, Gabe
participants (7)
-
Abaci
-
Avi Marcus
-
Gabriel Gunderson
-
jay binks
-
Jayesh Nambiar
-
Michael Collins
-
Puskás Zsolt