SIP INVITE Call Flow Explained: From First Request to BYE
A basic SIP call is a three-way handshake plus a teardown: INVITE, a final response such as 200 OK, then ACK, followed by media and finally BYE. Learning to read this sequence is the fastest way to debug call setup problems.
The Standard Successful Call
Caller Proxy Callee
| --- INVITE (SDP offer) --->|--- INVITE ------------>|
|<-- 100 Trying -------------|<-- 180 Ringing --------|
|<-- 180 Ringing ------------| |
| |<-- 200 OK (SDP answer)-|
|<-- 200 OK -----------------| |
| --- ACK ------------------>|--- ACK -------------->|
|============ RTP media both ways =====================|
| --- BYE ------------------>|--- BYE -------------->|
|<-- 200 OK ------------------|<-- 200 OK ------------|
What Each Message Does
- INVITE requests a session and normally carries an SDP offer listing codecs and the media address (see SDP offer/answer).
- 100 Trying is hop-by-hop. It tells the sender the request was received and to stop retransmitting.
- 180 Ringing or 183 Session Progress indicates alerting. A 183 with SDP allows early media such as ringback tones or announcements.
- 200 OK means the callee answered and includes the SDP answer.
- ACK completes the INVITE transaction. It is its own message and is easy to lose to a firewall, which causes calls to drop after about 32 seconds as the 200 OK is retransmitted.
- BYE terminates the dialog, answered by a 200 OK.
Transactions vs Dialogs
A transaction is one request and its responses. A dialog is the longer-lived relationship identified by the Call-ID plus the From and To tags. INVITE creates the dialog; BYE ends it. Mid-call changes such as hold or codec change are re-INVITEs inside the same dialog.
Failed and Cancelled Calls
- CANCEL abandons an INVITE that has not yet been answered, for example when the caller hangs up while it rings.
- 4xx, 5xx, and 6xx final responses end the attempt. A 486 means busy, a 404 means no such destination, a 503 means the next hop is overloaded (see SIP response codes).
- A 302 redirect tells the caller to try another address.
Reading a Trace Fast
- Find the Call-ID and filter to that one call.
- Check who sent the final response. The meaning changes between phone, proxy, and carrier.
- Look for retransmissions, which show a lost packet or a silent far end.
- Compare the SDP in the offer and answer for codec and address mismatches.
- Confirm ACK and BYE actually arrive at both ends.
Continuous capture makes this routine. See SIP monitoring with Homer and HEP.
Why Calls Connect but Have No Audio
Signaling succeeded, so the failure is in media: the SDP advertised a private address, an RTP port range is blocked, or a media relay is missing. Review NAT traversal with STUN, TURN, and ICE and the fundamentals of SIP.
Stuck on a call-setup bug in production? Our FreeSWITCH engineering team traces and fixes signaling and media issues in live VoIP platforms.
Related Services
Keep Reading
Discussion
0Join the conversation
Sign in with your preferred account to comment, reply, and keep the discussion useful for other engineers.
Takes a few seconds. No separate password required.
Controva LLC
Engineering Team
We build digital empires that scale. Specializing in high-performance web architecture, AI automation, and headless commerce.
Work with us