Multiple Installs Of FreePBX on the same host/os

Hey Guys,

I’m attempting to run multiple asterisk servers on the same physical host and have gotten Asterisk 1.6 running twice with different config’s but I’m having issues with Freepbx. I am running Ubuntu 10.04 on a Vmware image for tests

I have 2 installs of asterisk, the default Ubuntu install and for the 2nd I have copied some dir’s and altered asterisk.conf with this:

astetcdir => /etc/asterisk-pbx
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /usr/share/asterisk-pbx
astagidir => /usr/share/asterisk/agi-bin
astspooldir => /var/spool/asterisk-pbx
astrundir => /var/run/asterisk-pbx
astlogdir => /var/log/asterisk-pbx

Both run happily with Sip,Iax, Dundi, Skinny and AMI ports changed

I installed Freepbx with defaults which worked well for the 1st Asterisk install, for the 2nd install I altered the install_amp:

define(“AMP_CONF”, “/etc/amportal-pbx.conf”);
define(“ASTERISK_CONF”, “/etc/asterisk-pbx/asterisk.conf”);

I ran this like " ./install_amp --dbname asterisk-pbx" and have setup 2 sql users and 4 db’s total, The install script ran ok and this is where it gets hairy…

Logging into the 2nd freepbx’s html path (Http:// I see extensions and modules that have been installed/config’ed on the first freepbx install, using asteriskinfo module shows the info from the 1st install.

From what i can tell this is down to freepbx using the AMI port of 5038 for both installs, I’ve looked and looked and looked but found no reference anyone in the setup/config of freepbx where I can set the AMI port to anything else.

Anyone got any ideas?

Did you change the DB name in MySQL and in etc/amportal.conf You will need to address the AstMan issue however the information you indicated is pulled from the DB.

Not sure why you don’t use VM’s, these seems like a bunch of work for nothing.

Hi there,

I didnt see a DB name value in amportal.conf but i assume its AMPDBNAME=asterisk-pxb ?

Any idea about changing AstMan?

We are exploring this option due to overhead with VM’s and the possiblity of auto provisioning new PBX’s, VM’s all use their own apache/mysql/os base which consumes a fair whack of memory, the idea is to increase PBX density on the server

I’ve used sip-trunk systems in VMs with mediocre success. Conferences are out or anything that requires timing (FAX, etc.). I do have a system running on a blade using a Sangoma UT50 for timing. It exists pretty much as a conference server.

I haven’t pursued the multiple amportal.conf’s per system but for a system that has growth potential I’d be curious about seeing that work before adding the overhead of VMs. Then again, if you’re happy without FAX nor conferences, vm’s may be easier.

It’s mainly about getting the most out of servers, Sure consumer grade servers are cheap and might be cost effective but when you need good uptime your looking at high level servers, With a server running 16gb of ram you may only be able to fit 30-40 PBX’s in VM’s on it and when the server costs USD$10k+ thats USD$250-350 per PBX.

Consider multiple asterisk processes you can fit 160-180 PBX’s on that same server at a cost of USD$55-62

I’m making some progress, I think its all about manually going thru all the freepbx files and making the changes to directories but the AMI port is stil eluding me at this point and that will be the key change

Sorry to bump an old thread but the question sure has a timeless quality to it.

What is the best way to go:

  • A powerful dedicated server co-hosted running 30 VM’s (OpenVZ? :wink:
  • A powerful dedicated server co-hosted running 1 Linux OS but with 50 installations of FreePBX somehow secured away from each other (chmod? :P)
  • A powerful dedicated server co-hosted running 1 Linux and 1 FreePBX, with some sort of mad routing to semi isolate the various companies

Assuming each of these PBXs running represent a business/company, and as such need to be isolated from each other (the embarrassment of one business hearing another business voicemail could be a disaster). I think there are even laws about this (AAA, PCI, etc).

So thinking about it, those last 2 options seem insane… with VM’s that isolation is absolute and instant.

Now the age-old concern about PBX in VM is “timing”. I still don’t know what this means, as I haven’t experienced a problem myself. But I’ve seen “1000 Hz kernels for asterisk in vmware” so perhaps now that it’s 2011, this timing problem is in the past (no pun intended).