SIP Call Flow

Visual SIP call flow diagrams showing how VoIP calls establish, negotiate media, and terminate

Basic SIP Call Flow

A standard VoIP call between two SIP user agents follows this sequence:

StepFromToMessageDescription
1UACUASINVITE sip:user@example.comRequest to start a call
2UASUAC100 TryingRequest received, processing
3UASUAC180 RingingCalled party is ringing
4UASUAC200 OKCall answered
5UACUASACKConfirms 200 OK received, media begins
6BothBothRTP Media (audio/video)Actual voice/video traffic
7UACUASBYEHang up request
8UASUAC200 OKHangup confirmed, call ended

SIP Registration Flow

Before making calls, SIP user agents register with a registrar server:

StepFromToMessageDescription
1UARegistrarREGISTER sip:example.comRequest to register contact
2RegistrarUA401 UnauthorizedChallenge with nonce
3UARegistrarREGISTER (with auth)Retry with credentials
4RegistrarUA200 OKRegistration successful

Common Failure Responses

When a call fails, the SIP server returns one of these responses:

CodeNameWhat It Means
404Not FoundCalled number does not exist
408Request TimeoutNo response from called party in time
480Temporarily UnavailableUser offline or busy with DND
486Busy HereCalled party is on another call
487Request TerminatedCaller hung up before pickup (CANCEL)
503Service UnavailableServer/trunk overloaded or down

See the full list at SIP Response Codes →

SIP Port Reference

Standard ports used by SIP and related protocols:

PortProtocolDescription
5060UDP/TCPSIP signaling (unencrypted)
5061TLSSIP signaling (TLS encrypted)
5062-5082VariousAlternative SIP ports
10000-20000RTP/UDPMedia (voice/video) - typical range
3478STUNNAT traversal
5349STUN/TLSEncrypted STUN

Key SIP Concepts

  • UAC (User Agent Client): The SIP endpoint that initiates the request (caller)
  • UAS (User Agent Server): The SIP endpoint that receives and responds (callee)
  • Registrar: Server that tracks user location and contact info
  • Proxy: Routes SIP messages without altering them
  • SDP (Session Description Protocol): Carried in INVITE/200 OK to negotiate codec, ports, media capabilities
  • RTP (Real-time Transport Protocol): Actually carries the voice/video data once the session is set up