Every component, connected.
Asterisk for the media. An API for your flows. A web interface for the team. Understand the system you operate.
Two planes, one phone system
The media plane is Asterisk 22 with PJSIP, ARI and AMI. The control plane is a Node/Fastify API that writes Asterisk configuration and executes IVR graphs. Employees and administrators use the React web application.
API ↔ Asterisk over ARI / AMI · coturn relays remote WebRTC media.
The diagram represents the Docker Compose service layout. The all-in-one image bundles the application, Asterisk, embedded PostgreSQL and speech process tree; Compose provides separate services, an nginx edge and coturn.
Follow a call
- A SIP provider or phone reaches Asterisk using the configured transport and media ports.
- Inbound routes select a destination: extension, ring group, queue, IVR, schedule or another supported target.
- The API’s ARI flow engine runs the published IVR graph. Nodes can play prompts, collect digits, query an API and select a destination.
- Asterisk handles the connected media and configured MixMonitor recording.
- AMI/ARI events feed live status and logs through the API. WebSocket updates reach the panel and portal.
The browser softphone registers over WSS through /asterisk-ws. WebRTC media uses DTLS-SRTP; coturn supports off-site media traversal.
What each service owns
| Component | Responsibility |
|---|---|
| nginx (Compose) | HTTPS, ACME, reverse proxy for the web app, API and Asterisk WSS; optional TURNS multiplexing. |
| Web | Admin and employee portal; browser softphone uses SIP.js. |
| Fastify API | Sessions, integration API, ARI flow execution, configuration generation, certificate client and background jobs. |
| Asterisk 22 | SIP endpoints, queues, dialplan, call control and media/recording. |
| PostgreSQL | Source of truth for extensions, routes, flows, CDR and settings. |
| Speech engines | Edge Neural online synthesis and embedded EMA offline Turkish synthesis. |
| coturn (Compose) | TURN relay for remote browser softphones. |
Persistence is part of the architecture
The single image uses /data for the embedded database, settings, secrets, Asterisk configuration and recordings. With Compose, named volumes include pgdata, recordings, uploads and asterisk_config; certificates are bind-mounted.
A volume is persistence, not a backup. Plan database exports, recording archives and recovery of encryption keys. Test restores separately from an ordinary application restart.
Know the boundaries
MunaSIP targets a small office around 20 extensions. It is not a documented automatic high-availability cluster. Carrier-side failover can redirect inbound calls if the PBX host or uplink fails.
The documented scope does not include video meetings, team chat, WhatsApp, predictive dialing or first-party desktop/mobile apps. Integrate external tools through the API and webhooks where appropriate.