Advertisement Space

How SIP Calls Work

Animated visual diagrams explaining SIP signaling, call setup, registration, failure scenarios, and message structure. The definitive visual guide for VoIP and telecom engineers.

Signaling Protocol

SIP handles call setup, modification, and teardown. It does not carry voice data — that is handled by RTP on separate ports.

Text-Based Messages

SIP messages are human-readable text (similar to HTTP), making them easy to debug with packet capture tools like Wireshark.

Request / Response Model

Like HTTP, SIP uses methods (INVITE, BYE) and numeric response codes (200 OK, 404 Not Found) in a client-server pattern.

Defined in RFC 3261

The core SIP specification. Extended by dozens of additional RFCs for features like presence, messaging, and call transfer.

SIP Ports Call Flow Registration Failure Scenarios SIP Message SIP vs Traditional Methods Reference

SIP Ports Reference

Key network ports used in SIP/VoIP communication for signaling and media transport.

5060
SIP over UDP / TCP
Default SIP signaling port. Used by most VoIP systems for unencrypted call setup and registration.
Unencrypted
5061
SIP over TLS (SIPS)
Encrypted SIP signaling using TLS. Required for SIPS URIs and secure VoIP deployments.
Encrypted
5062
SIP over WebSocket
Commonly used for SIP over WebSocket (WS) connections, enabling browser-based VoIP clients.
Unencrypted
10000–20000
RTP Media (UDP)
Dynamic port range for Real-time Transport Protocol. Carries actual voice and video data packets.
Varies (SRTP available)
443
SIP over WSS (WebRTC)
WebSocket Secure for SIP signaling. Used by WebRTC applications and browser-based softphones.
Encrypted

Basic SIP Call Flow

A successful SIP call from INVITE to BYE, showing every signaling message between the caller, proxy server, and callee.

Successful SIP Call Setup & Teardown
Caller (UAC)
Alice
SIP Proxy
proxy.example.com
Callee (UAS)
Bob
1-3

INVITE & 100 Trying — Caller sends INVITE to proxy. Proxy immediately replies 100 Trying (stops retransmissions), then forwards INVITE to callee.

4-5

180 Ringing — Callee's phone rings and sends 180 back through the proxy. Caller hears ringback tone.

6-7

200 OK — Callee answers. 200 OK contains SDP with callee's media capabilities and RTP port.

8

ACK — Caller acknowledges the 200 OK, completing the three-way handshake. The dialog is now established.

9

RTP Media — Voice/video data flows directly between endpoints (or through a media relay) using RTP on negotiated ports.

10-11

BYE & 200 OK — Either party sends BYE to end the call. The other side confirms with 200 OK and releases resources.

SIP Registration Flow

How a SIP phone authenticates with the registrar using digest authentication (challenge-response).

SIP Registration with Authentication
SIP Phone (UA)
192.168.1.100
SIP Registrar
registrar.example.com
How SIP Digest Authentication Works: The registrar rejects the first REGISTER with 401 Unauthorized and includes a nonce (random challenge) in the WWW-Authenticate header. The phone then hashes its password with this nonce and the realm, sending the credentials in the Authorization header. This prevents passwords from being sent in cleartext. Registration typically expires after 3600 seconds and must be refreshed periodically.

Failed Call Scenarios

Common SIP call failure flows showing how different error conditions are signaled.

Scenario A: User Busy (486)
Caller
Proxy
Callee (Busy)
Scenario B: No Answer / Timeout (408)
Caller
Proxy
Callee (No Answer)
Scenario C: Not Found (404)
Caller
Proxy
Unknown User
Troubleshooting Tip: When a call fails, the SIP response code tells you exactly what went wrong. 486 means the callee is on another call, 408 indicates network or timeout issues (the callee may be unreachable), and 404 means the user does not exist in the proxy's location database. Always check your SIP proxy logs and use sngrep or Wireshark to capture the actual SIP messages for debugging.

SIP Message Structure

Anatomy of a real SIP INVITE message with SDP body, showing every field and its purpose.

/* --- Request Line --- */ INVITE sip:bob@example.com SIP/2.0 /* --- Headers --- */ Via: SIP/2.0/UDP caller.example.com:5060;branch=z9hG4bK776 Max-Forwards: 70 From: Alice <sip:alice@example.com>;tag=1928301774 To: Bob <sip:bob@example.com> Call-ID: a84b4c76e66710@caller.example.com CSeq: 314159 INVITE Contact: <sip:alice@192.168.1.100:5060> Content-Type: application/sdp Content-Length: 142 /* --- SDP Body (Session Description Protocol) --- */ v=0 o=alice 53655765 2353687637 IN IP4 192.168.1.100 s=Session SDP c=IN IP4 192.168.1.100 t=0 0 m=audio 49170 RTP/AVP 0 8 97 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 opus/48000/2

Request Line — Method (INVITE), Request-URI (who to call), and SIP version

Via — Records the transport path; branch is a unique transaction ID

From / To — Logical sender and recipient with display names and SIP URIs

Call-ID — Globally unique identifier for this dialog (call session)

CSeq — Command sequence number, ensures proper ordering of requests

Contact — Direct URI for subsequent requests (bypasses proxy)

SDP Body — Describes media capabilities: codecs (G.711u, G.711a, Opus), IP, and RTP port

m=audio line — Offers port 49170 for audio using RTP with payload types 0, 8, 97

SIP/VoIP vs Traditional Phone Call

How packet-switched VoIP differs from circuit-switched PSTN telephony.

Traditional (PSTN)

Circuit-switched — a dedicated physical path is held open for the entire call duration

Phone
Local
Exchange
Trunk
Line
Remote
Exchange
Phone
Continuous dedicated circuit — bandwidth reserved even during silence

SIP / VoIP

Packet-switched — voice is digitized into packets that share the network with other data

IP Phone
SIP
Server
Internet
SIP
Server
IP Phone
Packets share network — bandwidth used only when speaking (VAD/silence suppression)
AspectTraditional PSTNSIP / VoIP
SwitchingCircuit-switched (dedicated path)Packet-switched (shared network)
Bandwidth64 kbps fixed per channel (G.711)Variable — 6-90 kbps depending on codec
ProtocolSS7 / ISDN signalingSIP / H.323 signaling + RTP media
InfrastructureCopper/fiber to exchange, dedicated switchesAny IP network — LAN, WAN, Internet
CostPer-minute, distance-based pricingFlat rate or per-minute, distance irrelevant
FeaturesLimited (call waiting, forwarding)Extensive (presence, IM, video, conferencing, APIs)
ReliabilityVery high (99.999%), powered from exchangeDepends on network; needs backup power (UPS)

SIP Methods Quick Reference

All standard SIP request methods defined in RFCs 3261, 3262, 3265, 3428, 3515, and 6086.

MethodDescriptionWhen Used
INVITEInitiates a session (call)Starting a new call or modifying an existing session (re-INVITE)
ACKConfirms final response to INVITESent after receiving a 2xx or error response to complete the 3-way handshake
BYETerminates an established sessionEither party hangs up an active call
CANCELCancels a pending INVITECaller hangs up before the callee answers (during ringing)
REGISTERRegisters contact URI with registrarPhone boots up, or periodically refreshes its registration binding
OPTIONSQueries capabilities of a UA or serverKeep-alive pings, feature discovery, or connectivity checks
REFERAsks recipient to issue a request (transfer)Call transfer — tells a party to INVITE a third party
SUBSCRIBESubscribes to event notificationsPresence monitoring, BLF (busy lamp field), message waiting
NOTIFYDelivers event notificationServer informs subscriber of state changes (e.g., user went offline)
INFOSends mid-session informationDTMF digits, billing info, or custom data during an active call
UPDATEModifies session before final responseChanging codecs or adding video before the call is fully established
MESSAGESends an instant messageSIP-based text messaging (similar to SMS over IP)
PRACKProvisional response acknowledgmentAcknowledges reliable provisional responses (1xx with 100rel)
Advertisement Space
We use cookies for analytics and advertising. By using this site, you agree to our Privacy Policy.