4 min read

VoIP Call Analysis with SIP and RTP

Calls with noise, one-way audio, or half-open connections — how do you pinpoint these complaints with a capture? This article explains how to read the SIP call setup process and analyze RTP media streams, with criteria for common call quality problems and an evidence path.

VoIP Call Analysis with SIP and RTP
SummaryKey Points
  • SIP handles call setup (INVITE/200 OK/ACK); RTP carries the actual voice data
  • The three factors of call quality: jitter, packet loss, and codec negotiation — all visible in a capture
  • Typical problems and their signatures: one-way audio = RTP in one direction only; noise = high jitter; silence = SDP negotiation failure
  • Real sample: sip-rtp.pcapng verifies the complete call setup flow

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:

MessageWhat to look at
INVITEFrom/To, Call-ID, the codec list and ports in the SDP
100 TryingServer received it; the callee is being routed
180 RingingThe callee is ringing
200 OKThe callee answered; the returned SDP is the negotiation that takes effect
ACKThree-way handshake confirmation; the media stream starts afterward
BYE/CANCELHang-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.

!Protocol details


Next up: Routing Protocol Analysis: Reading RADIUS / BGP / OSPF Captures.

VoIPSIPRTPCall QualityVoice
Share
Back to home