FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!

Thursday, August 5

Getting Started

So I downloaded the Centos ISO (Note: The ISO is currently not available on the FusionPBX website as it was lost in a server failure a few months ago.  A new version of the ISO is being created and will be posted there (http://fusionpbx.com/download.php) once it is ready, but in the meantime, you can get the old one from here: https://docs.google.com/leaf?id=0B5JYtyKSDpNbOTU2YWQxMmYtMmM4Yy00MWI0LWExZDktMDlkZjY4MDFlZDg5&hl=en&authkey=CJDZhRQ) and burnt a CD.  Don't make the mistake of thinking it is a LiveCD!  You do not get to try this out before installing it.  When you put this in your machine and boot it it WILL erase your harddrive without checking first!  Ok, so it happened to me.  Fortunately it was my test machine but I did lose some things I had been working on.

So boot your machine from the ISO and let it install on the harddrive.  This is a MUCH simpler process than for Trixbox.  Trixbox requires you to answer a bunch of install questions before it installs, FusionPBX just gets on with the job and installs itself.  Very neat.

While it is installing, take the time to download PUTTY from this link http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.  In my view, the best package to use is the Windows installer package there as it contains everything.  Putty is used to create a secure telnet type session with your freeswitch server.  This means that you don't have to work at the console and you can cut and paste commands you find here or elsewhere on the internet directly to your freeswitch linux prompt.  Wherever I refer to working at the console in this blog you can directly substitute working via putty.  PSFTP which is also in the Windows installer package allows you to securely FTP files to and from your server.  I consider both of these essential tools for use with FusionPBX/Freeswitch.

Once FusionPBX has installed log in on the console using the default account and password (root, fusionpbx).  Then change the password with the passwd command before you forget.  The next job is to get it up and running with an IP address.  system-config-network will allow you to set the IP address (or take the default of DHCP).  You don't really want to use DHCP if you are building a real production system as your telephones need to be able to find it easily, but then again, you could reserve an address in your DHCP server for it, and then it will always have the same address anyway - so it is up to you.  I'm using DHCP, I suspect I could therefore skip this step but I haven't tried.

service network restart will actually start the network service.  If it says fail then you have a problem.  In my case it did - I had two network cards in my machine (don't ask) and it started the first one and not the second - and my network cable was plugged into the second.  Swapping the cable fixed the problem for me and I was able to start it when I tried the command again.

Now there are some errors in the current ISO (May 2010) so you'll need to correct them and since we have to do it at linux level we should do it now.  (now don't complain - the errors are just permission issues and they are easily fixed, and I'm telling you how to fix them.  The actual software is excellent)

- To get voicemail working:
chmod -R 775 /usr/local/freeswitch/storage
chgrp freeswitch /usr/local/freeswitch/storage
- To make it so that FusionPBX can see the recordings you make for menus etc:
chmod -R 775 /usr/local/freeswitch/recordings
- To get the voicemail mailer application working:
chown -R apache:daemon /var/www/fusionpbx
chmod -R 776 /var/www/fusionpbx
(My thanks go to Mark Crane - the author of FusionPBX - for his help in identifying these corrections)
UPDATE 17-August-2010:
- To get Call Detail Reporting working:
- chmod -R 777 /usr/local/freeswitch/log
UPDATE 24-September 2010:


From the designer of FusionPBX - if you are strict with permissions, freeswitch needs execute and read for the /var/www/fusionpbx/secure directory in order to be able to run the php command line files in that directory.  Every other directory within the fusionpbx directory structure only needs read and write permission.
UPDATE 24-October 2010:
- To create voicemail boxes (this is done by freeswitch on the fly when one is needed) you need to do
chown -R freeswitch:apache /usr/local/freeswitch/storage

 
Next we should set the time and timezone.  First we update the timezone information on the machine.  This ensures that the latest changes by governments around the world that have made it into linux are incorporated on your box (would you believe that some countries change their timezone information every year by moving their daylight savings start and finish dates?).

yum -y update tzdata
Next we need to identify the timezone for you to use.  Look in /usr/share/zoneinfo and identify your timezone - you will need to note the folder and the filename eg. Australia/Sydney.
Now we create a symbolic link to the timezone information so that when it is updated you get the benefit of the update (you could just copy it but then it would no longer update).
ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime
We also need to edit the clock information.
nano /etc/sysconfig/clock
The current ISO was created in Kolkota, India, so you will need to change the timezone from Asia/Kolkota to the same zone as you identified above, although if you are in Kolkota you actually don't need to do any of these changes, at least for the present ISO.  Save your changes to the file once you are finished.

Now we set the current time from a time server.
ntpdate us.pool.ntp.org
We check the time is correct:
date
We set the bios clock to match the system clock.
hwclock --systohc
We check that it worked.
hwclock

Since we don't want to have to check the clock periodically and re-set it we can set it to maintain the time from time servers on the internet.
/sbin/chkconfig --level 345 ntpd on
This will set ntpd to automatically run - by default in the CentosISO for FusionPBX it is disabled.  Next we start the ntpd service now (otherwise it would only start when we next reboot).
/sbin/service ntpd restart
Incidentally, you can see what the ntp daemon is doing if you type ntpq -p localhost


At this point you can now forget linux (log off first!) and you can start using the GUI.  Point your browser to it with http://your-server-IP-address and start setting up the machine.  But hold on, if you chose DHCP how do you know what the IP address is?  Good question.  Unfortunately when I first wrote this I didn't know enough about linux to know how to find out from the linux prompt (I've since learnt that the command is ifconfig).  In my case I logged into my DHCP server and looked to see what address it had just issued to the server, and then I browsed to it using that address.

The final step before your machine is installed is that when you log in to the web page the first time (note that the logins are superadmin and admin and the default password is fusionpbx for both) you will need to confirm some installation settings.  The simplest thing is to accept all the default settings, so just scroll down and click to continue.  Next, change the default passwords by going to the admin menu and selecting user manager.  Click on the icon with the "e" in it, in the user list, next to the user account you want to change and then change the password and save the changes.  Do this for superadmin and admin.

You are now done!  Your PBX is up and running.  (But it isn't doing anything yet - more in the next post)

2 comments:

  1. can you share fusion latest version iso file with centos 7

    ReplyDelete
  2. I have moved away from this project for a while (as I didn't need a PBX anymore, not because I didn't like it). I just looked at the fusionpbx website and it looks like you now install a minimal centos OS and then install fusion on top of it. See here: https://www.fusionpbx.com/download

    ReplyDelete