Project overview
A hosted business-phone product needed one codebase that could sell seats to many companies. Each tenant required its own extensions, devices, IVR, recordings and administrators — on shared media infrastructure.
Business challenge
Shared FreeSWITCH/Asterisk cores are efficient, but a leaky tenant boundary is a product-ending bug. The work was to isolate identities, CDRs, recordings and admin rights while still sharing SIP trunks, media ports and a single control plane.
Solution architecture
Asterisk and FreeSWITCH handled SIP and media. NestJS exposed provision, auth and CDR APIs. React/Next.js delivered tenant admin and a super-admin console. PostgreSQL stored tenant-scoped configuration. WebRTC covered browser endpoints so users did not need a desktop softphone.
Call control and media stay on the PBX cores. The application layer owns tenants, users, devices, billing hooks and APIs. Supervisors never see another tenant's queue, recording or extension list.
Technology stack
Key features
Multi-organization tenancy
Companies, users, devices and extensions scoped by tenant identifier.
Unified administration
Tenant admins manage their PBX; super-admins operate the platform.
SIP and WebRTC endpoints
Desk phones and browser clients on the same numbering plan.
API-first provision
REST endpoints for extensions, trunks and workflow hooks.
My role
Implementation
Delivery covered schema design, auth, provision APIs, admin UI, SIP registration paths and a first production tenant cut-over. Confidential client names, DIDs and recordings are omitted.
Results / capabilities
- Multiple organizations on one deploy
- Device mix: SIP + WebRTC
- Admin and API layers instead of FreeSWITCH XML-only ops
Building something in this class?
Share the workflow, current stack and constraints. The first reply is an architecture-minded review.
Discuss Your Project