Creating a symbolic link to redirect call recordings to another location

I am having an issue creating a symbolic link to redirect call recordings to another location on another disk. The new location will be on a new disk called disk1. The location would be /disk1/var/spool/asterisk/monitor

I used the following command to create the symbolic link…

ln -s /disk1 /var/spool/asterisk/monitor

Then I set permissions with these commands…

chown -hR root:asterisk /var/spool/asterisk/monitor
chmod g+w /var/spool/asterisk/monitor

However this appears not to be working… if I go to the new directory at disk1/var/spool/asterisk/monitor there are no new recordings. All recordings are going to the default /var/spool/asterisk/monitor directory

I know I’m doing something wrong here. Can someone please help?

I would suggest a better way of doing that is in “advanced” settings" -> “directory settings”, you will need to set “Display Readonly Settings” and “Override Readonly Settings” to true to do that. Make sure the ownership and acls are correct for the “asterisk user”. If the underlying mount point is not local, you might also want to set an appropriate

cache_record_files = yes ; Cache recorded sound files to another directory during recording.
record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files).

in /etc/asterterisk/asterisk.conf for obvious reasons, I don’t think that is an option in the FreePBX GUI)

Hi Dicko

Thanks for the reply. I know this method exists but to my understanding, if you update Asterisk or FreePBX it will break the call recordings being moved to another location by using that method, correct? Creating a symbolic link stays even through upgrades, I believe.

I don’t think so, it is originally designed that way by asterisk, sans FreePBX or anything. I have been doing that way since asterisk 1.0 or maybe before. Ref:-