Storing Elastix 2 VoiceMails on NFS NAS Share
-
A common modification to a PBX is to store voicemails someplace other than on the PBX itself. This allows the PBX to remain essentially stateless (logging needs to go elsewhere, too) and lets storage be kept at a different priority tier. Very useful.
The best approach to this is simply replacing the voicemail folder with an NFS mount from a NAS or fileserver. NFS works transparently for us here and is definitely the best choice. SMB, iSCSI and other options do exist, of course, but are not as ideal. Stick with NFS when possible.
Your NFS server needs matching asterisk credentials and permissions in both places in order for the Asterisk user to be able to write to the space.
By default, Elastix is going to store voicemail files in
/var/spool/asterisk/voicemail/default
. So we need to move this directory out of the way before we can continue. Be sure that Asterisk is not writing into this while you do this or you can cause problems. So stop Asterisk before beginning this process./etc/init.d/asterisk stop mv /var/spool/asterisk/voicemail/default /var/spool/asterisk/voicemail/default_old
This gets our old folder out of the way and guarantees that it is not being used. Now we just need to mount our NFS server where this folder used to be.
We need to start by adding the proper line into
/etc/fstab
to do this. You will need to alter the configuration file to reflect the information from your NFS share:echo 'server:/share/name /var/spool/asterisk/voicemail/default nfs rsize=8192,wsize=8192,timeo=14,intr' >> /etc/fstab mkdir -p /var/spool/asterisk/voicemail/default mount /var/spool/asterisk/voicemail/default /etc/init.d/asterisk start
If all is well, you should be back up and running at this point.
-
Welcome @poorizad who has joined us looking for information on this topic.
-
@scottalanmiller Thanks for the instruction. here are my question,
voicemail files in /var/spool/asterisk/voicemail/default but i want call recordings file. i guess there are in /var/spool/asterisk/Monitor ??because i find the wave files in Monitor directory.
second , is this (server:/share/name) is my nas and shared folder ? -
@poorizad said in Storing Elastix 2 VoiceMails on NFS NAS Share:
second , is this (server:/share/name) is my nas and shared folder ?
Yes, that would be your NAS' hostname or IP address. If this is a very small system, my process would be to fill in the ip address and hostname into /etc/hosts and then use the hostname here. It's a bit better than using an ip address directly. If you have DNS, then use that, of course.
-
@poorizad said in Storing Elastix 2 VoiceMails on NFS NAS Share:
because i find the wave files in Monitor directory.
Those are system wave files, not voicemails. They should not be changing.
-
@poorizad said in Storing Elastix 2 VoiceMails on NFS NAS Share:
voicemail files in /var/spool/asterisk/voicemail/default or /var/spool/asterisk/Monitor ??
/var/spool/asterisk/voicemail/default is where voicemail files are stored.
-
@scottalanmiller oh....they dont have enabled voice mail.....they just want to record all the call recordings. ( external).....
-
@poorizad said in Storing Elastix 2 VoiceMails on NFS NAS Share:
@scottalanmiller oh....they dont have enabled voice mail.....they just want to record all the call recordings. ( external).....
Oh, I see. Well that's different. Okay, I'll check on the location for that.
-
You are correct, call recordings go to: /var/spool/asterisk/monitor
-
@scottalanmiller it means i use your previous command with this path . right ?
-
Added this thread to handle the other use case:
https://mangolassi.it/topic/9842/storing-elastix-2-call-recordings-on-nfs-nas-share
-
@poorizad said in Storing Elastix 2 VoiceMails on NFS NAS Share:
@scottalanmiller it means i use your previous command with this path . right ?
Correct