Concept? Separated trunks for separate groups

Hi all

My question is while using freepbx, but I think it is a basic for Asterisk too.
I have troubles to figure out the right concept for my situation:

I want to build a server for multiple groups of people, each group having its own trunk/ or even trunk provider.
And there must be a way to do emergency calls, too.

Now the problem is: Am I on the right path?
I think for separating extensions to their own trunks, I need to setup A LOT of dial patterns, with lots of duplicates to sort out the outbound caller, so it gives the call to the right trunk. Right? Same must be with emergency numbers. It’s like every pattern multiplied with the amount of outbound CIDs? To grab each.

Or is there cleaner way? Like chaining outbound routes or something?


Doesnt matter if you are using Asterisk or FreePBX you can filter calls by caller ID, you can use wildcard for example 1XX, 2XX, 3XX, On the outbound route for FreePBX there is a Caller ID field where you can specify what caller id range are able to use that route, so I just susggest you make different extensions groups . Please Next FreePBX question must be addressed on the FreePBX Forum

The natural way of doing multi-tenant in Asterisk is to put each tenant into their own context. I’m not convinced that FreePBX exposes this capability - FreePBX is not a simple GUI configurator for Asterisk - it provides a lot of its own dialplan code.

Whilst noting that trunks are a FreePBX construct that has no explicit equivalent in Asterisk, you will be OK with different providers, but sharing a provider can cause problems as Asterisk will use IP address to select an incoming context and some providers will use it to decide who to bill.

Whilst it may be possible to use From instead, this can limit the options for signalling Caller ID; the peer will need to support P-Asserted-Identity or Remote-Party-ID.

Thank you both for your inputs!
I was aware I asked here, cause they seem to burn you at the stake in the freepbx forum if one can not recite the documentation by heart :wink:
(well part of that is just a joke)

But concerning Asterisk:
david551, You say freepbx is no simple. I agree, also because most of the functionality of freepbx I dont need at all. I just want to set up a gateway for multiple neighbouring bureaus here. We’re kind of a community workspace here. We got electrical issues with the existing telephony in the building, but happen to have a very good fiber connection. So I wanna check out an own pbx server which could solve all our problems at once.

Do you think there is a better way of using a more basic GUI for Asterisk?
Would you have an advice for one?
As for the provider part/ billing distinction I would check this with them.

Many thanks!