Session Initiation Protocol (SIP)
A powerful alternative to H.323
More flexible, simpler
Easier to implement
Better suited to the support of intelligent user devices
A part of IETF multimedia data and control architecture
SDP, RTSP (Real-Time Streaming Protocol), SAP
(Session Announcement Protocol)
The Popularity of SIP
Originally Developed in the MMUSIC (Multiparty Multimedia Session Control)
n A separate SIP working group
n RFC 2543
n Many developers
n The latest version: RFC 3261 (June 2002 )
SIP + MGCP/MEGACO
n The VoIP signaling in the future
“bake-offs” or SIP Interoperability Tests
n The development of SIP and its implementation by system developers has involved a number of events.
n Various vendors come together and test their products against each other
n to ensure that they have implemented the specification correctly
A signaling protocol
n The setup, modification, and tear-down of multimedia sessions
SIP + SDP
n Describe the session characteristics to potential session participants
Separate signaling and media streams
n Signaling may pass via one or more proxy or redirect servers
n Media stream takes a more direct path.
SIP Network Entities [1/4]
User agent clients
Application programs sending SIP requests
Responds to clients’ requests
Clients and servers may be in the same platform.
Proxy acts as both clients and servers
SIP Network Entities [2/4]
Four types of servers
n Act in a similar way to a proxy server used for web access
n Handle requests or forward requests to other servers after some translation
n Can be used for call forwarding, time-of-day routing, or follow-me services
SIP Network Entities [3/4]
n Accept SIP requests
n Map the destination address to zero or more new addresses
n Return the new address(es) to the originator of the request
Redirect Server 1.Request
Contact: Collins@home.net 3.ACK
SIP Network Entities [4/4]
A user agent server
n Accepts SIP requests and contacts the user
n The user responds → an SIP response
n A SIP device
n E.g., a SIP-enabled telephone
A registrar (location server)
n Accepts SIP REGISTER requests
n Indicating that the user is at a particular address
n Personal mobility
n Typically combined with a proxy or redirect server
SIP Call Establishment
A SIP call establishment is simple.
A number of interim responses may be made to the
INVITE prior to the called party accepting the call.
Attempt to keep the signaling as simple as possible
Offer a great deal of flexibility
n Does not care what type of media is to be exchanged during a session or the type of transport to be used for the media
Various pieces of information can be included within the messages
n Including non-standard information
n Text-based encoding
n Enable the users to make intelligent decisions
n The control of the intelligent features is placed in the hands of the customer, not the network operator.
n E.g., SUBJECT header
Call Completion to Busy Subscriber Service
Overview of SIP Messaging Syntax
Similar to HTTP
Disadvantage – more bandwidth consumption
message = start-line
*message-header CRLF [message-body]
start-line = request-line | status-line
Request-line specifies the type of request
The response line indicates the success or
failure of a given request.
Additional information of the request or response
n The originator and recipient
n Retry-after header
n Subject header
Describe the type of session
The most common structure for the message body is SDP (Session Description Protocol).
Could include an ISDN User Part message
Examined only at the two ends
SIP Requests [1/2]
Method SP Request-URI SP SIP-version CRLF
The SIP address of the destination
INVITE, ACK, OPTIONS, BYE, CANCLE, REGISTER
n Initiate a session
n Information of the calling and called parties
n The type of media
n ∼IAM (initial address message) of ISUP
n ACK only when receiving the final response
SIP Requests [2/2]
n Terminate a session
n Can be issued by either the calling or called party
n Query a server as to its capabilities
n To support a particular type of media
n Terminate a pending request
n Pending Request: an INVITE did not receive a final response
n Log in and register the address with a SIP server
n “all SIP servers” – multicast address (22.214.171.124)
n Can register with multiple servers
Can have several registrations with one server
“One Number” Service
SIP INFO Method
Specified in RFC 2976
For transferring information during an ongoing session
The transfer of DTMF digits
The transfer of account balance information
The transfer of mid-call signaling information
n SIP Version SP Status Code SP Reason-Phrase CRLF
n A textual description of the outcome
n Could be presented to the user
n A three-digit number
n 1XX Informational
n 2XX Success (only code 200 is defined)
n 3XX Redirection
n 4XX Request Failure
n 5XX Server Failure
n 6XX Global Failure
SIP URLs (Uniform Resource Locators)
Provide further information about the message
To:header in an INVITE
n The called party
n The calling party
Four main categories
General, Request, Response, and Entity headers
Used in both requests and responses
n E.g., To:, From:, Call-ID: (uniquely identifies a specific invitation to a session), …
n Provides a URL for use in future communication regarding a particular session
n Examples 1: In a SIP INVITE, the Contact header might be different from the From header.
n An third-party administrator initiates a multiparty session.
n Example 2: Used in response, it is useful for directing further requests directly to the called user.
n Example 3: It is used to indicate a more appropriate
address if an INVITE issued to a given URI failed to reach
Apply only to SIP requests
Addition information about the request or the client
n Priority: urgency of the request (emergency, urgent, normal, or non-urgent)
Further information about the response that cannot be included in the status line
n Unsupported Retry-After
Indicate the type and format of information included in the message body
Content-Length: the length of the message body
Content-Type: the media type of the message body
Content-Encoding: for message compression
Content Disposition: how a message part should be interpreted
session, alert, render …
Examples of SIP Message Sequences
From: and To:
Contact: (for future SIP message transmission)
n Zero, no msg body
n A response to any request must use the same value of CSeq as used in the request.
A two-party call
n A dialog ID
n To identify a peer-to-peer relationship between two user agents
n Tag in From
n Tag in To
Termination of a Call
CSeq has changed.
An alternative address
n 302, Moved temporarily
n Same Call-ID
n CSeq ++
Proxy Servers [1/2]
Sits between a user-agent client and the far-end user- agent server
Numerous proxies can reside in a chain between the caller and callee.
n The most common scenario will have at least two proxies: one at the caller and one at the callee end.
n It is likely that only the last proxy in the chain changes the Request-URI.
n The other proxies in the chain would simply use the domain part of the received Request-URI as input to a location
function (e.g., DNS) to determine the next hop.
Proxy Servers [2/2]
n The path taken by a request
n Loop detected, 482 (status code)
n For a response
n The 1st Via: header is checked and removed.
n The second Via: header is checked.
n If it exists, perform forwarding.
n If not, the response is destined to the proxy itself.
n The response finds its way back to the originator of the request.
n Branch: used to distinguish between multiple responses to the same request
n Forking Proxy: Issue a single request to multiple destinations
Proxy State [1/2]
Can be either stateless or stateful
If stateless, the proxy takes an incoming request, performs whatever translation and forwards the corresponding outgoing request and forgets
n Retransmission takes the same path (no change on retransmission).
If stateful, the proxy remembers incoming requests and corresponding outgoing request.
n The proxy is able to act more intelligently on subsequent requests and responses related to the same session.
Proxy State [2/2]
Record-Route: and Route: Headers
n The subsequent requests may not pass through the same path as the initial request/response.
n E.g., use Contact:
n A Proxy might require that it remains in the signaling path for all subsequent requests to provide some advanced
n In particular for a stateful proxy
n Insert its address into the Record-Route: header
n The response includes the Record-Route: header
n The information contained in the Record-Route: header is used in the subsequent requests related to the same call.
n The Route: header is used to record the path that the request is enforced to pass.
lr (loose routing) vs. sr (strict routing)
A proxy can “fork” requests
A user is registered at several locations