One server, 3 companies

Hello all,

I’m a bit new at this and the question may already have been answered (or it may be way easier than it seems, but here goes).

Our company’s voip runs on it’s own Asterisk 1.4 + FreePBX 2.4 server with VoiceMeUp as a provider.

We are going to rent out some office space to two other companies and want to offer them phone services. How do I (or where can I find the info on) go back and split my config in three different companies, each with it’s own DIDs and inbound + outbound routes (and probably trunks)?

Thanks a bunch! (it’s a bit out of my competencies)

You need to do a search for “multi tenant”. There’s really not a way to do it in asterisk, but you can get some functionality by using custom contexts.


I’m doing exactly this for a customer using the ‘custom contexts’ addon.

However, that system is on FreePBX 2.3, I’ve not yet dared upgrade it to 2.4 as I’ve seen possible problems mentioned & not had time to properly test it.

I’ve done this using custom contexts as well, but there are problems as soon as you are using advanced functions.

There are other solutions :

Do not use custom context and connect each site phones directly to your central Asterisk (IP centrex setup). This is the simpler but not really safe : if you have a WAN link problem you will have no possibility to redirect locally the outbound calls to a TDM trunk.

For better reliability and lower amount of WAN traffic, put an Asterisk at each location and create Trunks. Then you can define prefixes to call each site.

For example at each site you define a set of extensions : extension numbers 30 to 50 and a trunk prefix for each site (two numbers like 20, 21, 22).

When you want to call a phone at another site, you dial 2030, 2135, 2239…

This is working nicely but you miss some advanced functions, for example BLF lights will only work locally.

FreePBX 2.3.1 and Asterisk 1.2 are certainly the best versions to make advanced things with custom contexts. I have test machines with asterisk 1.4 and FreePBX. 2.4 Those new versions do not give really more usefull functions in the end. But they give for sure a big amount of work to test and get what you had before. So i choosed to stay at FreePBX 2.3.1 and Asterisk 1.2 to avoid to take some unusefull risks.

Even FreePBX 2.5 will not give really usefull functions for professional multisite setups. There was a “dial context” in the air, who should have replaced custom contexts, but unfortunately this has not been included inside version 2.5.

I think that the FreePBX dialplan, splitted between dialparties.agi and normal dialplan, is now so complicated that it is difficult to add easily advanced functions like custom contexts or dial contexts without breaking other FreePBX modules.

At the same time, Asterisk continu to follow a strange telephony road, where reliability, scalling and compatibity is not the main concern.

After more than two years of hard FreePBX developpement, we still does not have the possibility to restrict outgoing calls for a set of extensions.

My sentiment is that FreePBX should take a new radical turn, starting from ground a new project with a better IPBX engine like Freeswitch seems to be.

This could be at the same time an oppurtunity to rewrite the WEB interface for something more modern, faster and lighter. The actual version is consuming a lot of ressources and is specially slow when using custom contexts.


I have the exact same requirement and it works a treat!

custom contexts works a treat for me! I make the tenants sign up for thier own VOIP trunk and only allow that outbound trunk in custom contexts.

Internal transfers, BLF hints and pickup groups between the contexts still work, so you can even share a receptionist!

What has worked even better for me is once they are using an Asterisk pbx in all it’s glory system they never go back! So when they grow and move out you get to consult to them to install one in their new premises. (This has happened twice now)