Class 4 vs Class 5 Switches (Trunking vs PBX)
Class 4 and Class 5 are inherited from the original AT&T 1950s switching hierarchy, but the distinction still defines how modern softswitches, SIP trunking carriers, and PBXs are built. Class 4 = wholesale transit (trunk-to-trunk routing, billing, no end-user features). Class 5 = end-office (extensions, IVR, voicemail, transfer, hold). Most products today are explicitly one or the other, and trying to use a Class 5 system as a Class 4 carrier (or vice versa) is one of the most common architectural mistakes in VoIP.
The original AT&T hierarchy
AT&T's 1950s long-distance network was a 5-class pyramid:
- Class 1: regional center (national long-distance backbone, ~10 in the US)
- Class 2: sectional center
- Class 3: primary center
- Class 4: toll center / tandem (long-distance switching)
- Class 5: end office (CO — central office serving subscribers)
By the 1990s the hierarchy collapsed into mostly two practical roles: Class 4 (transit / wholesale) and Class 5 (subscriber-facing). Modern VoIP inherits this vocabulary, even though softswitches don't physically resemble the old TDM equipment.
Class 4 (transit / softswitch / wholesale)
A Class 4 system routes calls between other carriers. It does not serve end users.
- Inputs: SIP trunks from upstream carriers, VoIP peerings, TDM trunks.
- Outputs: SIP trunks to downstream carriers or Class 5 systems.
- Features: least-cost routing, rate decks, CDR billing, traffic shaping, fraud detection, STIR/SHAKEN signing/verification, codec transcoding, NAT traversal at scale.
- Does NOT have: extensions, voicemail, IVR, hunt groups, ring tones, hold music, BLF/presence.
- Capacity: tens of thousands to millions of concurrent calls per node.
Examples: Kamailio (route logic), OpenSIPS, Cataleya, Sonus PSX, Oracle ECB, Sansay VSXi, Ribbon NSX. Almost every wholesale SIP trunking carrier (DIDHub included) is a Class 4 stack at its core.
Class 5 (end-office / PBX / hosted PBX)
A Class 5 system terminates calls at end users and provides telephony features.
- Inputs: trunks from a Class 4 / carrier; user registrations from phones, softphones, Teams.
- Outputs: calls to extensions; calls back out to the trunk.
- Features: extensions, IVR, ring groups, hunt groups, queues, voicemail, voicemail-to-email, transfer, hold, hold music, conference, BLF/presence, CDR per user.
- Capacity: hundreds to a few thousand registered users per node.
Examples: Asterisk + FreePBX, 3CX, FreeSWITCH (configured as PBX), Cisco CUCM, Microsoft Teams Phone (with Direct Routing), RingCentral, Zoom Phone, Avaya Aura, Mitel.
Side-by-side
| Class 4 (trunking) | Class 5 (PBX) | |
|---|---|---|
| Primary purpose | Route calls between carriers | Serve end-users with features |
| Who registers to it | Other carriers / softswitches | End-users (phones, softphones) |
| Has extensions? | No | Yes |
| Has voicemail / IVR? | No | Yes |
| Per-call billing? | Yes (rate decks, CDRs) | Often per-user, not per-call |
| STIR/SHAKEN signing? | Yes (originating attestation) | Rarely — relies on upstream |
| Codec transcoding? | Yes, at scale | Limited, per-call |
| Capacity | 10K-1M+ CPS | 100-5K registered users |
| Typical software | Kamailio, OpenSIPS, Sansay, Sonus | Asterisk/FreePBX, 3CX, Teams, RingCentral |
Where DIDHub fits (Class 4)
DIDHub is a Class 4 carrier. We do not sell hosted-PBX features — no IVRs, no extensions, no voicemail. We provide DIDs, SIP trunks, STIR/SHAKEN, OBR-aware least-cost routing, and managed SBCs (for Teams Direct Routing).
You bring your own Class 5: an on-prem PBX (Asterisk, 3CX, FreePBX), a hosted PBX (Teams, Zoom, RingCentral via BYOC), or an AI voice agent platform (Vapi, Retell, ElevenLabs). DIDHub is the wholesale telecom layer underneath.
Common architectural mistakes
- Trying to use Asterisk as a wholesale carrier: Asterisk is a Class 5 PBX. Above ~500-1000 concurrent calls it falls over — per-channel state, voicemail processes, etc., all inflate memory. For trunking at scale, switch to Kamailio or OpenSIPS in front (Class 4) and keep Asterisk only for media-anchored features.
- Trying to use Kamailio as a PBX: Kamailio has no native voicemail, IVR, or queues. People who try to bolt these on inevitably end up running an Asterisk behind it — correctly recreating the Class 4 + Class 5 split they were trying to avoid.
- Buying 'a SIP trunk' when you needed a hosted PBX: a SIP trunk gives you a phone number and minutes. It does not give you 'press 1 for sales'. You need a PBX (or AI voice agent) on top.
- Buying a hosted PBX when you needed wholesale termination: if you're a SaaS reselling voice, RingCentral / 3CX cannot give you the per-minute economics or DID inventory of a Class 4 carrier. Go direct to a wholesale provider like DIDHub.
Hybrid: when one node does both
FreeSWITCH is the most common Class 4/5 hybrid. It can run as either, and large deployments use it as both: a Class 4 dispatcher in front, Class 5 PBX cluster behind, all the same software.
This works for mid-sized telcos but not at carrier-grade scale — once you exceed ~10K concurrent calls per node, splitting into purpose-built Class 4 + Class 5 nodes becomes mandatory for performance and operational sanity.
References
- ITU-T Q.700 series — Signalling System No. 7 (SS7) network architecture
- RFC 3261 — SIP (Class 4 and 5 both implement this)
- PBX (Class 5)
- SIP Trunk (Class 4 product)
Related terms
PBX (Private Branch Exchange)
SIP Trunk
SBC (Session Border Controller)
BYOC (Bring Your Own Carrier)
Microsoft Teams Direct Routing
Ready to get a number?
Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.