What Happens During a Call
A VoIP call consists of two "streams" with completely separate responsibilities:
- SIP (Session Initiation Protocol): signaling, responsible for the "making a phone call" part — who calls whom, which codecs are used, which ports the media flows through;
- RTP (Real-time Transport): media, carrying the actual voice data packets over the negotiated UDP ports.
The first lesson in troubleshooting: signaling problems and media problems are two different things. If the call won't connect (setup failure), look at SIP; if the call connects but quality is poor, look at RTP.
Breaking Down the SIP Call Setup Flow
A standard SIP call (simplified):
Caller SIP server Callee
|---- INVITE (SDP) ---->| |
| |---- INVITE (SDP) --------> |
| |<--- 100 Trying ----------- |
|<--- 100 Trying -------| |
| |<--- 180 Ringing ---------- |
|<--- 180 Ringing ------| |
| |<--- 200 OK (SDP) --------- | Callee answers; SDP exchange complete
|<--- 200 OK (SDP) ----| |
|---- ACK ------------->| |
| |---- ACK ----------------> |
|<============ RTP media stream (direct between parties or via an RTP relay) ===========>|
SDP (Session Description Protocol) hides in the message bodies of INVITE and 200 OK — it is the "contract" for the entire call: each side declares its supported codecs (G.711, G.729, Opus…), media IPs, and ports. Where the media stream flows is entirely decided by SDP.
What to look for in SIP in a capture:
| Message | What to look at |
|---|---|
| INVITE | From/To, Call-ID, the codec list and ports in the SDP |
| 100 Trying | Server received it; the callee is being routed |
| 180 Ringing | The callee is ringing |
| 200 OK | The callee answered; the returned SDP is the negotiation that takes effect |
| ACK | Three-way handshake confirmation; the media stream starts afterward |
| BYE/CANCEL | Hang-up or cancel — see who sent it first and why |
RTP Media Stream Analysis
Once SIP call setup completes, RTP packets start flowing. Analysis points:
1. Stream directionality: a normal call has bidirectional RTP (one stream per direction). If RTP exists in only one direction, that's "one-way audio" — a classic failure, usually because NAT/firewall allowed only one direction.
2. Sequence numbers and timestamps: RTP sequence numbers increment continuously; gaps mean packet loss. Timestamps increment by the sampling rate, reflecting the actual media clock.
3. Jitter: fluctuation in RTP packet inter-arrival times. Jitter buffers absorb some jitter, but sustained high jitter (>50ms) turns directly into audible noise and choppiness.
4. Codec consistency: a mismatch in the codec finally negotiated by both sides (the PT payload type) causes silence or noise — comparing the SDP in INVITE and 200 OK reveals it.
How-to: Pinpointing Call Quality Problems
Step 1: Locate the problem call. Open the capture and PcapDecoder's VoIP card automatically aggregates SIP calls and RTP streams: each call's Call-ID, caller and callee, start/end times, and negotiated codec are listed in one table. No filter syntax to memorize — tap a call in the card to expand all of that call's SIP messages and RTP streams.
Step 2: Confirm the call setup is normal. Inside the card, check whether the full INVITE → 200 OK → ACK chain is intact and whether the codecs negotiated in both sides' SDP match — any missing link or failed negotiation is shown directly as an abnormal state in the card.
Step 3: Analyze RTP quality. Switch to the RTP stream view and check:
- Are streams present in both directions? (one-way-audio detection: if RTP exists in only one direction, the card flags it directly)
- Any sequence number gaps? (packet loss rate)
- How large is the inter-arrival jitter?
- Does the payload type match the SDP negotiation?
Step 4: Write the conclusion clearly. "8% RTP packet loss caller-to-callee with 60ms jitter causes audible choppiness; the reverse stream is normal — the problem is on the caller's network or firewall." PcapDecoder's report workbench can export the VoIP card together with the conclusion, straight into a ticket.
Next up: Routing Protocol Analysis: Reading RADIUS / BGP / OSPF Captures.
