I was having problems getting the System Recordings in asterisk 1.4, Freepbx 2.7 to work properly, so I thought I’d post the solution here in case anyone else is struggling.
I was able to record from a SIP phone by dialling *77 in the recordings module and then play it back successfully by dialling *99. The problem was that these recordings would not play when allocated to various functions such as announcements, IVRs, Queues etc.
I was also able to upload wav files (in the correct format), which would play via the built in player, but again they would give dead air when allocated to various functions.
In both cases the logs would show the following error:
file.c: Unable to open custom/ (format 0x4 (ulaw)): No such file or directory
This was caused by simple ownership and permissions settings. Looking at the files housed in the /var/lib/asterisk/sounds/custom/ folder using ls -l, I noticed that the files that worked were owned by Asterisk and the ones that didn’t were owned by Apache.
It appears that even though Freepbx was used to make the recordings, the ownership was allocated to Apache instead of asterisk.
Changing the ownership to Asterisk and the permissions to -rw-rw-rw- allowed asterisk to access the voice recordings, and hey presto, the recording now worked instead of giving dead air.
For those who want the specifics:
navigate to: /var/lib/asterisk/sounds/custom/
type: CHOWN asterisk. .
type: CHMOD 666 .
Anyway, hope this help.