System Recordings not working


(Joshua Cadman) #1

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.


(Lorne Gaetz) #2

Restore it then.


(Joshua Cadman) #4

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


(Itzik) #5

Did you mess with the permissions as well?

Make sure there’s proper file permissions set.


(Joshua Cadman) #6

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


(Moussa) #7

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

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


(Itzik) #8

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.


(Joshua Cadman) #9

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?


(Itzik) #10

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


(Joshua Cadman) #11

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.


#12

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/


(Joshua Cadman) #13

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


#14

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.


(Joshua Cadman) #15

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?


#16

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


(Itzik) #17

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

[root@lab1~]# 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

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

[root@lab1 ~]# 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.


(Joshua Cadman) #18

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


#19

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 )


(Joshua Cadman) #20

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


#21

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