How to Set Up Multi-Tenant PBX Hosting

Multi-tenant PBX hosting lets a single Asterisk installation serve multiple independent organizations/customers with genuine isolation between them — relevant for hosting providers or organizations with genuinely separate business units. This guide covers the architecture.

What Multi-Tenancy Requires

Beyond just multiple extensions (which any PBX supports), genuine multi-tenancy requires isolation — Tenant A shouldn't be able to see, call, or interfere with Tenant B's extensions, configuration, or call data, similar isolation principle to How to Set Up Network Segmentation on a Single VPS applied at the PBX application layer.

Using FreePBX's Multi-Tenant Capabilities

Some FreePBX distributions/modules provide dedicated multi-tenant functionality — verify whether your specific FreePBX setup includes this, since base FreePBX doesn't inherently provide strong tenant isolation without additional configuration or specialized modules.

Using Separate Asterisk Contexts Per Tenant

[tenant-a-internal]
exten => 1001,1,Dial(PJSIP/1001@tenant-a)

[tenant-b-internal]
exten => 2001,1,Dial(PJSIP/2001@tenant-b)

Asterisk's context system can provide dialplan-level isolation — extensions in one tenant's context can't directly dial extensions in another tenant's context unless explicitly routed, providing a foundational isolation mechanism.

Using Separate PJSIP Endpoint Namespacing

[1001-tenant-a]
type=endpoint
context=tenant-a-internal

[1001-tenant-b]
type=endpoint
context=tenant-b-internal

Ensure extension numbers don't collide across tenants (or use a prefix/namespace scheme), and that each endpoint's context correctly scopes it to the appropriate tenant's dialplan.

Isolating Voicemail and Recordings Per Tenant

Ensure voicemail boxes, call recordings, and other tenant-specific data are stored with clear tenant separation (separate directory structures, at minimum) — both for genuine isolation and to simplify eventual data export if a tenant relationship ends.

Considering Full VM/Container Isolation (Stronger Alternative)

For genuinely strong isolation guarantees (particularly if tenants are external customers rather than internal business units), running entirely separate Asterisk instances per tenant (in separate containers or VMs) provides stronger isolation than shared-instance context separation — trades resource efficiency for genuine security/isolation strength.

Setting Up Per-Tenant Billing/Usage Tracking

If billing tenants based on usage, ensure your CDR (Call Detail Record) data is properly tagged/separable by tenant — essential for accurate usage-based billing across multiple tenants sharing infrastructure.

Managing Tenant Onboarding/Offboarding

Establish a clear, ideally automated process for adding new tenants and cleanly removing departed ones — manual, ad-hoc tenant management becomes increasingly error-prone as tenant count grows.

Securing Against Cross-Tenant Access

See How to Secure a VoIP Server Against Toll Fraud for general VoIP security — specifically verify (through actual testing, not just configuration review) that tenants genuinely cannot access or interfere with each other's extensions/data.

Common Errors

A tenant discovers they can somehow reach another tenant's extension — treat this as a genuine security/isolation failure requiring immediate investigation; review your context/dialplan isolation configuration thoroughly, since this represents a fundamental breach of the multi-tenancy promise.

Continue Reading

Browse more articles in VoIP & Communication Servers.

  • multi tenant pbx hosting, asterisk context isolation, shared pbx multiple customers, tenant separation voip
  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

How to Install Asterisk PBX on a VPS

Asterisk is the foundational open-source telephony engine powering most self-hosted PBX systems...

How to Install FreePBX on a VPS

FreePBX is a widely-used, open-source web interface built on top of Asterisk — making PBX...

How to Set Up SIP Trunking for Your PBX

A SIP trunk connects your self-hosted PBX to the public telephone network, letting you make and...

How to Configure Extensions and Voicemail in Asterisk

Extensions are the individual phone lines within your PBX system, and voicemail lets callers...

How to Secure a VoIP Server Against Toll Fraud

An unsecured VoIP server is a common target for toll fraud — attackers who compromise weak...