Recording Calls To NAS

Hi all,

FreePBX has been running faultless since installing. I now need to look at how the calls are stored. I do not want them to be stored on the FreePBX server due to no RAID or backup so I’d like them saved to a network NAS folder that will have permissions to allow controlled access. It can be done in a number of ways. FTP, SSH, etc…

Any ideas people?

Cheers!

Apart from the built into FreePBX backup/restore module which fits many folks needs, what are you looking for extra?

dicko, I am looking to actually put the recording onto a completely different server instead of going into the /var/spool/asterisk/monitor directory on the Asterisk server.

Reason being is the server only runs off a tiny hard drive and has no room for our call recording really.

So basically on hangup of the call, it takes it from /var/spool/asterisk/monitor and moves it to a different internal server then deletes the file from /var/spool/asterisk/monitor. The second internal server is a NAS with RAID on it which has held all our calls from when we were using Cisco Call Manager. We keep calls for 5 years.

The problem with that is that you lose your customer portal and admin interfaces in FreePBX to download or play the extant recordings.

You could mount a foreign (nas) directory over your /var/spool/asterisk/monitor directory, but if the mount fails , then you are in a pickle, iscsi or drbd would help that but probably a good use of the “Post Call Recording Script” in Advanced settings will assuage your insecurity, add a cron job to delete calls over N days in /var/spool/asterisk/monitor and you are all set.

Just been playing and come up with this…

  1. scp -r /var/spool/asterisk/monitor/ [email protected]:/Users/freepbxdevbup/callscopytest/

  2. rm -rf /var/spool/asterisk/monitor/

It does exactly what I need.

How do I combine these into a cronjob and execute it say every evening at 00:01?

I am from a Mac background so just drag and drop normally (embarrassed) :frowning:

Cheers!

to combine and wrap (using ssh by default, but chose youer shell)

/usr/bin/rsync -a --remove-source-files /var/spool/asterisk/monitor/ [email protected]:/Users/freepbxdevbup/callscopytest/

in general rsync is much more efficient than scp.

As to the cron job, surely even a Mac User can drag and drop:-

http://letmegooglethatforyou.com/?q=create+a+cron+job+in+linux

into safari?

I get… -bash: rsync: command not found

(hmm . . what distribution are you using ?)

yum -y install rsync

sorted - just needed to install rsync

oh you beat me to it :slight_smile:

So if i set a cronjob up and sort a key out so i don’t need to enter a password, that’ll sort that!

Cheers!!!

IWFM aparty from unnecessarily breaking your user/admin portals.