I’ve been testing out FreeSWITCH and FusionPBX. I found it non trivial to install in debian. Here are my tips for installing.
- Don’t bother with the install script. I found it to be broken. And when it breaks during install, it leaves you in a state that’s very hard to understand and fix. In the end it was easier to install FreeSWITCH by hand, get that working, to the extend that you can make inter extension calls, then proceed with the FusionPBX install.
- Install FreeSWITCH by following the Quick Install Guide.
- Commit the entire FreeSWITCH configuration to git so its easy to roll back when you reinstall FusionPBX. Switch to a new branch before making further changes.
cd /usr/local/freeswitch git init echo 'db/*' >> .gitignore echo 'log/*' >> .gitignore echo '.svn*' >> .gitignore git add -A git commit -m "Initial Commit" git checkout -b try1
- Get the latest version of FusionPBX from svn.
cd /usr/src svn checkout http://fusionpbx.googlecode.com/svn/trunk/ fusionpbx cd fusionpbx cp -a fusionpbx /var/www/fusionpbx
- Create a fusionpbx site for apache and enable it. Note that this makes fusionpbx appear at the root of your site. Create file called fusionpbx in your /etc/apache2/sites-available directory and put the following in it:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName freepbx.example.com DocumentRoot /var/www/fusionpbx <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/fusionpbx/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel debug CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
Then enable the site with
a2ensite fusionpbx/
- after installing FusionPBX, commit the entire configuration to git to make rolling back easier. Switch to a new branch before making further changes.
- set up a FQDN for the box running FreeSWITCH and FusionPBX
- use ACL to allow www-data to make changes to the /usr/share/freeswitch directory
And after you install and you realise it didn’t quite go as planned
- Reset the postgresql database:
root@fusionpbx: # su - postgres postgres@fusionpbx:~$ psql postgres=# drop database fusionpbx; postgres=# create database fusionpbx; postgres=# alter user fusionpbx with password 'XXXX'; grant ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;
- revert your FreeSWITCH configuration using git
- revert your FusionPBX configuration using git
Leave a Reply