Fundamentals
How VoIP Works: Signaling, Media and the PSTN
Every VoIP call is two conversations pretending to be one. The first conversation — signaling, usually SIP — is about the call: who is calling whom, which features, where the audio should be sent, and when it is over. The second conversation — the media stream, usually RTP — is the call itself: your voice, encoded into packets dozens of times per second. Everything in VoIP troubleshooting, pricing and design becomes clearer the moment you hold these two apart.
This guide walks a call from dial to hangup and names every element it touches, so the rest of this site has a map to refer to.
The elements
| Element | Job | Examples in the wild |
|---|---|---|
| Endpoint | Where a human meets the system; encodes/decodes voice, speaks SIP | Desk phone, softphone app, mobile client, ATA with an analog phone |
| Registrar / PBX / platform | Knows where every user currently is; applies call logic (queues, voicemail, recording) | Hosted VoIP platform, on-premise IP PBX, cloud UCaaS |
| Proxy / SBC | Routes signaling between domains; often anchors media, fixes NAT, enforces security | Carrier SBCs at every provider edge; your trunk's border element |
| Media path (RTP) | Carries the voice packets directly between endpoints or via relays | Phone ↔ phone on a LAN; phone ↔ provider media relay across the internet |
| Gateway / trunk | Where IP telephony meets the PSTN (the traditional phone network) | SIP trunk to a carrier; legacy PRI/analog gateways |
A call, step by step
You dial. Your phone sends an INVITE — a SIP request that also carries an SDP description: 'I can speak these codecs, send audio to this IP and port.' The platform applies logic (is this user allowed? where is the callee?) and forwards the invitation; the far phone rings (180 Ringing). They answer: 200 OK with their own SDP, you reply ACK — and only now does anyone talk. RTP flows between the negotiated addresses, packetized every 20 ms by default, sequenced and timestamped so the receiver can detect loss and jitter. Either side hanging up sends a BYE. Registration underlies all of it: before any of this, your phone REGISTERed its current location so the platform could find it. Notice what the signaling never does: it never carries a syllable of your voice. That is why calls can ring perfectly and sound broken (media fault), or sound perfect until they drop at a timer (signaling fault) — the two conversations fail independently, and the whole troubleshooting pillar is organized around that fact.
INVITE -> "let's talk: I offer G.711/G.729 at 203.0.113.5:12000" 180 <- Ringing 200 OK <- "agreed: G.711, send to 198.51.100.9:31000" ACK -> RTP <=> the actual voice, 50 packets/second each way BYE -> / 200 OK <- call over
The model to carry into every fault
- Rings but sounds broken (or silent)? Media path (RTP): addresses, NAT, firewalls, jitter, loss.
- Never rings, errors immediately, drops at exact timers? Signaling path (SIP): codes, registration, session timers.
- Works internally, fails externally (or the reverse)? The boundary between the two domains — trunks, SBC, NAT at the edge.
- Intermittent and time-shaped? The shared resource both conversations ride on: your network's queues and capacity.
Frequently asked questions
- Is VoIP just 'phone calls over the internet'?
- It is phone calls over IP — which may be the public internet, your LAN, or a carrier's private IP network. Quality and security depend heavily on which IP path a given call takes; much of VoIP engineering is controlling that path.
- What replaced what in the old phone system?
- The PBX became software (hosted platform or IP PBX), the phone lines became SIP trunks, the handsets became small computers, and the dedicated wiring became your data network — which is why network quality became call quality.
- Why do calls have two IP addresses and ports in the SDP?
- Because signaling and media are separate: the SIP messages go to servers, while the media addresses in SDP tell each endpoint where to send voice directly. A mismatch between the SDP address and reality is the root of the classic one-way audio fault.