System Recordings not working

When on ssh I believe that I deleted the custom folder in /var/lib/asterisk/sounds. When I click the system recording module on the GUI, the browser loads the page until I get shown an error.

I have tried to access the ssh and adding the custom folder again however this does not seem to work.

Restore it then.

I have done and I still get the following error that I added to the original post

Did you mess with the permissions as well?

Make sure there’s proper file permissions set.

I have tried using chmod 777 custom. Is this correct?

Try amportal chown after adding the directory, it should not hurt

https://wiki.freepbx.org/display/FPG/amportal+commands#amportalcommands-Chown

This looks to be a FreePBX 13+ machine, use fwconsole instead of amportal

You gotta make sure the folder is owned by and the Asterisk user can write.

I have tried both amportal chown and fwconsole chown and there is no difference. What is the exact directory where the system recording files are stored?

Can you tell us what you deleted, and how you restored it?

I believe to have deleted the language files so that I could have a personalised voice. I removed folders however I don’t remember removing the custom folder however this must have been in the en / en_GB folder that I deleted. I restored it by adding the folder with mkdir under ssh in the /var/lib/asterisk/sounds directory. I then did chmod 777 custom and after running that command, the FreePBX GUI still does not load the system recordings.

That depends on the “language” of your channel by hard coded design it should eventually look in /var/lib/asterisk/sounds/custom/ if /var/lib/asterisk/sounds/en/custom/ is missing but it would first look in /var/lib/asterisk/sounds/your-channellanguage/custom/

The default language setting under advanced settings is set to en_GB. After a restart of asterisk and the PBX itself, the error is still show. All the audio files for the voice are in the directory sounds

You will see the directory of the file it is looking for but failing to find in /var/log/asterisk/full (until tomorrow :wink: ) , system recordings need too be in in …/…/…/sounds/custom to be found, the last placed looked at will be /var/lb/asterisk/sounds/custom/ but language specific versions will be found first as I said deeper in /var/lib/asterisk/sounds/*/custom/ and of sourse the files must be readable by asterisk user and with an extension that asterisk can play directly or by transcoding.

The folders are in the right place according to the last message. The error shows when I click ‘Add Recording’ and edit recording. Could this be an issue with the folder or the module itself?

what ‘last message’ ?
what does the log file reveal?

Does /en_GB and /custom, as well as all the files in the custom folder have the permissions set properly?

That’s how it looks on a system I’m logged in now

[[email protected]~]# ll /var/lib/asterisk/sounds/ | grep en
drwxrwxr-x. 11 asterisk asterisk 249856 Jan 13 09:29 en
drwxrwxr-x.  8 asterisk asterisk  20480 Sep 25  2018 en_GB

[[email protected]~]# ll /var/lib/asterisk/sounds/en/ | grep custom
drwxrwxr-x. 2 asterisk asterisk    4096 Apr 11  2019 custom

[[email protected] ~]# ll /var/lib/asterisk/sounds/en/custom
-rw-rw-r-- 1 asterisk asterisk  56032 Apr 11  2019 audio1.wav
-rw-rw-r-- 1 asterisk asterisk 325464 Sep 28  2018 audio2.wav

p.s. ll returned more results, I removed it so you easily can see the permissions.

This is the output when I ran ls -i /var/lib/asterisk/sounds | grep en
drwxrwxr-x 3 asterisk asterisk 4096 Jan 13 04:04 en_US
drwxrwxr-x 3 asterisk asterisk 266240 Jan 15 03:08 en_GB
drwxrwxr-x 3 asterisk asterisk 4096 Jan 13 03:59 en

Running the commands below do not output anything as there is nothing in the directory to view its permissions.
li -i /var/lib/asterisk/sounds/custom | grep en
li -i /var/lib/asterisk/sounds/en/custom | grep en
li -i /var/lib/asterisk/sounds/en_GB/custom | grep en

You where advised to restore the directory that you deleted , that meant to install the directory and all its contained files. From bash :-

find /var/lib/asterisk/sounds/ |grep custom

would be helpful to see if you have anything you can use.

(‘ll’ is usually an alias for ‘ls -lah’ , it might not be available on your box, not sure what ‘li’ is an alias for , just use the unaliased ‘ls’ builtin command )

The command find /var/lib/asterisk/sounds/ | grep custom shows the following results:

/var/lib/asterisk/sounds/at-customers-request.g729
/var/lib/asterisk/sounds/customer-service.alaw
/var/lib/asterisk/sounds/customer-service.g722
/var/lib/asterisk/sounds/ja/custom
/var/lib/asterisk/sounds/en/custom
/var/lib/asterisk/sounds/customer-relations.alaw
/var/lib/asterisk/sounds/at-customers-request.ulaw
/var/lib/asterisk/sounds/there-is-no-customer-support.g729
/var/lib/asterisk/sounds/there-is-no-customer-support.g722
/var/lib/asterisk/sounds/customer-relations.g722
/var/lib/asterisk/sounds/lines-complaining-customers.g729
/var/lib/asterisk/sounds/customer-accounts.g729
/var/lib/asterisk/sounds/there-is-no-customer-support.ulaw
/var/lib/asterisk/sounds/there-is-no-customer-support.alaw
/var/lib/asterisk/sounds/en_US/custom
/var/lib/asterisk/sounds/en_GB/custom
/var/lib/asterisk/sounds/customer-relations.ulaw
/var/lib/asterisk/sounds/customer-accounts.alaw
/var/lib/asterisk/sounds/custom
/var/lib/asterisk/sounds/customer-service.ulaw
/var/lib/asterisk/sounds/customer-service.g729
/var/lib/asterisk/sounds/at-customers-request.alaw
/var/lib/asterisk/sounds/customer-accounts.ulaw
/var/lib/asterisk/sounds/lines-complaining-customers.g722
/var/lib/asterisk/sounds/lines-complaining-customers.ulaw
/var/lib/asterisk/sounds/at-customers-request.g722
/var/lib/asterisk/sounds/lines-complaining-customers.alaw
/var/lib/asterisk/sounds/customer-accounts.g722
/var/lib/asterisk/sounds/customer-relations.g729

all your ./custom directories are empty. There are no files to play,