A SIP to SIP call flow is the sequence of signaling messages, primarily INVITE, 100 Trying, 180 Ringing, 200 OK, ACK, and BYE, exchanged between two SIP user agents to set up, modify, and tear down a voice or video session. Media negotiation happens inside those messages through SDP offers and answers. Developers building telephony features can bridge this traditional flow into modern WebRTC rooms using VideoSDK's telephony and SIP integration.
Every dropped call, one-way audio complaint, or failed registration you will debug in a VoIP system traces back to the SIP to SIP call flow. If you build telephony features, integrate a PBX with a cloud service, or connect traditional phone infrastructure to modern applications, this message sequence is the foundation you cannot skip.
The typical scenario is straightforward: two SIP user agents, a caller and a callee, exchange signaling either directly or through one or more SIP proxies. The signaling establishes the session, negotiates media parameters, and later tears the call down cleanly. Understanding each stage, and where it fails, is what separates a reliable deployment from a support-ticket generator.
By the end of this article you will understand the full SIP to SIP call flow, from the first INVITE to the final BYE, along with SDP negotiation, mid-call modification, NAT traversal, security, and a practical troubleshooting approach.

What Is SIP?

The Session Initiation Protocol is a text-based signaling protocol defined by the IETF that establishes, modifies, and terminates multimedia sessions over IP networks. SIP is defined as a signaling layer, meaning it negotiates and controls sessions but does not carry the actual voice or video. That job belongs to a media transport protocol, typically RTP, once the session is established.
SIP works by exchanging requests and responses between endpoints, following a request-response model similar in spirit to HTTP. Each request carries a method, such as INVITE or BYE, and each response carries a numeric status code indicating progress, success, or failure.
Three core functional elements make up a SIP architecture. A user agent is the endpoint, a softphone, desk phone, or application, that sends and receives SIP messages. A proxy is an intermediary server that routes requests toward their destination, applying routing rules without typically touching the media itself. A registrar accepts registration requests so the network knows where a user agent is currently reachable. In practice, these roles often run on the same server, but the logical separation matters when you debug routing problems.

SIP to SIP Call Flow Overview

A SIP to SIP call flow is defined as the complete, ordered sequence of SIP requests and responses exchanged between two SIP user agents to establish and later terminate a session. The flow works by progressing through four main stages: call setup, media negotiation, optional mid-call modification, and teardown.
During setup, the caller's user agent sends an INVITE toward the callee, usually routed through a SIP proxy. During media negotiation, both endpoints exchange Session Description Protocol, or SDP, payloads describing codecs, ports, and transport attributes. During modification, established sessions can be altered with re-INVITE or UPDATE requests, for example to place a call on hold or add video. During teardown, either party sends a BYE request to end the session gracefully.
The high-level architecture below shows the path signaling takes between the two user agents and the proxy that routes it.
Architecture Diagram

Detailed SIP Request-Response Sequence

The heart of the SIP to SIP call flow is the INVITE transaction, a carefully ordered exchange of requests and responses that every developer working with telephony should be able to recite from memory.

INVITE and 100 Trying

The call begins when the caller's user agent sends an INVITE request addressed to the callee's SIP URI. The INVITE carries the caller's identity, routing information in SIP header fields, and an SDP offer describing the media the caller wants to send. As the INVITE travels through the proxy, the proxy responds with a provisional 100 Trying message. This tells the caller that the request was received and routing is in progress, without yet indicating anything about the callee's state. Without a 100 Trying, a caller on a slow network might time out and cancel a call that is actually progressing fine.

180 Ringing and 200 OK

When the INVITE reaches the callee's user agent, the callee responds with 180 Ringing, a provisional response that triggers audible ringback on the caller's side. If the callee answers, their user agent sends a final 200 OK response. This 200 OK contains the callee's SDP answer, accepting the media parameters proposed in the original INVITE or adjusting them. The moment the 200 OK is generated, the callee considers the session established from their perspective, even though the handshake is not yet complete.

ACK and Media Path Establishment

The caller confirms receipt of the 200 OK by sending an ACK, completing the three-way handshake that establishes the SIP dialog. A SIP dialog is the peer-to-peer relationship between the two user agents, identified by a combination of tags and identifiers carried in the messages. Once the dialog is confirmed, media flows directly between the endpoints, or through a relay if NAT or firewall conditions require it. The SDP exchanged during setup has already agreed on codecs, IP addresses, and port numbers, so RTP packets can begin flowing immediately after the ACK.

BYE and Call Termination

When either party hangs up, their user agent sends a BYE request within the existing dialog. The other endpoint responds with a 200 OK acknowledging the termination, and the dialog closes. A graceful BYE teardown matters because it releases resources on proxies and media relays promptly, and it gives billing and analytics systems a clean end-of-call event to record.
The full message sequence, including the ACK handshake and teardown, is shown below.

SDP Negotiation Within the Call Flow

SDP negotiation is where the SIP to SIP call flow decides what media the session will actually carry. The Session Description Protocol is a structured payload embedded in the body of SIP messages, most importantly the INVITE and the 200 OK, that describes media streams in a way both endpoints can interpret.
SIP uses an offer/answer model for SDP negotiation. The caller's INVITE carries an SDP offer listing the codecs, payload types, encryption options, IP address, and port numbers the caller supports. The callee's 200 OK carries an SDP answer that selects one codec from the offered list and confirms the address and port where it expects to receive media. If the callee cannot accept any offered codec, the negotiation fails and the call is rejected with an error response.
Codec selection is the most visible part of this exchange. A typical offer might list several audio codecs in priority order, and the answer picks the first mutually supported one. Media attributes also cover details like telephone events for carrying DTMF, encryption keys when SRTP is used, and direction attributes indicating send-only, receive-only, or send-and-receive streams.
Developers debugging audio problems should remember that SDP only describes the media path, it does not enforce it. Two endpoints can agree perfectly on SDP and still fail to exchange RTP if the negotiated addresses are unreachable, which is exactly the NAT traversal problem covered later in this article.

Handling Mid-Call Changes: Re-INVITE and UPDATE

An established SIP dialog is not frozen. A SIP to SIP call flow supports mid-call modification through two mechanisms: the re-INVITE and the UPDATE request.
A re-INVITE is a new INVITE sent within an existing dialog. It works by proposing a fresh SDP offer while leaving the original session otherwise intact. Typical triggers include placing a call on hold, resuming it, adding a video stream to an audio-only call, or changing the media destination when a call is transferred. The receiving endpoint responds with its own SDP answer, and the media path shifts accordingly.
The UPDATE request serves a similar purpose but can be sent before the initial call setup completes, which makes it useful for early media adjustments and precondition flows common in mobile networks.
The signaling sequence for a hold, for example, follows a familiar pattern: the holding party sends a re-INVITE with an SDP direction attribute set to inactive or send-only, the other party answers with 200 OK confirming the change, and an ACK completes the transaction. One caution for developers: a re-INVITE that fails or is rejected does not tear down the call, the original session continues, which is a common source of confusion when debugging hold and resume behavior.

Session Timers and Keep-Alive

SIP session timers, standardized in RFC 4028 as an extension building on the UPDATE mechanism, solve a specific reliability problem in the SIP to SIP call flow: detecting when the other endpoint has silently disappeared, for example after a network outage or an unplanned device reboot.
Session timers work by having the endpoints periodically refresh the session with re-INVITE or UPDATE transactions during an active call. If a refresh fails repeatedly, the session is considered expired and each side tears it down locally. Without session timers, a dead endpoint leaves a ghost session that consumes resources and confuses billing.
For SIP to SIP calls, session timers matter most in long-duration sessions and in deployments where endpoints sit behind aggressive middleboxes. Recommended practice is to enable session timers with a refresh interval in the range of a few minutes, short enough to detect failures quickly, long enough not to burden the network with refresh traffic. Many deployments also rely on SIP OPTIONS messages as a lightweight keep-alive and reachability check between proxies and endpoints between calls.

NAT Traversal and Media Path Issues

Network address translation is the single most common source of broken SIP to SIP call flows. The core problem is that SDP carries private IP addresses and ports that are unreachable from the other side of the NAT device, so signaling succeeds while media fails, producing the classic one-way or no-way audio complaint.
Several mechanisms address this. STUN, the Session Traversal Utilities for NAT protocol, lets an endpoint discover its public address and the NAT's behavior before the call. TURN, the Traversal Using Relays around NAT protocol, provides a relay server that media can flow through when direct peer-to-peer transport is impossible. ICE, the Interactive Connectivity Establishment framework, gathers all candidate addresses, including relayed ones, and lets the endpoints test them to pick a working path.
For SIP signaling itself, proxies can apply a latching or symmetric-signaling approach, rewriting contact and SDP addresses so responses return through the same NAT mapping. Keeping SIP to SIP flows reliable in practice means supporting ICE for media, ensuring TURN fallback exists, and testing from networks with symmetric NATs, which are the hardest cases.
Developers bridging SIP into modern applications can sidestep much of this complexity by terminating the SIP leg at a gateway and delivering media over WebRTC, the approach used by VideoSDK's SIP and telephony integration, where the gateway handles NAT traversal on the SIP side.

Security Considerations: TLS and SRTP

A default SIP to SIP call flow is readable and forgeable by anyone on the path, so production deployments need protection at both layers: signaling and media.
Signaling is protected with TLS, Transport Layer Security, which encrypts SIP messages between the user agent and the proxy, and optionally hop by hop across multiple proxies. TLS prevents eavesdropping on call metadata, identities, and SDP contents, and it raises the bar against registration hijacking and impersonation attacks.
Media is protected with SRTP, Secure RTP, which encrypts and authenticates the actual audio and video packets. SRTP keys are exchanged inside SDP, typically using the SDES mechanism or DTLS-SRTP, so the SDP negotiation covered earlier is also where media security is established.
Recommended practice for a robust deployment is to require TLS for signaling, SRTP for media, verify certificates rather than ignoring mismatches, and combine transport security with digest authentication for registrations. Interoperability is the practical challenge, since not every legacy endpoint supports the full security stack, so plan a fallback policy that is explicit rather than accidental.

Common Troubleshooting Scenarios

Most SIP to SIP call flow failures fall into a small set of recurring patterns, and a systematic diagnostic approach resolves them faster than guesswork.
The first pattern is a missing 200 OK. The INVITE goes out, 100 Trying and 180 Ringing arrive, but the call never completes. The usual causes are a callee that answers but its response is lost, a routing misconfiguration where the response cannot find its way back, or a timeout on the caller's side. Diagnosing starts with capturing signaling on both endpoints and comparing the transaction identifiers to see where the response disappears.
The second pattern is one-way audio. Signaling completes, the call connects, but only one party is heard. This is almost always a NAT or firewall issue where one endpoint's SDP address is unreachable. Diagnosing starts by comparing the addresses in the SDP offer and answer against the actual packet flow, then checking whether ICE or TURN is enabled and functioning.
The third pattern involves SIP forked responses, where a proxy routes an INVITE to multiple registered devices and the caller receives multiple provisional or final responses. Developers should ensure their user agent handles multiple 180 responses and cancels the losing branch after the first 200 OK.
A general diagnostic sequence for any failure: capture the full signaling trace, verify the INVITE reached the far end, confirm the SDP offer and answer are consistent, then verify RTP is flowing in both directions. For teams bridging SIP into application infrastructure, VideoSDK's REST APIs provide session-level visibility that complements packet-level traces.

Best-Practice Checklist for a Robust SIP to SIP Flow

A reliable SIP to SIP call flow is the product of deliberate configuration, monitoring, and testing habits. Use this checklist as a baseline for production deployments.
  • Enable TLS for all SIP signaling and SRTP for all media, with certificate verification enforced
  • Configure ICE with STUN and TURN fallback so media survives symmetric NAT environments
  • Enable SIP session timers with a refresh interval of a few minutes for long-duration calls
  • Use SIP OPTIONS keep-alives between proxies and endpoints to detect reachability gaps early
  • Validate SDP offer and answer consistency in automated tests before every release
  • Test hold, resume, and re-INVITE flows explicitly, since failed re-INVITEs silently preserve old sessions
  • Capture and retain signaling traces with correlated media diagnostics for every production incident
  • Verify BYE teardown completes with a 200 OK so billing and analytics see clean end-of-call events
  • Test from multiple network types, including mobile networks and corporate firewalls, before launch

Definitions Glossary

SIP User Agent: The endpoint in a SIP session, such as a softphone, desk phone, or application, that originates and receives SIP requests and responses.
SIP Proxy: An intermediary server that routes SIP requests toward their destination using routing rules, without normally handling the media itself.
SIP Dialog: The peer-to-peer relationship between two user agents established by INVITE, 200 OK, and ACK, identified by shared identifiers carried in the messages.
SDP Offer/Answer Model: The negotiation mechanism where the caller proposes media parameters in an SDP offer and the callee selects parameters in an SDP answer.
Re-INVITE: An INVITE request sent within an existing dialog to modify the session, such as placing a call on hold or adding a video stream.
SRTP: Secure Real-time Transport Protocol, which encrypts and authenticates media packets, with keys exchanged during SDP negotiation.

Key Takeaways

  • A SIP to SIP call flow progresses through four stages: setup with INVITE, media negotiation with SDP, optional modification with re-INVITE or UPDATE, and teardown with BYE.
  • The INVITE, 100 Trying, 180 Ringing, 200 OK, ACK sequence forms the three-way handshake that establishes the SIP dialog and enables the media path.
  • SDP negotiation decides codecs, addresses, and ports, but SDP only describes the media path, it does not guarantee RTP can actually traverse it.
  • NAT traversal is the leading cause of one-way audio, so ICE with STUN and TURN fallback is essential for reliable production flows.
  • Security requires protecting both layers: TLS for signaling and SRTP for media, with certificate verification enforced.
  • Developers bridging traditional telephony into modern applications can terminate the SIP leg at a gateway and deliver media over WebRTC using VideoSDK's telephony integration.

Conclusion

The SIP to SIP call flow is a disciplined sequence, INVITE through ACK to establish, SDP to negotiate, re-INVITE to modify, and BYE to terminate, and every telephony bug you chase lives somewhere inside that sequence. Master the message order, respect the SDP offer/answer model, plan for NAT traversal, secure both signaling and media, and keep the troubleshooting checklist close during incidents.
If you are building telephony features into a modern application, you do not have to implement this entire stack alone. VideoSDK's SIP and telephony integration bridges traditional SIP endpoints into WebRTC rooms, and the AI voice agent documentation shows how to add conversational AI on top. Get started free at app.videosdk.live.
What are you building with SIP or telephony integrations? Drop a comment, I'd love to hear what kind of call flow use case you're working on.

Free $20 Balance for AI Voice Agents & Video Calls

FAQ