SIP (Session Initiation Protocol) is a signaling protocol for multimedia session control which was published by the Internet Engineering Task Force (IETF) in 1999.SIP end-points negotiates the media parameters using Session Description Protocol (SDP). Session Description Protocol allows the SIP terminals or application to negotiate the type of media (audio, video, or data), transport protocol (RTP), and media encoding method.
SIP boundaries, Components and Functions
SIP is actually an application layer protocol for establishing, manipulating, and tearing down sessions. SIP’s main objective is to help session originators deliver invitations to the potential session participants. SIP serves four major purposes
- Establishment of user location
- Provides feature negotiation so that all of the participants in a session can agree on a feature to be supported among them.
- Mechanism for call management functions.
- Allows for changing features of a session when it is in progress.
- SIP follows the client/server model. Components interacting in a SIP environment are called as User Agents (UA) There are two types of User Agents –
- User Agent Client (UAC): User Agent Client actually generates the requests and sends them to the servers. The user agent is the end system component for the call.
- User Agent Server (UAS): User Agent Servers receives the requests, processes them and generates responses.
SIP servers are part of network device that handles the signaling associated with multiple calls. They possess a predefined set of rules to handle the requests sent by clients.
Let’s see the Server types used:
Proxy Server: It is used as a proxy to forward the client request. Actually when a request is generated, the exact address of the recipient is not known. In this case the client sends its request to a proxy server. The server on behalf of the client forwards the requests to another proxy server or the recipient.
Redirect Server: A redirect server is used to redirects the request back to the client when a client needs to try a different route to get to the recipient. It is mostly used when a recipient has moved temporarily or permanently to a different location.
Registrar: Registrar is used to register the users their locations.
Location Server: Location server is used to store the addresses registered to a Registrar. Also provides information about a caller’s possible locations to redirect and proxy servers.
Modes of Server Operation SIP servers operate in two different modes:
- Stateful mode: In a stateful mode the incoming requests received, responses sent and the outgoing requests made by the server are stored in memory. Stateful-mode servers are the local devices close to the user agents.
- Stateless mode: In a stateless mode the incoming requests received, responses sent and the outgoing requests made by the server are not stored in memory. Stateless servers are backbone of the SIP infrastructure.
All these components make up a SIP infrastructure. Application servers are situated above these components delivering SIP services to end-users.
SIP Methods – Responses and Communication
SIP uses series of requests and responses to communicate The commands that SIP uses are called methods. The lists of commands used by SIP are:
INVITE :Invites a user to a call
ACK : used to facilitate reliable message exchange for INVITEs.
BYE :Terminates a connection between users
CANCEL: Terminates a request, or search, for a user. It is used if a client sends an INVITE and then changes its decision to call the recipient.
OPTIONS: Solicits information about a server’s capabilities.
REGISTER:Registers a user’s current location
INFO:Used for mid-session signaling
The following are responses used by SIP
- 1xx Informational
- 2xx Successful
- 3xx Redirection
- 4xx Request Failure
- 5xx Server Failure
- 6xx Global Failure
The working Principle of SIP
The SIP uses a series of requests and responses to communicate. Let’s see how this works:
1. A session is initiated when User Agent Client sends a request to another User Agent
2. If the location of the other User is known request is sent directly to User Agent else it is sent to the Proxy server.
3. There are many options in this stage they are: The server will attempt to resolve the called user’s location and send the request to them. SIP network server can proxy or redirect the call to additional servers until it arrives at one that definitely knows the IP address where the called user can be reached
4. Once found, the request is sent to the user. When the User Agent receives the request, i.e. the user picks the call, the client responds to the invitation with the predefined responses and a connection is established.
5. When a connection is terminated predetermined commands and responses are used.
Let’s take an example here to study the SIP signaling method in detail. From the fig User Agent A wants to communicate with User Agent B, the resultant call flow in this scenario would be as follows
1.User Agent A sends a SIP request “INVITE” to User Agent B to indicate User A’s wish to talk to User B.
2.User Agent B after reading the request informs User Agent A that it has received its request.
3.While the phone rings, User Agent B sends provisional messages (ringing) to User Agent A just so it doesn’t time out and give up.
4.When User B accepts the call it sends an OK response to the User Agent A. In the payload of this response message, there’s another SDP message. This contains a set of media codecs that are supported by both user agents. All types of SIP requests are accepted using 200-type responses (e.g. 200 OK, 202 Accepted).
5.User Agent A finally confirms with an ACK message.
6.Both user agents are now connected using the method selected by the last SDP message.
7.At the end of the communication session, when anyone hangs up the call new request BYE is sent.
8.The other user’s user agent accepts the request and replies with an OK message before the call is disconnected. Applications of SIP and future SIP has found its way into many applications some of these are:
- Soft Phones
- Instant messaging e.g Instant Messenger
- Answering machine
- Interactive Voice Response (IVR) system
- Mobile e-Business
SIP integrates many diverse applications, devices, and communications processes to deliver innovative multidimensional capabilities and features. This comes along with potential cost effectiveness in hardware and communication options. Many companies have started foraying into the field of communication to tap the advantages of SIP.Inturn driving the improvement and development of SIP to new verticals. Due to these advantages SIP is bound to become the powerful and most common communication choice in the future.