TIPS Multi tenant environment setup

simplydrew

Member
Joined
Feb 19, 2012
Messages
92
Reaction score
4
Wanted to put the question out there to see if anyone is currently running a multi tenant setup with PIAF, and if so, how you're doing it. While researching, I found a few threads from a few years ago here that indicated that some people were using custom contexts, changing "from-internal" to different site indicators so that there can be duplicate extensions, isolated to their own environments, etc. However, I wanted to see if there's a better, new, or different way that's more relevant now (with possibly better instructions for setup) in order to accomplish this.

Custom contexts is something I need to brush up further on, so this will be a good learning experience if it's still done this way. I'm thinking more along the lines of extension isolation similar to Cisco CallManager partitions and calling search spaces, for example, which I think is comparable - but not completely sure.

I have a Linode setup where I have a few "onsey towsey" family members are setup, but wanted to expand on to onboarding a few more people to the system (creating separate trunks for them out to the same provider, but isolation in that regard for proper deducting of the prepaid accounts on the provider side for billing, etc). For this purpose, I think from what I've gathered I'll need to:

  • Create separate outbound routes and trunks, both of which need to have the caller ID section the same as the extension, so Asterisk knows to match that route and send it out a specific trunk
  • Isolate extensions for now, keeping 11XX for one site, 21XX for another site, etc to prevent misdialing
Can someone show me or point me in the direction of how the custom contexts and call routing aspects of this would look like in this planned setup?
 

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
I use a hub and spoke type arrangement. The hub connects all the external trunks. It gives me a central location for extracting billing information and setting my call routes. The spokes are trunks to individual PBXs from the hub which, among other things, gives me a standard image I can roll out as I add more "tenants". If one wants to call the other, they just dial their external number and it routes via the hub (my billing script recognises this and it's allowed as a free call). It doesn't give direct dialing to extensions but that wouldn't be complex to add.

Isolate extensions for now, keeping 11XX for one site, 21XX for another site, etc to prevent misdialing

You'll soon run out of number space like that. Reverse the digits and go with something like 11xx, 12xx, etc. Depending on how many different tenants you wish to add, you may even want to go with 5 digits: 111xx, 112xx, etc, or not allocate 100 numbers for each tenant: 111x, 112x, etc.
 

simplydrew

Member
Joined
Feb 19, 2012
Messages
92
Reaction score
4
I use a hub and spoke type arrangement. The hub connects all the external trunks. It gives me a central location for extracting billing information and setting my call routes. The spokes are trunks to individual PBXs from the hub which, among other things, gives me a standard image I can roll out as I add more "tenants". If one wants to call the other, they just dial their external number and it routes via the hub (my billing script recognises this and it's allowed as a free call). It doesn't give direct dialing to extensions but that wouldn't be complex to add.



You'll soon run out of number space like that. Reverse the digits and go with something like 11xx, 12xx, etc. Depending on how many different tenants you wish to add, you may even want to go with 5 digits: 111xx, 112xx, etc, or not allocate 100 numbers for each tenant: 111x, 112x, etc.

Aha, interesting approach, @matthew. I think I like the sound of what (I think) this is. You have some sort of front end server sitting an proxying the traffic from different customers back to a different PBX's (based on the customer) behind that centralized ingress point? So all customer phones get one hostname or IP to register to, and then their respective PBXs may be different behind that point?

Would love to hear a more technical explanation of how you're doing this. I may want to build off of the same plan, if so. I want to keep redundancy in mind, keeping it as simple and manageable as possible (since the scope of this is only around 5 to 7 phones, at the most, per client site), but want to make sure I'm not admin'ing 10 or more PBXs individually that belong to each client, etc.
 

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
My endpoints connect via VPN and register directly to their own PBX. I use provisioning, so that helps me control who connects where.

My main reason for handling the trunks on the hub is I provide the trunks rather than having to deal with a dozen different providers on an ad hoc basis. Customers can port in a number or use one of mine. I also have my own hardware to create virtual machines on, so running up additional PBXs is no problem. I know some of the virtual server providers will sell you space and cpu and let you run as many VMs as you can fit, rather than paying for each individually. I don't know if Linode do that.

I find as I scale up, having a Standard Operating Environment (SOE) makes things a lot easier. Standard image for PBXs - just create a new instance, setup the networking, create extensions and trunks and basically done. Having individual PBXs lets me customise for customers that need it without having to worry about other tenants. Also can do maintenance on individual PBXs without interfering with the others. And only one user guide (I provide the endpoints, no BYO).

Anyway, there's plenty of ways to skin a cat. Have fun with it. It's a bit of a learning experience as you go. :)
 

smarks

Guru
Joined
Jan 7, 2015
Messages
116
Reaction score
26
Custom context with no user admin access to the GUI seems to work reasonably well. It's not really true multitenant in my mind but a lot of people seem to successfully use it that way.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top