Sunteți pe pagina 1din 32

Session Initialization Pro

tocol (SIP)

Presented by: Aishwarya Gurazada

CISC856: TCP/IP and upper layer protocols


May 5th 2011

Some slides borrowed from the presentations of


Lei Luo
Che-Yu Kuo
What is SIP?
 AnIETF defined application-layer control (sign
aling) protocol for creating, modifying and ter
minating sessions

 Sessions are primarily audio and video calls ov


er IP

 SIPincorporates elements of HTTP request-resp


onse model, text-based protocol, URL (SIP uses
URI’s) and SMTP for header style such as To, F
rom, and Subject

2
Motivation
 The telephony applications introduced signaling into
IP network
 SIP was designed to mimic the call setup and signaling
characteristics of the traditional telephone network ov
er an IP infrastructure

What does SIP do?

 SIP enables Internet endpoints (called user agents) to


discover one another and to agree on a characterization
of a session they would like to share
 As users may move between endpoints, they may be addre
ssable by multiple names, and they may communicate in
several different media

3
Facets of Establishing a Call

User location: SIP enables the creation of an inf


rastructure of network hosts (called proxy server
s) which could find in locating a user

User availability: determination of the willingne


ss of the called party to engage in communication
s

User capabilities: media and media parameters to


be used

Sessionmanagement: supports transfer, terminati


on, and modification of sessions

4
SIP Protocol Stack
SIP is rather a component that can be used with other IE
TF protocols to build a complete multimedia architecture
.SDP( Session Description
Protocol) for describing
multimedia sessions during
signaling
Re
e SIP Enabled-IP Network qu
I nv it es
t : Re t :I
s s nv
que OK
po ite
ns
Re s e: en
t Ac e:
on k no OK
s p dgm wl
R e le ed
n ow gm
k en
Ac t

IP Network

Media Gateway
Control Protocol
RTP (real time protocol) (MEGACO) for
defines a standardized controlling gateways
packet format for delivering
audio and video over IP SIP/PSTN Gateway
networks

PSTN Network

5
SIP – Transport Layer
 TCP
 TCP provides a reliable transport layer, but at a cost
of complexity and transmission delay over the network.

 UDP
 UDP is the simplest way of transmitting chunks of data
from one host to another in an IP network. Provided th
at the amount of data to be sent at once is not too bi
g

 SCTP
 SCTP preserves boundaries
 SCTP avoids head of line blocking

6
SIP Client-Server Architecture Re
gis
ter User Agent – Softphone
User Agent – Hard phone -m
y IP
ad
dre
s s
te
Registrar Server ka
d
fin

s
es
to

IN
Kate’s & Sam’s location Sam

dr
on te

VI
ka
ad
ti

TE
Mike P
Servers oca E
IT
yI
L

Ka
V
IN
-m

t e
er
t
gis

ke Redirect Server
Re

mi
m
E fro IN
VIT
VIT im
E
IN j jim
TE
IN VI Proxy Server
Gateway
Kate

User Agent – Softphone


SIP Gateway

PSTN Network
Jim
7
SIP Operation

 SIP addressing
 Locating the end user
 SIP messages- methods & responses
 Sending SIP requests : SIP transactions
SIP Addressing
 SIP clients are identified by SIP URI (Uniform Resource Indic
ator)
 URI’s look like email addresses of the form user@domain
 The communication is user-to-user instead of device-to-device
 The user@domain needs to be resolved to user@host by using a
SIP Proxy server and DNS lookups at the time of call
examples
sip:alan@wcom.com (user@domain)
sip:J.T. Kirk <kirk@starfleet.gov>
sip:+1-613-555-1212@wcom.com;user=phone
sip:guest@10.64.1.1 (user@host)

9
Locating the End User
 When client wants to send a request URI, the client will eit
her send it to
 Locally configured Proxy server or
 IP address & port corresponding to the request URI

Jim needs to know the


Jim needs Location service CURRENT IP address of
to call Jane to send request
Jane

Locates Jane

Request Request

Sip:jim@xyz.com xyz.com proxy Server jane@xyz.com

Server can locate Jane by looking up its


“location service” database provided
that Jane is registered
10
SIP Message Format
 generic-message = Request-Line / Status-Line (Response)
message-header (fields)
CRLF
[ message-body ]
Request-Line

INVITE sip: Marconi@radio.org SIP/2.0

Via: SIP/2.0/UDP lab.high-


voltage.org:5060;branch=z9hG4bKfw19b
v=0
Max-Forwards: 70
o=Tesla 2890844526 2890844526 IN IP4 lab.high-
To: G. Marconi <sip: Marconi@radio.org> Message body
voltage.org
From: Nikola Tesla <sip:n.tesla@high-
s=Phone Call
voltage.org>;tag=76341 Header fields
c=IN IP4 j2qu348ek2328ws
Call-ID: 100.101.102.103
t=0 0 1 INVITE
CSeq:
m=audio About
Subject: 49170 That
RTP/AVP
Power0 Outage...
a=rtpmap:0
Contact: PCMU/8000
<sip:n.tesla@lab.high-voltage.org>
Content-Type: application/sdp
Content-Length: 158

11
Request Line
 Request-Line = Method SP Request-URI SP SIP-Version
CRLF

• REGISTER
SIP version
 registering contact User to which the request
information is addressed

• INVITE, ACK, CANCEL


 setting up sessions

• BYE
 terminating sessions
INVITE ash@xyz.com SIP/2.0
• OPTIONS

 querying servers about


their capabilities

12
Status Line
 Status-Line = SIP-Version SP Status-Code SP Reason-Phr
ase CRLF

SIP/2.0
The Reason-Phrase
1xx: Provisional -- request received, continuing to is intended to give a
process the request; short textual
description of the
2xx: Success -- the action was successfully received, Status-Code.
understood, and accepted;

3xx: Redirection -- further action needs to be taken in


order to complete the request;
SIP/2.0 180 Ringing
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.

13
Message Header fields

Parameter Description

Call-ID Uniquely identifies a particular session

Cseq A monotonically increasing sequence number used to


identify the sequence of requests associated with a
given Call-ID

From A SIP URL that identifies the initiator of the request.


May include a “friendly name” (e.g John)

To A SIP URL that identifies the recipient of the request.


May include a “friendly name”

Via Indicates the path taken by the request

14
Marconi Accepted

Tesla Marconi

INVITE

g
180 Ringin

200 OK
ACK

Media Session

BY E

200 OK

Simple SIP session establishment example

15
Proxy Bob
Alice
Server
INVITE INVITE
g
180 Ringin
g
180 Ringin 200 OK
200 OK
ACK

Media Session

BYE

200 OK

SIP call example with proxy server

16
Alice Registrar Server

REGISTER
Contact: sip:
alice@ 128.175.13.1
6

200 OK

SIP registration example

17
SUBSCRIBE
200 OK
NOTIFY
200 OK


NOTIFY
200 OK

MESSAGE
200 OK

MESSAGE
200 OK

SIP presence and instant message example

18
SIP/2.0 REGISTER

SIP Registration Server


sip:registrar.udel.edu
Via: SIP/2.0/UDP 128.175.13.50:5060;
branch=z9hG4bKus19
Max-Forwards: 70
SIP/2.0 407 AUTHORIZATION
To: Alice REQUIRED
<sip:alice@eecis.udel.edu>
Via: SIP/2.0/UDP 128.175.13.50:5060;
From: Alice
SIP/2.0 REGISTER sip:registrar.udel.edu
branch=z9hG4bKus19 Registrar Server
Alice Via:
<sip:alice@eecis.udel.edu>;tag=3431
SIP/2.0/UDP
To: Alice Call-ID: 128.175.13.50:5060;
<sip:alice@eecis.udel.edu>
branch=z9hG4bKus19
From: Alice <sip:alice@eecis.udel.edu>;tag=3431
843817637684230@998sdasdh09
To: Alice <sip:alice@eecis.udel.edu>
Call-ID:843817637684230@998sdasdh09
CSeq: 1 REGISTER
From:
CSeq:Alice
1500<sip:alice@eecis.udel.edu>;tag=3431
REGISTER
Contact: sip:alice@128.175.13.50
Call-ID:843817637684230@998sdasdh09
Contact: Content-Length:
<sip:alice@128.175.13.50>;
0
CSeq: 1 REGISTER Digest
Proxy-Authenticate:
Contact: <sip:alice@128.175.13.50>;expires=3600
realm=“eecis.udel.edu",
Proxy-Authorization: Digest username=“alice",
nonce="4db894763e920f6ec021e68a3e87b098dc4a
realm=“eecis.udel.edu,
c8f9"
nonce="4db894763e920f6ec021e68a3e87b098dc4ac
Content-Length: 0
SIP/2.0 200 OK
8f9”, uri= alice@eecis.udel.edu,
Via: SIP/2.0/UDP 128.175.13.50:5060;
“response="d4456069e70376940998daae084cd5b5”,
branch=z9hG4bKus19
Content-Length: 0
To: Alice <sip:alice@eecis.udel.edu>
From: Alice
<sip:alice@eecis.udel.edu>;tag=3431
Call-ID:843817637684230@998sdasdh09
CSeq: 1 REGISTER
Contact:
<sip:alice@128.175.13.50>;expires=3600
Content-Length: 0

19
Simple Call Establishment
INVITE sip:alice@udel.com SIP/2.0
Via: SIP/2.0/UDP 100.101.102.103:5060;
branch=z9hG4bKmp17a
Alice To: Bob <sip:bob@yahoo.com>
SIP/2.0 180 Ringing
Bob
From: Alice <sip:alice@udel.edu>;tag=42
Via: SIP/2.0/UDP 100.101.102.103:5060;
Call-ID: j2qu348ek2328ws
branch=z9hG4bKmp17a
Cseq: 1 IINVITE
Inserts a “From” SIP/2.0
To: Bob 200 OKsip:alice@pc.udel.edu
sip:bob@yahoo.com;tag=75
Contact:
tag and sets the Via:
From:SIP/2.0/UDP
Alice
Subject: 100.101.102.103:5060;
<sip:alice@udel.edu>;tag=42
Where are you exactly?
branch=z9hG4bKmp17a
Call-ID: j2qu348ek2328ws
session parameters
To: Bob
Cseq: sip:bob@yahoo.com;tag=75
1 INVITE
From: Alice
Contact: <sip:alice@udel.edu>;tag=42
<sip:bob@tower.yahoo.com>
Call-ID: j2qu348ek2328ws
Cseq: 1 INVITE
SIP/2.0 ACK
Inserts a “To” tag Contact: <sip:bob@tower.yahoo.com>
Via: SIP/2.0/UDP 100.101.102.103:5060;
and sets the
branch=z9hG4bK321g
session parameters To:
v=0Bob sip:bob@yahoo.com;tag=75
From: Alice
o=alice <sip:alice@udel.edu>;tag=42
2890844526 2890844526 IN IP4
Call-ID: j2qu348ek2328ws
alice.udel.edu
Cseq: 1 ACK
Call ID, from and to s=Phone Call
tags identify a v=0 IP4 100.101.102.103
c=IN
dialog o=bob
t=0 0 2890844528 2890844528IN IP4
tower.yahoo.com
m=audio 49170 RTP/AVP 0
s=Phone Call
a=rtpmap:0 PCMU/8000
c=IN IP4 200.201.202.203
t=0 0
m=audio 60000 RTP/AVP 0
a=rtpmap:0 PCMU/8000

20
SIP Proxy Server INVITE sip:bob@yahoo.com SIP/2.0
Via: SIP/2.0/UDP proxy.udel.com:5060;
INVITE sip:bob@yahoo.com SIP/2.0
branch=z9hG4bK83842.1
Via: SIP/2.0/UDP
Via: SIP/2.0/UDP Location
proxy.yahoo.com:5060;
DNS server 100.101.102.103:5060;
branch=z9hG4bKmp17a server
branch=z9hG4bKtiop3
Via: SIP/2.0/UDP
INVITE sip:bob@yahoo.com SIP/2.0 To: Bob <sip:bob@yahoo.com>
proxy.udel.com:5060;
Via: SIP/2.0/UDP From: Alice
branch=z9hG4bK83842.1
100.101.102.103:5060; <sip:alice@udel.edu>;tag=42
Via: SIP/2.0/UDP
branch=z9hG4bKmp17a Subject: Where are you exactly?
100.101.102.103:5060;
To: Bob <sip:bob@yahoo.com> Contact: <sip:alice@pc.udel.edu>
branch=z9hG4bKmp17a
From: Alice Outbound To: Bob <sip:bob@yahoo.com>
<sip:alice@udel.edu>;tag=42 Inbound
From: Alice
Subject: Where areproxy server
you exactly? proxy server
<sip:alice@udel.edu>;tag=42
Contact: <sip:alice@pc.udel.edu> 100180
Trying
Ringing Subject: Where are you exactly?
200 OK
100 Trying Contact: <sip:alice@pc.udel.edu>
180 Ringing
200 OK
180 Ringing
200 OK

Media BYE
(RTP)
ACK

Alice Bob
200 OK
SIP Trapezoid
21
SIP Proxy Server
Location Service

INVITE Bob
INVITE Bob
Bob’s
Phone
486 Busy Here
Proxy Server
Alice
INVITE Bob

Proxy servers can make flexible “routing Bob’s


decisions” to decide where to send a request. voicemail

22
SIP Redirect Server
SIP/2.0 301 Moved Permanently
Via: SIP/2.0/UDP
INVITE sip:bob@yahoo.com SIP/2.0 100.101.102.103:5060;
Via: SIP/2.0/UDP branch=z9hG4bKmp17a
100.101.102.103:5060; To: Bob
branch=z9hG4bKmp17a <sip:bob@yahoo.com>;tag=64
To: Bob <sip:bob@yahoo.com> From: Alice
From: Alice <sip:alice@udel.edu>;tag=42
<sip:alice@udel.edu>;tag=42 INVITE
Subject: Where are sip:bob@200.201.202.203 SIP/2.0
you exactly?
Subject: Where are you exactly? Contact: sip:bob@200.201.202.203
Via: SIP/2.0/UDP 100.101.102.103:5060;
Contact: <sip:alice@pc.udel.edu> Redirect Server
ACK branch=z9hG4bKmp17a
To: Bob <sip:bob@yahoo.com>
From: Alice
<sip:alice@udel.edu>;tag=13473
Subject: Where are you exactly?
Contact: <sip:alice@pc.udel.edu>

Alice

Bob

23
Terminal Mobility- Pre-call
Mobile -JIM Home Proxy/registrar JANE

REGISTER
200 OK

INVITE INVITE

200 OK 200 OK

ACK

Media Session

24
Terminal Mobility- Mid Call

AC
Media Session

20

K
0
O
K
IN
VI
TE
Home Network
Visited Network

25
Personal Mobility

Bob’s Cell
Location Service INVITE
200 Bob
OK Phone

INVITE Bob Bob’s


Office
Phone
INVITE Bob
CANCEL
Alice 200 OK
Proxy Server
Bob’s
INVITE Bob Home
CANCEL
Phone
In parallel search, a proxy issues several
requests to possible user locations upon
receiving an incoming request.

26
Session Mobility

 Transfer and Retrieval

 Transfer means to move the session on the current de


vice to one or more other devices
 Retrieval means to cause a session currently on ano
ther device to be transferred to the local device

 Whole and Split Transfer

 The set of session media may either be transferred


completely to a single device or split across multip
le devices

27
Transfer Modes

 Mobile Node (MN) Control Mode


 Mobile Node (MN) uses a third party call control
 It establishes a SIP session with the local device used in the
transfer and updates its session with the CN (corresponding no
de), using the SDP parameters to establish media sessions bet
ween the CN and the local device
 it requires the MN to remain active to maintain the sessions

 Session Hands off Mode


 MN completely transfers the session signaling and media to ano
ther device

Addressing of Devices
 All devices are assumed to have dedicated SIP URI’s
 A device has a unique URI and registers a separate contact URI
for itself

28
Local Device Mobile Node Corresponding Node

Media Session
INVITE

200 OK local INVITE local


Parameters Parameters

200 OK CN
parameters

ACK CN ACK
Parameters

Media Session

29
Local Device Mobile Node Corresponding Node
Media Session
REFER ,refer-to

200 Accepted

INVITE, Replaces

200 OK

Media Session

ACK

Media Session
NOTIFY
200 OK
BYE

200 OK

30
References

J. Rosenberg, SIP: Session Ini


tialization Protocol, RFC 3261
, 2002
A. Johnston, SIP: Understandin
g the Session Initialization P
rotocol, 2nd edition

31
Questions

32

S-ar putea să vă placă și