
Session Initiation Protocol (SIP) is a signaling protocol that establishes, modifies, and terminates real-time communication between devices and users. SIP is an application-layer protocol widely used in voice over IP (VoIP) and other real-time communication applications. SIP is designed to be simple and flexible, and can be used to establish a wide range of communication sessions, including voice and video calls, messaging, and presence.
- SIP call establishment and termination
- SIP session establishment and management
- SIP session modification and update
- SIP call transfer and redirect
There are several types of SIP messages and call flows that are used to establish, manage, and terminate SIP sessions. Some of the main SIP call flows and session management mechanisms are:
- INVITE: The INVITE message is used to initiate a SIP session. The INVITE message is sent from the caller to the callee, and includes information about the session, such as the media type and format, and the session parameters. The callee can accept or reject the INVITE request by sending a 200 OK or a 4xx response, respectively.
- ACK: The ACK message is used to acknowledge the receipt of a 200 OK response to an INVITE request. The ACK message is sent from the caller to the callee to confirm that the session has been established and the media streams can be established.
- BYE: The BYE message is used to terminate a SIP session. The BYE message is sent from either the caller or the callee to terminate the session. The BYE message can be acknowledged with a 200 OK response from the other party.
- CANCEL: The CANCEL message is used to cancel an INVITE request before it has been answered. The CANCEL message is sent from the caller to the callee to cancel the pending INVITE request. The callee can acknowledge the CANCEL message with a 200 OK response.
- REFER: The REFER message is used to transfer a SIP session to another device or user. The REFER message is sent from the caller to the callee to initiate the transfer, and includes the SIP URI of the intended recipient. The callee can accept or reject the transfer by sending a 202 Accepted or a 4xx response, respectively.
- UPDATE: The UPDATE message is used to modify the parameters of a SIP session. The UPDATE message is sent from either the caller or the callee to update the session parameters, such as the media format or session timeout. The UPDATE message can be acknowledged with a 200 OK response from the other party.
By using these SIP call flows and session management mechanisms, you can establish, modify, and terminate SIP sessions and manage the parameters of the session.
SIP call establishment and termination
Session Initiation Protocol (SIP) is a signaling protocol that is used to establish, modify, and terminate real-time communication sessions between devices and users. SIP is an application-layer protocol that is widely used in voice over IP (VoIP) and other real-time communication applications.
To establish a SIP session, the following steps are typically involved:
- The caller initiates the session by sending an INVITE message to the callee. The INVITE message includes information about the session, such as the media type and format, and the session parameters.
- The callee receives the INVITE message and can accept or reject the session by sending a 200 OK or a 4xx response, respectively. If the callee accepts the session, it also sends back an SDP offer in the 200 OK response, which specifies the media parameters and capabilities of the callee.
- The caller receives the 200 OK response and sends an ACK message to confirm the receipt of the response and to establish the session. The ACK message also includes an SDP answer, which specifies the media parameters and capabilities of the caller.
- The callee receives the ACK message and establishes the media streams for the session.
To terminate a SIP session, the following steps are typically involved:
- Either the caller or the callee sends a BYE message to terminate the session.
- The other party receives the BYE message and sends a 200 OK response to acknowledge the receipt of the BYE message.
- The media streams for the session are terminated.
SIP session establishment and management
UPDATE: The UPDATE message is used to modify the parameters of a SIP session. The UPDATE message is sent from either the caller or the callee to update the session parameters, such as the media format or session timeout. The UPDATE message can be acknowledged with a 200 OK response from the other party.
REFER: The REFER message is used to transfer a SIP session to another device or user. The REFER message is sent from the caller to the callee to initiate the transfer, and includes the SIP URI of the intended recipient. The callee can accept or reject the transfer by sending a 202 Accepted or a 4xx response, respectively.
CANCEL: The CANCEL message is used to cancel an INVITE request before it has been answered. The CANCEL message is sent from the caller to the callee to cancel the pending INVITE request. The callee can acknowledge the CANCEL message with a 200 OK response.
By using these mechanisms, you can modify the parameters of an existing SIP session or transfer the session to another device or user. It is important to note that these mechanisms are used to manage an existing SIP session, and are not used to establish a new session. To establish a new SIP session, you will need to use the INVITE message and the call flows described earlier.
SIP session modification and update
To modify a SIP session, you can use the UPDATE message. The UPDATE message is used to change the parameters of a SIP session, such as the media format or session timeout. The UPDATE message is sent from either the caller or the callee to the other party, and can be acknowledged with a 200 OK response.
Here is an example of how the UPDATE message can be used to modify a SIP session:
- The caller or the callee sends an UPDATE message to the other party to request a change in the session parameters.
- The other party receives the UPDATE message and can accept or reject the request by sending a 200 OK or a 4xx response, respectively.
- If the request is accepted, the session parameters are updated and the media streams are modified accordingly.
SIP call transfer and redirect
In a transfer, a SIP User Agent establishes a dialog with the callee and then initiates a new dialog between the callee and another UA.
A redirect is when a UA doesn’t answer the call but informs the callee to resend the INVITE to another SIP URI.
In particular, a transfer will involve REFER
and NOTIFY
messages, meaning that the UAs involved must support the refer
event package. This package is defined outside the core SIP RFCs, where the main/central RFC covers redirection.
- SIP Call Flows and Session Management – vegibit (vegibit.com)
- Overview of SIP – Cisco (www.cisco.com)
- Basic SIP Call Flows & Troubleshooting Commands – Cisco (community.cisco.com)
- Call flows in Azure Communication Services – An Azure (learn.microsoft.com)
- SIP Call Flow Explained – OnSIP Hosted VoIP (www.onsip.com)
- SIP Call Flow > Session Initiation Protocol | Cisco Press (www.ciscopress.com)
- SIP – Basic Call Flow – TutorialsPoint (www.tutorialspoint.com)
- SIP Tutorial | Explanation on the basics of Session (www.voipmechanic.com)
- LTE call flow explained – sessions rooted across the (yatebts.com)
- SIP Basics – Massachusetts Institute of Technology (web.mit.edu)
- What Is Session Initiation Protocol (SIP) & How Does (www.nextiva.com)
- Call flow diagrams – IBM (www.ibm.com)
- RFC 3665 – Session Initiation Protocol (SIP) Basic Call Flow (datatracker.ietf.org)
- RFC 5359: Session Initiation Protocol Service Examples (www.rfc-editor.org)
- Volte Ims Call Flow – southgloucestershireccg.nhs.uk (www.southgloucestershireccg.nhs.uk)
- Session Initiation Protocol – Wikipedia (en.wikipedia.org)
- VoIP Protocol Fundamentals | SpringerLink (link.springer.com)
- Session Initiation Protocol (SIP) History-Info Header Call Flow (www.ietf.org)
- SIP Call Flow Examples – EDN (www.edn.com)
- Implementing Cisco Advanced Call Control Mobility Services (www.udemy.com)
- SIP-SIPI Interworking Call Flows (docs.oracle.com)