The Session Initiation Protocol (SIP) is the dominant signaling protocol used in VoIP today. It is
responsible for the establishment, control and termination of sessions by exchanging ASCII-text-based
messages between the endpoints. This post goes through the basic components of SIP: messages and
logical entities.
2. What is SIP ?
SIP Components .
Basic Call Flow Understanding.
SIP Functions Analysis.
Conclusion.
INDEX
2
3. VOIP is a technology that allows you to deliver voice and multimedia (videos,
pictures) content over the Internet.
Some advantages of VOIP include:
* Low cost
* Easier to Install, Configure, and Maintain
* No extra cables
* Flexibility
* Even older technology like Fax is supported
For a VOIP call, all that you need is a computer/laptop/mobile with internet
connectivity.
H.323, H.248,SDP, RTP and SIP is widely used for VOIP Technology.
VOIP TECHNOLOGY
3
4. SIP is a signaling protocol used to create, modify, and terminate a multimedia
session over the Internet Protocol (IP Network) .
SIP is an application layer protocol defined by IETF (Internet Engineering Task
Force) standard. It is defined in RFC 3261.
SIP can be used for two-party (unicast) or multiparty (multicast) sessions.
Other SIP applications include file transfer, instant messaging, video
conferencing, online games etc.
LETS TALK ABOUT SIP..
4
6. February 1996- Initial Internet drafts were produced in the form of –
Session Invitation Protocol (SIP) – M.Handley & E.Schooler
Simple Conference Invitation Protocol (SCIP) – H.Schulzrinne
At this stage, IP telephony didn't really exist.
The first draft was known as "draft-ietf-mmusic-sip-00”. It included only one request
type, which was a call setup request.
December 1996- A newer version “draft-ietf-mmusic-sip-01” was proposed as a
modification to SIP-0
January 1999-The IETF published the draft called "draft-ietf-mmusic-sip-12". It
contained the six requests that SIP has today.
March 1999- SIP published RFC 2543 as a standard.
It was modified further to generate the more modern version of RFC 3261 .
SHORT STORY OF SIP
6
7. SIP User Agent - It is the endpoint and one of the most important network elements
of a SIP network. An endpoint can initiate, modify, or terminate a session. User agents
are the most intelligent device or network element of a SIP network.
Simply SIP enabled device is called SIP User Agent.
User agents are logically divided into two parts:
User Agent Client (UAC) : It generates requests and send those to servers.
User Agent Server (UAS) : It gets requests, processes those requests and
generate responses.
Note: A single UA may function as both.
SIP COMPONENTS
7
8. It is the network element that takes a request from a user agent and forwards it to
another user .
Basically the role of a proxy server is much like a router.
A proxy server sits in between two user agents .
There can be a maximum of 70 proxy servers in between a source and a
destination.
PROXY SERVER
8
9. There are two types of proxy servers:
Stateless Proxy Server : It simply forwards the message received.
This type of server does not store any information of a call or a
transaction.
Stateful Proxy Server : This type of proxy server keeps track
of every request and response received and can use it in future if
required.
Note: It has no media capabilities.
TYPES OF PROXY SERVER
9
10. The registrar server accepts registration requests from user agents. It helps users to
authenticate themselves within the network .It stores the URI and the location of a
database so that other SIP servers within the same domain may take help.
REGISTRAR SERVER
10
11. The redirect server receives requests and looks up the intended recipient of the
request in the location database created by the registrar.
Note : Simply they finds alternative locations.
REDIRECT SERVER
11
12. The location server provides information about a caller's possible locations to
the redirect and proxy servers.
LOCATION SERVER
12
14. An INVITE request that is sent to a proxy server is responsible for initiating session.
The proxy server sends a 100 Trying response immediately to the caller (Alice) to
stop the re-transmissions of the INVITE request.
The proxy server searches the address of Bob in the location server . After getting the
address, it forwards the INVITE request further.
Thereafter, 180 Ringing (Provisional responses) generated by Bob is returned back
to Alice.
A 200 OK response is generated soon after Bob picks the phone up .
CALL FLOW
14
15. Bob receives an ACK from the Alice, once it gets 200 OK
At the same time, the session gets established and RTP packets
(conversations) start flowing from both ends .
After the conversation, any participant (Alice or Bob) can send a BYE request
to terminate the session.
BYE reaches directly from Alice to Bob bypassing the proxy server .
Finally Bob sends a 200 OK response to confirm the BYE and the session is
terminated.
CALL FLOW
15
16. SIP messages are of two types:
Requests and Responses
SIP MESSAGING
16
17. SIP requests contain following methods:
REGISTER: Used by a UA to register to the registrar.
INVITE: Used to establish a media session between user agents.
ACK: ACK is used to acknowledge the final responses to an INVITE method .
CANCEL: Terminates a pending request.
BYE: Terminates an existing session.
OPTIONS: Query servers about their capabilities .
SIP REQUEST
17
18. A SIP response is a message generated by a user agent server (UAS) or SIP
server to reply a request generated by a client .
SIP has six responses.
Provisional (1xx): Request received and being processed.
Success (2xx): The action was successfully received, understood, and
accepted.
Redirection (3xx): The client should retry the request at another server.
Client Error (4xx): The request contains bad syntax or cannot be fulfilled
at the server.
Server Error (5xx): The server failed to fulfill an apparently valid request.
Global Failure (6xx): The request cannot be fulfilled at any server.
SIP RESPONSE
18
19. 1xxInformational
100 Trying
180 Ringing
181 Call is Being Forwarded
182 Queued
183 Session progress
2xx Success
200 OK
4xxClient error
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
480 Temporary unavailable
486 Busy Here
487 Request Terminated
5xxServer failure
500 Server Internal Error
501 Not Implemented
503 Unavailable
6xxGlobal Failure
600 Busy Everywhere
603 Decline
604 Doesn’t Exist
3xx Redirection
301 Moved Permanently
302 Moved Temporarily
380 Alternative server
SIP RESPONSE CODES
19