What installation packages are needed to run FreePBX and where does FreePBX & Asterisk keep their volatile files?

Hi,

I’m trying to create a FreePBX on CentOS 6 Docker container for Synology based on wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+6

I’ve got DAHDI and Libpri compiling with the Synology source and toolchains, however there is an awful lot of cruft once that’s compiled - gigabytes of it.

So, question 1: After installing Apache, PearDB, DAHDI, Libpri, pjproject, jansson, spandsp, Asterisk, FreePBX, the sounds, the commercial module DFTs and all the rest - I’m not installing MySQL since that will be a prerequisite external to the FreePBX container - what yum packages are actually required to run FreePBX/Asterisk, and what is cruft that can be removed?

Question 2: Other than the MySQL DB, where does FreePBX/Asterisk store its files? In order to allow upgrading the container, files modified after the container is run are best stored on the host file system, so if an upgraded container is deployed in place of the existing one, its state is retained.

You can remove any -devel yum packages, but all the rest are probably required.

Lots of places. Have a look in Advanced Settings, or the freepbx_settings table. A starting place would be /etc/asterisk, /var/lib/asterisk, /var/www, /var/run/asterisk and probably more that I’ve forgotten. Oh. And all the sound files too.

Edit: /var/spool/asterisk too

Note that the database is TIGHTLY tied to what’s on the filesystem, so you can’t just take the database from one revision and expect it to work with another. (You’d need to run ‘fwconsole ma install $modulename’ for every module that is different in the database, so they run their upgrade scripts)

Thanks, that bit about -devel yum packages helps.

Is there any reference that says where Asterisk or FreePBX stores volatile files?

As a dockerized application, my aim is to run the FreePBX container with the database and the volatile files stored on the docker host. If the container was replaced with a new one, then the old database and volatile files would all still be there and in theory the state of the PBX would still be the same.

Would this actually work, or would there be problems?

I would suggest mostly

/var/lib/asterisk
/var/spool/asterisk
/var/lib/mysql
/etc/asterisk/
/etc/fre*
/etc/dahdi

and by extension

/etc/fail2ban
and perhaps more “extensions” if you use “addons”

/var/log/asterisk/* also but you can probably ignore that as it is basically transient.

Sadly, no, apart from above.

That would entail all of the things above . Note that sound files alone can be a gigabyte. That normally is the point when people go ‘Oh, this is going to be annoying, let’s just use a complete VM’ :sunglasses:

And I forgot to mention - obviously, /etc/freepbx.conf and /etc/amportal.conf (which is deprecated, but some things still use it - we’ll probably be deleting it in 15, but that isn’t an official statement, that’s just what I want to do 8) )

Edit: Also, don’t forget that Apache (in the container) needs to be running as the same user as Asterisk (in the container), otherwise a bunch of subtle and hard to diagnose bugs will crop up.

1 Like