SIP
SIP
Protocol
05/26/2025
Overview
• SIP - Introduction
• SIP architecture and philosophy
• Overview of Working
• Methods Used in SIP
• SIP messages & responses
• Security
• Summary
• References
05/26/2025
SIP Timeline
• 1999. 9.
• 1996 • IETF SIP WG
• Mark Hadley’s SIP(Session
• 2000. 6
Invitation Protocol)
• RFC 2543bis-01
• Henning Schulzrinne’s
• 2000. 9
SCIP(Simple Conference
Control Protocol) • RFC 2543bis-2 (Draft)
• SIP developed by Handley, • 2001.3
Schulzrinne, Schooler, and • Split into SIP WG & SIPPING WG
Rosenberg • SIMPLE WG (Application Area)
• 1996-1997 • 2002. 7
• RFC 3261
• Interest grows in academic
circles over MBone • Alternative to ITU’s H.323
• 1998 - H.323 used for IP Telephony
since 1994
• MCI’s Henry Sinnreich => VoIP - Problems: No new services,
Appliance addressing, features
• 1999. March - Concerns: scalability,
• RFC 2543 by IETF MMUSIC WG extensibility
SIP Adoption of Key Standard Bodies
• IETF PINT
• http://www.ietf.org/html.charters/pint-charter.html
• 3GPP
• http://www.3gpp.org
• Softswitch Consortium
• http://www.softswitch.org
• IMTC & ETSI TIPHON
• http://www.ietf.org & http://www.etsi.org/tiphon/
• PacketCable
• http://www.packetcable.com
• SIP Forum
• http://www.sipforum.org
• Parlay/JAIN
• http://www.parlay.org
• http://java.sun.com/products/jain/index.html
Introduction
SIP is
• An Application-layer control (signaling)
protocol for creating, modifying and
terminating sessions with one or more
participants.
• Sessions include Internet multimedia
conferences, Internet telephone calls and
multimedia distribution.
• Members in a session can communicate
via multicast or via a mesh of unicast
relations, or a combination of these.
• Text based , Model similar to HTTP : uses
client-server model
Introduction
• But it should be noted that the job of SIP is limited to
only the setup and control of sessions.
• The details of the data exchange within a session e.g.
the encoding or codec related to an audio/video media
is not controlled by SIP and is taken care of by other
protocols.
SIP Philosophy
• Internet Standard
- IETF - http://www.ietf.org
• Reuse Internet addressing (URLs, DNS,
proxies)
- Utilizes rich Internet feature set
• Reuse HTTP coding
- Text based
• Makes no assumptions about underlying
protocol:
- TCP, UDP, X.25, frame, ATM, etc.
- Support of multicast
Development of SIP
05/26/2025
SIP Basic Functionality
Supports 5 facets of communication:
• User location: determination of the end
system to be used for communication;
• User capabilities: determination of the
media and media parameters to be used;
• User availability: determination of the
willingness of the called party to engage in
communications;
• Call setup: "ringing", establishment of call
parameters at both called and calling party;
• Call handling: including transfer and
termination of calls.
SIP Basic Functionality
• SIP allows for the establishment of user location (i.e.
translating from a user's name to their current network
address).
• SIP provides for feature negotiation so that all of the
participants in a session can agree on the features to be
supported among them.
• SIP is a mechanism for call management - for example
adding, dropping, or transferring participants.
• SIP allows for changing features of a session while it is
in progress.
SIP Functionality (cont.)
• SIP can also initiate multi-party calls
using a multipoint control unit (MCU) or
fully-meshed interconnection instead of
multicast.
• Internet telephony gateways that
connect Public Switched Telephone
Network (PSTN) parties can also use SIP
to set up calls between them.
SIP Operation
1. SIP Addressing
2. Locating a SIP Server
3. Sending SIP Requests : SIP
Transactions
4. SIP Methods
5. SIP Responses
6. Subsequent Requests and Responses
Step #1:SIP Addressing
Uses Internet URLs
• Uniform Resource Locators
• Supports both Internet and PSTN addresses
• General form is name@domain
• To complete a call, needs to be resolved
down to User@Host
• Examples:
sip:[email protected]
Step#2: Locating a SIP server
• A caller first locates the appropriate
server
• When client wants to send a request URI
client will either send it to
- Locally configured Proxy server or to
- IP address & port corresponding to the
request URI [similar to the one in
step#1]
• Client must determine IP address, port of
server and the protocol to be used.
Locating (cont.)
Client
1. Should try to contact a server at the port listed in
request URI. If no port specified then try port
5060
- Use specified protocol if applicable
- o.w. use UDP if supported,
- if UDP fails or o.w. use TCP
2. Send the request to the server’s IP address if the
host part of request URI is an IP address o.w.
3. Find one or more address of server by querying
DNS,
4. Results MAY be cached.
5. Capability to interpret ICMP messages must exist
Step# 3:Send a SIP request
• Once the host part has been resolved to a SIP
server, - client sends 1 / more SIP requests to that
server &
- receives 1 / more responses from the server.
• SIP Request-line (Messages) defined as:
<Method> <SP> Request-URI <SP>SIP-Version
<CRLF>
(SP=Space, CRLF=Carriage Return and Line
Feed)
(Method = “INVITE” | “ACK” | “OPTIONS” |
“BYE” | “CANCEL” | “REGISTER”)
• Example:
INVITE sip:[email protected] SIP/2.0
Order of Operation
interworking
• Client - originates message
• Server - responds to or forwards
message
SIP Architecture
• SIP uses client/server architecture
• Elements:
• SIP User Agents (SIP Phones)
• SIP Servers (Proxy or Redirect - used to
locate SIP users or to forward messages.)
• Can be stateless or stateful
• SIP Gateways:
To PSTN for telephony interworking
•
interworking
• Client - originates message
• Server - responds to or forwards
message
SIP Entities
•
User Agents
• User Agent Client (UAC): Initiates SIP requests
• User Agent Server (UAS): Returns SIP
responses
• Network Servers (diff. types may be co-
located )
• Proxy: Decides next hop and forwards request,
relays call signaling , operates in a
transactional manner, saves no session state
• Redirect: Sends address of next hop back to
client, redirects callers to other servers
- Registrar: Accepts REGISTER requests from
clients, maintains users’ whereabouts at a
location server
Instant Messaging (Contd.)
SIP Redirect server(provides alternate lo-
cation where user can be reachable
SIP:[email protected])
2
SIP proxy 5
121.150.1.112 3 SIP proxy Location
4 service
6
11 10 proxy
12 7
1
Try to reach 8
13 9
05/26/2025
SIP Client SIP Client [email protected]
SIP Operation
1. SIP Addressing
2. Locating a SIP Server
3. Sending SIP Requests : SIP
Transactions
4. SIP Methods
5. SIP Responses
6. Subsequent Requests and Responses
05/26/2025
Step #1:SIP Addressing
Uses Internet URLs
• Uniform Resource Locators
• Supports both Internet and PSTN addresses
• General form is name@domain
• To complete a call, needs to be resolved
down to User@Host
• Examples:
sip:[email protected]
sip:J.T. Kirk <[email protected]>
sip:[email protected];user=phone
sip:[email protected]
sip:[email protected];phone-context=VNET
05/26/2025
Step#2: Locating a SIP server
• A caller first locates the appropriate
server
• When client wants to send a request URI
client will either send it to
- Locally configured Proxy server or to
- IP address & port corresponding to the
request URI [similar to the one in
step#1]
• Client must determine IP address, port of
server and the protocol to be used.
05/26/2025
Locating (cont.)
Client
1. Should try to contact a server at the port
listed in request URI. If no port specified
then try port 5060
- Use specified protocol if applicable
- o.w. use UDP if supported,
- if UDP fails or o.w. use TCP
2. Send the request to the server’s IP address if
the host part of request URI is an IP address
o.w.
3. Find one or more address of server by
querying DNS,
4. Results MAY be cached.
05/26/2025 5. Capability to interpret ICMP messages must
Step# 3:Send a SIP request
• Once the host part has been resolved to a SIP
server, - client sends 1 / more SIP requests to
that server &
- receives 1 / more responses from the server.
• SIP Request-line (Messages) defined as:
<Method> <SP> Request-URI <SP>SIP-
Version <CRLF>
(SP=Space, CRLF=Carriage Return and Line
Feed)
(Method = “INVITE” | “ACK” | “OPTIONS” |
“BYE” | “CANCEL” | “REGISTER”)
05/26/2025
• Example:
Order of Operation
05/26/2025
Six types of response
1XX Provisional Request received, continuing to process
Informatio the request.
nal
2XX Success The action was successfully received,
understood, and accepted.
3XX Redirection Further action needs to be taken in order to
complete the request
4XX Client Error The request contains bad syntax or cannot
be fulfilled at this server.
5XX Server Error The server failed to fulfill an apparently
valid request.
6XX Global Failure The request cannot be fulfilled at any
server.
05/26/2025
IP SIP Phones and Adaptors
Are Internet hosts
• Choice of application
• Choice of server
• IP appliance
Implementations 1
• 3Com (2)
• Cisco
• Columbia University
• Mediatrix (1) 2
• Nortel (3)
• Pingtel
Courtesy: http://engr.smu.edu/~hbaker/40
Proxy Server Example
05/26/2025
Redirect Server Example
05/26/2025
SIP Responses
• SIP Responses defined as (HTTP-style):
SIP-Version SP Status-Code SP Reason-
Phrase CRLF
(SP=Space, CRLF=Carriage Return and Line
Feed)
• Example:
SIP/2.0 404 Not Found
• First digit gives Class of response
05/26/2025
SIP Responses (cont.)
• 1xy – Informational
request received , continuing to process request
• 2xy – Success
action successfully recvd., understood & accepted
• 3xy – Redirection
Further action to be taken to complete the request
• 4xy – Client error
request contains syntax error or cant be
completed at this server
• 5xy – Server error
server fails to fulfill an apparently valid request
• 6xy – global failure,request is invalid at any server
05/26/2025
Step #4 Generate Subsequent
Requests
• Once the call has been established, either the
caller or callee may generate INVITE or BYE
requests to change or terminate the call.
• For the desired call leg the headers are set as
follows (both including any tags):
- the To header field is set to the remote address,
and
- the From header field is set to the local address.
• The Contact header field may be different than
the Contact header field sent in a previous
response or request. The Request-URI may be set
to the value of the Contact header field received in
a previous request or response from the remote
party, or to the value of the remote address.
[supports mobility]
05/26/2025
SIP Requests Example
}
From: Alan Johnston <sip:[email protected]> identify
To: Jean Luc Picard <sip:[email protected]> this
Call-ID: [email protected] session
CSeq: 1 INVITE request
05/26/2025
Via Field in Header
• The Request headers include a Via field
• The Via field indicates the path taken by
the request so far.
• Every proxy adds a Via Header with its
address to make sure that responses
within a transaction take the same path
(to avoid loops, or to make sure that
same firewall will be hit on the way
back)
• This prevents request looping and
ensures replies take the same path as
the requests, which assists in firewall
traversal and other unusual routing
situations.
05/26/2025
Via Headers and Routing
• Via headers are used for routing SIP
messages
• Requests
• Request initiator puts address in Via header
• Servers check Via with sender’s address, then add
own address, then forward. (if different, add
“received” parameter)
• Responses
• Response initiator copies request Via headers.
• Servers check Via with own address, then forward
to next Via address
• All Via headers are copied from request to
response in order
• Response is sent to address in top Via header
05/26/2025
Via Header (cont.)
05/26/2025
Step #5 Receiving Subsequent Requests
• Subsequent to receipt, the following checks are
made:
1. If the Call-ID is new,
- the request is for a new call, regardless of the
values of the To and From header fields.
2. If the Call-ID exists,
- the request is for an existing call.
- If the To, From, Call-ID, and CSeq values exactly
match (including tags) those of any requests
received previously, the request is a
retransmission.
3. If there was no match to the previous step,
- To & From fields compared against existing call
leg local and remote addresses.
- If there is a match, & the CSeq in the request >
last CSeq received on that leg,the request is a new
transaction for an existing call leg.
05/26/2025
Reliability
• If UDP is used:
-SIP client should retransmit a BYE, CANCEL,
OPTIONS, or REGISTER request, exponential
backoff, starting at a T1 second interval,
doubling the interval for each packet, and
capping off at a T2 second interval.
-Retransmit a INVITE request with an interval
that starts at T1 seconds, exponential back off,
cease retransmissions if a provisional or
definitive response recvd., or once it has sent a
total of 7 request packets
• Clients using TCP do not need to retransmit
requests
05/26/2025
Authentication & Encryption
• SIP supports a variety of approaches:
• end to end encryption
• hop by hop encryption
• Proxies can require authentication:
• Responds to INVITEs with 407 Proxy-
Authentication Required
• Client re-INVITEs with Proxy-Authorization
header.
• SIP Users can require authentication:
• Responds to INVITEs with 401 Unathorized
• Client re-INVITEs with Authorization header
05/26/2025
Features and Benefits
Feature Benefits
Internet SIP-based systems can take advantage of the growth of
Enabled the Internet. Translating gateways permit SIP-based
systems to contact parties on the Public Switched
Telephone Network (PSTN) without being encumbered
by its legacy standards.
Scalability Architecture permits inexpensive scaling. H/W & S/W
requirements for adding new users to SIP-based
systems is greatly reduced.
Simplicity SIP stack is smaller. SIP can be considered as a simple
toolkit that enables smart endpoints, gateways,
processes & clients to be built and implemented
05/26/2025
Features and Benefits(cont.)
Feature Benefit
05/26/2025
SIP Summary
• SIP is:
• Relatively easy to implement
• Gaining vendor and carrier acceptance
• Very flexible in service creation
• Extensible and scaleable
• Appearing in products right now
• SIP provides its own reliability
mechanism & is therefore independent
of the packet layer and only requires an
unreliable datagram service
Thank You !!