I have a problem because Asterisk does not see the IVR recording files. I have debugged the issue and noticed that Asterisk is using an incorrect path for ASTDATADIR, which is set to /usr/share/asterisk. However, FreePBX uses the path /var/lib/asterisk.
I tried changing the ASTDATADIR variable, but it had no effect—Asterisk persistently continues to use /usr/share/asterisk.
sudo asterisk -rx “core show settings” | grep “Data directory” Data directory: /usr/share/asterisk
I solved the problem by creating the appropriate symbolic links between /usr/share/asterisk and /var/lib/asterisk . Of course, I also copied the necessary contents of the directories.