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!

Wednesday, December 15

FusionPBX in a virtual machine

I've been playing around with virtual machines.  Ideally I'd like to try it with Proxmox VE or Vmware ESX however I don't have a machine with Hyper-Threading capability (see See which processors are supported on Intel's website) available to play with.  So I've been playing with VirtualBox.  More on that shortly.

Why would I want to do this?
- virtualisation is good for the environment - ok, I'm only half serious expressing it this way, but it is true, if I can virtualise my servers I can use less physical machines and therefore use less electricity.  I can also use less space for them.
- virtualisation gives you the capability of making snapshots - this is an image of your entire server at a moment in time.  This gives you somewhere to roll back to easily (someone is going to hate me for saying this, but it is a bit like using Windows System Restore and creating restore points).
- virtualisation makes backups easier - you can backup the harddrive container and you've backed up the entire server

So what did I do?
I installed TinyCoreLinux (TinyCoreLinux website) on my harddrive as it is a really stripped down version of linux.  Then I installed VirtualBox on top of that (VirtualBox OSE is available as a package to automatically install on TinyCore) and then I created a harddrive image of FusionPBX by installing the Centos ISO version of FusionPBX (see my first blog entry for the download link) into a virtual server in VirtualBox.  Note that if you use the Centos ISO you really should give it a minimum of 384Mb of RAM or you'll probably have issues with response time and sound quality.  I also set it up using a bridged ethernet adapter rather than the default NAT adapter as this will simplify life.

Then I copied the fusionpbx and freeswitch directories (and all their subdirectories) from my live FusionPBX server into the virtual server in order to give myself a real situation to test it with.  And then I turned off my live FusionPBX server and changed the IP address on the virtual server so that it was using the IP address of the real server and then I could use it with all my existing phones and configuration without any more work.

But does it work?
Would I be telling you this if it didn't?  (Actually I probably would tell you so that you wouldn't waste time trying the same thing)  The good news is that it works.  My usage of this is for a home VOIP phone system and it does this well.  I probably wouldn't use it in VirtualBox running on TinyCore for a real production phone system, but I'd be willing to try it on a PC that supported Hyper-Threading using Proxmox VE or Vmware ESX.

Sunday, December 5

Permissions again...

Ok, I've revised some of my earlier thoughts on permissions.   I encountered a strange problem that as long as you didn't restart the machine freeswitch would continue to run beautifully, but if you restarted the machine you had to manually restart freeswitch.  If you refer to the http://fusionpbx.blogspot.com/2010/11/this-may-be-better-approach-to.html section it has now been revised to reflect the fix for this.

Note though that if "/etc/init.d/freeswitch start" fails to start freeswitch it might be like me, that in trying to get it working I've started it once with root permissions and the pid file therefore has root permissions and can't be removed - "rm /usr/local/freeswitch/run/freeswitch.pid" resolved this and it was able to start after that.