own-pbx
A self-hosted home/hobby phone system. Plain Asterisk 22 does the calling, a small Python service makes every call decision, a clean web panel runs the whole thing, and a separate Kamailio edge box is the only part that faces the internet.
own-pbx is built and tested as a home/hobby PBX. It is not intended for business, commercial, multi-tenant, carrier or life-safety use, and comes with no warranty. Only tested with VoIP.ms. 911/E911 has NOT been tested end to end — do not rely on this system to call 911. Stripe billing has not been tested with real payments. Published as-is under GPL-2.0-or-later.
What you get
Calling →
Extensions, ring groups, IVR menus, conference room, voicemail by phone.
Phones anywhere →
Desk phones and softphones at home; encrypted TLS + SRTP through the edge box when away.
Texting →
Extension-to-extension texts plus real two-way SMS/MMS through voip.ms.
My Phone →
Every user gets calls, voicemail, recordings, texts, IVR, billing and settings.
How it fits together
Internet
│
TCP 5061 (TLS) + UDP 20000-20099 (SRTP audio)
│
┌──────▼───────┐ Router forwards ONLY these to the edge.
│ Edge server │ Kamailio (SIP proxy) + rtpengine (audio relay)
│ 192.168.1.11 │ fail2ban, flood limit, TLS certificate
└──────┬───────┘
│ plain SIP/RTP on your LAN
┌──────▼───────┐
Office phones ─► PBX server │ Asterisk 22 (calls, audio, voicemail)
(UDP 5060) │ 192.168.1.10 │ pbx-brain (Python: every call decision)
│ │ pbx-agi (Python: texts)
│ │ pbx-api (Python: web panel, port 8001)
└──────────────┘ SQLite database /var/lib/pbx/pbx.db
│
SIP trunk provider (outbound registration)
- Asterisk handles the low-level work: SIP, audio, recording, playing sounds. It has almost no dialplan — every call is handed to pbx-brain.
- pbx-brain decides what happens to every call: who rings, forwarding, voicemail, ring groups, IVR, 911, plans and blocking.
- pbx-api is the web panel and REST API. It owns the database and rebuilds Asterisk's phone list whenever you change users or trunks.
- The edge server is optional. Without it the system works fully inside your network; you only need it for phones away from home.
Ports at a glance
| Where | Port | What | Who can reach it |
|---|---|---|---|
| PBX | 5060 UDP/TCP | SIP for office phones and the edge | your LAN only |
| PBX | 8001 TCP | web panel (admin + My Phone) | your LAN (optionally My Phone via tunnel) |
| PBX | 8088, 8099, 4573 | Asterisk API, brain status, text handler | the PBX itself only |
| Edge | 5061 TCP | SIP over TLS for outside phones | internet |
| Edge | 20000–20099 UDP | call audio (SRTP) | internet |
Where to go from here
| If you want to | Start at |
|---|---|
| Install it | Installation |
| Set up phones | Phones & feature codes |
| Run the system day to day | Admin panel |
| Text from extensions and DIDs | SMS & MMS |
| Understand the security model | Security |
| Fix something broken | Troubleshooting |