Asterisk 16 + FreePBX 14 system recordings location problem

Hi,

I am using Asterisk 16.2.1 and FreePBX 14.0.16.11
I see that FreePBX is writing uploaded recording files to “/var/lib/asterisk/sounds” but asterisk is trying to read them from “/usr/share/asterisk/sounds”

How can I change one of them so they both use the correct path ?

In fact, I see that Asterisk can not find any system recordings at all (not only custom), because it is searching files at “/usr/share/asterisk/sounds/en” but the files are in “/var/lib/asterisk/sounds/en”

So I believe I should change the path that Asterisk uses.
but I could not find how to change that.

I see that it should be done using the “astdatadir” parameter on /etc/asterisk/asterisk.conf but it does not work. (if I use the “astdatadir=/var/lib/asterisk/” line it does not respect that conf)

btw, I see some sym links on the path :

[email protected]:/var/lib/asterisk/sounds# ls -alrt /usr/share/asterisk/sounds/
total 28
lrwxrwxrwx 1 root root 31 Aug 27 2020 recordings → /var/lib/asterisk/sounds/custom
lrwxrwxrwx 1 root root 35 Aug 27 2020 priv-callerintros → /var/lib/asterisk/priv-callerintros
lrwxrwxrwx 1 root root 36 Aug 27 2020 custom → …/…/…/local/share/asterisk/sounds
drwxr-xr-x 8 root root 20480 Feb 17 20:13 en_US_f_Allison
lrwxrwxrwx 1 root root 36 Feb 17 20:14 en → /etc/alternatives/asterisk-prompt-en
lrwxrwxrwx 1 root root 39 Feb 17 20:14 en_US → /etc/alternatives/asterisk-prompt-en-us
drwxr-xr-x 11 root root 4096 Feb 17 21:35 …
drwxr-xr-x 3 root root 4096 Feb 17 21:35 .

I really could not find what is the correct way of doing this.
Should I make a sym link ?
I’d really appreciate if anyone could help

The Debian packages in their repos built asterisk like that, there are recipes in the wiki here for how to do it ‘properly’ so FreePBX fits in no probs. with Asterisk

I would apt purge all the asterisk debs and follow one. Perhaps starting from scratch using buster would be quicker.,

I think Debian are correct here. /var shouldn’t be used for read-only material. However, by enforcing the proper Linux file system standards they are creating the problems you see.

ok. but what is the solution ?
not by starting from scratch. I can’t go over the setup process again.
doing some proper sym links should solve this. Am I wrong ?

FreePBX uses this directory structure in /etc/asterisk/asterisk.conf

[directories]                                                                                                             
astetcdir => /etc/asterisk                                                                                                
astmoddir => /usr/lib/asterisk/modules                                                                                    
astvarlibdir => /var/lib/asterisk                                                                                         
astdbdir => /var/lib/asterisk                                                                                             
astkeydir => /var/lib/asterisk                                                                                            
astdatadir => /var/lib/asterisk                                                                                           
astagidir => /var/lib/asterisk/agi-bin                                                                                    
astspooldir => /var/spool/asterisk                                                                                        
astrundir => /var/run/asterisk                                                                                            
astlogdir => /var/log/asterisk                                                                                            
astsbindir => /usr/sbin                                                                                                   

Put everything where it belongs in the FreePBX ecosystem and you should be good to go.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.