Setting up the call
Bob's phone sends a SIP REGISTER to the SIP server: "bob@example.com is now at 198.51.100.20." SIP, the Session Initiation Protocol (RFC 3261), sets calls up; it carries no sound.
Alice dials Bob. Her phone sends an INVITE to the SIP server. Inside rides an SDP offer (Session Description Protocol, RFC 8866): the voice codecs it can use and the UDP port, 49170, where it wants sound.
The SIP server answers Alice with 100 Trying, looks up where bob@example.com registered, and forwards the INVITE to 198.51.100.20. It acts as a proxy: it passes messages along, adding its own Via line.
Bob's phone rings and replies 180 Ringing. Replies retrace the Via lines, so it goes back through the SIP server to Alice, who now hears a ringing tone.
Bob picks up. His phone sends 200 OK with an SDP answer (RFC 3264): it picks G.711 µ-law (PCMU, payload type 0) from Alice's list and gives its own port, 49920.
Alice's phone confirms with ACK, sent straight to the Contact address in the 200 OK. INVITE, 200 OK, ACK: the call is set up, and the SIP server steps out of the way.
Carrying the voice
Now sound goes phone to phone, not through the server. Every 20 ms Alice's phone sends one RTP packet (Real-time Transport Protocol, RFC 3550) over UDP: 160 bytes of sound, 50 packets a second. Bob's phone does the same back.
Alice's phone marks each voice packet's DSCP field EF, value 46 (expedited forwarding, RFC 3246). Routers that honour it send EF packets before big downloads, so voice does not wait in long queues.
Packets leave every 20 ms but arrive unevenly; that unevenness is jitter. Bob's phone holds them in a jitter buffer for 40 ms, then plays one every 20 ms, smooth again.
Limits and hanging up
ITU-T G.114 says keep one-way delay under about 150 ms, or people talk over each other. Here: 20 + 50 + 40 = 110 ms. A lost packet is 20 ms of missing sound; phones hide one, but several in a row are heard.
Alice hangs up. Her phone sends a SIP BYE straight to Bob's phone, which replies 200 OK. Both phones stop sending RTP and close their voice ports.
The messages, step by step
;; step 1/11 · register ;; bob → sip UDP 198.51.100.20:5060 → 203.0.113.5:5060 REGISTER sip:example.com SIP/2.0 From: <sip:bob@example.com>;tag=a73kszlfl To: <sip:bob@example.com> Contact: <sip:bob@198.51.100.20> Expires: 3600 ← SIP/2.0 200 OK (binding saved for one hour)
Responses retrace the Via headers through the proxy. ACK and BYE go straight to the other phone because this proxy did not add Record-Route; many do, and then stay in the signalling path. DSCP marks are kept only inside networks that agree to honour them; across the public internet they are often ignored or reset.