session initialization protocol (sip)

32
Session Initialization Protocol (SIP) Presented by: Aishwarya Gurazada CISC856: TCP/IP and upper layer protocols May 5 th 2011 Some slides borrowed from the presentations of Lei Luo Che-Yu Kuo

Upload: cheung

Post on 24-Feb-2016

58 views

Category:

Documents


0 download

DESCRIPTION

Session Initialization Protocol (SIP). Presented by: Aishwarya Gurazada CISC856: TCP/IP and upper l ayer protocols May 5 th 2011 Some slides borrowed from the presentations of Lei Luo Che -Yu Kuo. What is SIP?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Session Initialization Protocol (SIP)

Session Initialization Protocol (SIP)

Presented by: Aishwarya Gurazada

CISC856: TCP/IP and upper layer protocolsMay 5th 2011

Some slides borrowed from the presentations of Lei LuoChe-Yu Kuo

Page 2: Session Initialization Protocol (SIP)

2

What is SIP?An IETF defined application-layer control

(signaling) protocol for creating, modifying and terminating sessions

Sessions are primarily audio and video calls over IP

SIP incorporates elements of HTTP request-response model, text-based protocol, URL (SIP uses URI’s) and SMTP for header style such as To, From, and Subject

Page 3: Session Initialization Protocol (SIP)

3

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 over 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 addressable by multiple names, and they may communicate in several different media

Page 4: Session Initialization Protocol (SIP)

4

Facets of Establishing a Call

User location: SIP enables the creation of an infrastructure of network hosts (called proxy servers) which could find in locating a user

User availability: determination of the willingness of the called party to engage in communications

User capabilities: media and media parameters to be used

Session management: supports transfer, termination, and modification of sessions

Page 5: Session Initialization Protocol (SIP)

5

SIP Protocol StackSIP is rather a component that can be used with other IETF protocols to build a complete multimedia architecture.

SIP Enabled-IP Network

IP Network

PSTN Network

Request : Invite

Request : Invite

Response :OK

Response: OK

Acknowledgment Acknowledgment

RTP (real time protocol) defines a standardized

packet format for delivering audio and video over IP

networks

Media Gateway Control Protocol

(MEGACO) for controlling gateways

SIP/PSTN Gateway

SDP( Session Description Protocol) for describing

multimedia sessions during signaling

Page 6: Session Initialization Protocol (SIP)

6

SIP – Transport Layer TCP

TCP provides a reliable transport layer, but at a cost of complexity and transmission delay over the network.

UDPUDP is the simplest way of transmitting chunks of

data from one host to another in an IP network. Provided that the amount of data to be sent at once is not too big

SCTPSCTP preserves boundaries SCTP avoids head of line blocking

Page 7: Session Initialization Protocol (SIP)

7

SIP Client-Server ArchitectureUser Agent – Hard phone

Mike

Registrar Server

Proxy Server

Redirect Server

Kate

Sam

SIP Gateway

PSTN Network

User Agent – Softphone

User Agent – Softphone

Servers

Gateway

Register- my IP address

Regi

ster

- my I

P ad

dres

sINVITE Kate

INVITE from mike

INVITE kate

Location to

find kate

Kate’s & Sam’s location

Jim

INVITE jimINVITE jim

Page 8: Session Initialization Protocol (SIP)

SIP Operation

SIP addressingLocating the end userSIP messages- methods & responsesSending SIP requests : SIP transactions

Page 9: Session Initialization Protocol (SIP)

9

SIP Addressing SIP clients are identified by SIP URI (Uniform Resource

Indicator) 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 callexamplessip:[email protected] (user@domain)sip:J.T. Kirk <[email protected]>sip:[email protected];user=phonesip:[email protected] (user@host)

Page 10: Session Initialization Protocol (SIP)

10

Locating the End User When client wants to send a request URI, the client will

either send it to Locally configured Proxy server or IP address & port corresponding to the request URI

-

-

Sip:[email protected]@xyz.comxyz.com proxy Server

Jim needs to know the CURRENT IP address of Jane to send request

Locates Jane

Server can locate Jane by looking up its “location service” database provided that Jane is registered

Request

Location service

Request

Jim needs to call Jane

Page 11: Session Initialization Protocol (SIP)

11

SIP Message Format generic-message = Request-Line / Status-Line (Response) message-header (fields) CRLF [ message-body ]

INVITE sip: [email protected] SIP/2.0

Via: SIP/2.0/UDP lab.high-voltage.org:5060;branch=z9hG4bKfw19bMax-Forwards: 70To: G. Marconi <sip: [email protected]>From: Nikola Tesla <sip:[email protected]>;tag=76341Call-ID: j2qu348ek2328wsCSeq: 1 INVITESubject: About That Power Outage...Contact: <sip:[email protected]>Content-Type: application/sdpContent-Length: 158

Request-Line

Header fields

v=0o=Tesla 2890844526 2890844526 IN IP4 lab.high-voltage.orgs=Phone Callc=IN IP4 100.101.102.103t=0 0m=audio 49170 RTP/AVP 0a=rtpmap:0 PCMU/8000

Message body

Page 12: Session Initialization Protocol (SIP)

12

Request Line Request-Line = Method SP Request-URI SP SIP-

Version CRLF

• REGISTER registering contact

information

• INVITE, ACK, CANCEL setting up sessions

• BYE terminating sessions

• OPTIONS

querying servers about their capabilities

User to which the request is addressed

SIP version

INVITE [email protected] SIP/2.0

Page 13: Session Initialization Protocol (SIP)

13

Status Line Status-Line = SIP-Version SP Status-Code SP Reason-

Phrase CRLF

SIP/2.0

1xx: Provisional -- request received, continuing to process the request;

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.

The Reason-Phrase is intended to give a short textual description of the Status-Code.

SIP/2.0 180 Ringing

Page 14: Session Initialization Protocol (SIP)

14

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

Page 15: Session Initialization Protocol (SIP)

15

Tesla Marconi

INVITE

180 Ringing

200 OK

ACK

Media Session

BYE

200 OK

Simple SIP session establishment example

Marconi Accepted

Page 16: Session Initialization Protocol (SIP)

16

Alice Proxy Server

Bob

INVITE

180 Ringing

200 OK

ACK

Media Session

BYE

200 OK

INVITE

180 Ringing

200 OK

SIP call example with proxy server

Page 17: Session Initialization Protocol (SIP)

17

Alice Registrar Server

REGISTERContact: sip:[email protected]

200 OK

SIP registration example

Page 18: Session Initialization Protocol (SIP)

18

SUBSCRIBE

200 OK

NOTIFY

200 OK

NOTIFY

200 OK

MESSAGE200 OK

MESSAGE

200 OK

SIP presence and instant message example

Page 19: Session Initialization Protocol (SIP)

19

SIP Registration Server

Alice Registrar Server

SIP/2.0 200 OKVia: SIP/2.0/UDP 128.175.13.50:5060; branch=z9hG4bKus19To: Alice <sip:[email protected]>From: Alice <sip:[email protected]>;tag=3431Call-ID:843817637684230@998sdasdh09CSeq: 1 REGISTERContact: <sip:[email protected]>;expires=3600Content-Length: 0

SIP/2.0 REGISTER sip:registrar.udel.eduVia: SIP/2.0/UDP 128.175.13.50:5060; branch=z9hG4bKus19Max-Forwards: 70To: Alice <sip:[email protected]>From: Alice <sip:[email protected]>;tag=3431Call-ID: 843817637684230@998sdasdh09CSeq: 1 REGISTERContact: sip:[email protected]: 0

SIP/2.0 407 AUTHORIZATION REQUIREDVia: SIP/2.0/UDP 128.175.13.50:5060; branch=z9hG4bKus19To: Alice <sip:[email protected]>From: Alice <sip:[email protected]>;tag=3431Call-ID:843817637684230@998sdasdh09CSeq: 1500 REGISTERContact: <sip:[email protected]>;Proxy-Authenticate: Digest realm=“eecis.udel.edu", nonce="4db894763e920f6ec021e68a3e87b098dc4ac8f9"Content-Length: 0

SIP/2.0 REGISTER sip:registrar.udel.eduVia: SIP/2.0/UDP 128.175.13.50:5060; branch=z9hG4bKus19To: Alice <sip:[email protected]>From: Alice <sip:[email protected]>;tag=3431Call-ID:843817637684230@998sdasdh09CSeq: 1 REGISTERContact: <sip:[email protected]>;expires=3600Proxy-Authorization: Digest username=“alice", realm=“eecis.udel.edu, nonce="4db894763e920f6ec021e68a3e87b098dc4ac8f9”, uri= [email protected], “response="d4456069e70376940998daae084cd5b5”, Content-Length: 0

Page 20: Session Initialization Protocol (SIP)

20

Simple Call EstablishmentINVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=42Call-ID: j2qu348ek2328wsCseq: 1 IINVITEContact: sip:[email protected]: Where are you exactly?

SIP/2.0 180 Ringing Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob sip:[email protected];tag=75From: Alice <sip:[email protected]>;tag=42Call-ID: j2qu348ek2328wsCseq: 1 INVITEContact: <sip:[email protected]>

SIP/2.0 200 OKVia: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob sip:[email protected];tag=75From: Alice <sip:[email protected]>;tag=42Call-ID: j2qu348ek2328wsCseq: 1 INVITEContact: <sip:[email protected]>

v=0o=alice 2890844526 2890844526 IN IP4 alice.udel.edus=Phone Callc=IN IP4 100.101.102.103t=0 0m=audio 49170 RTP/AVP 0a=rtpmap:0 PCMU/8000

v=0o=bob 2890844528 2890844528IN IP4 tower.yahoo.coms=Phone Callc=IN IP4 200.201.202.203t=0 0m=audio 60000 RTP/AVP 0a=rtpmap:0 PCMU/8000

SIP/2.0 ACKVia: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bK321gTo: Bob sip:[email protected];tag=75From: Alice <sip:[email protected]>;tag=42Call-ID: j2qu348ek2328wsCseq: 1 ACK

Inserts a “From” tag and sets the

session parameters

Inserts a “To” tag and sets the

session parameters

Call ID, from and to tags identify a

dialog

Alice Bob

Page 21: Session Initialization Protocol (SIP)

21

SIP Proxy Server

Alice Bob

Outbound proxy server

Inbound proxy server

Location serverDNS server

Media (RTP)

INVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=42Subject: Where are you exactly?Contact: <sip:[email protected]>

INVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP proxy.yahoo.com:5060; branch=z9hG4bKtiop3Via: SIP/2.0/UDP proxy.udel.com:5060; branch=z9hG4bK83842.1Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=42Subject: Where are you exactly?Contact: <sip:[email protected]>

100 Trying

100 Trying

180 Ringing

180 Ringing

180 Ringing

200 OK

200 OK

200 OK

ACK

BYE

200 OK

INVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP proxy.udel.com:5060; branch=z9hG4bK83842.1Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=42Subject: Where are you exactly?Contact: <sip:[email protected]>

SIP Trapezoid

Page 22: Session Initialization Protocol (SIP)

22

SIP Proxy Server

INVITE Bob

Alice

Bob’s voicemail

Bob’s Phone

INVITE Bob

486 Busy Here

INVITE Bob

Proxy servers can make flexible “routing decisions” to decide where to send a request.

Location Service

Proxy Server

Page 23: Session Initialization Protocol (SIP)

23

SIP Redirect ServerINVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=42Subject: Where are you exactly?Contact: <sip:[email protected]>

Alice

Bob

Redirect Server

SIP/2.0 301 Moved PermanentlyVia: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>;tag=64From: Alice <sip:[email protected]>;tag=42Subject: Where are you exactly?Contact: sip:[email protected]

ACKINVITE sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060; branch=z9hG4bKmp17aTo: Bob <sip:[email protected]>From: Alice <sip:[email protected]>;tag=13473Subject: Where are you exactly?Contact: <sip:[email protected]>

Page 24: Session Initialization Protocol (SIP)

24

Terminal Mobility- Pre-callHome Proxy/registrarMobile -JIM JANE

REGISTER

200 OK

INVITE

ACK

Media Session

200 OK

INVITE

200 OK

Page 25: Session Initialization Protocol (SIP)

25

Terminal Mobility- Mid Call

INVITE200 OK

ACKMedia Session

Home Network Visited

Network

Page 26: Session Initialization Protocol (SIP)

26

Personal Mobility

INVITE Bob

Alice

Bob’s Cell PhoneINVITE Bob

INVITE Bob

Bob’s Office Phone

INVITE Bob

Bob’s Home Phone

In parallel search, a proxy issues several requests to possible user locations upon receiving an incoming request.

200 OK

200 OK CANCEL

CANCEL

Location Service

Proxy Server

Page 27: Session Initialization Protocol (SIP)

27

Session Mobility

Transfer and Retrieval

Transfer means to move the session on the current device to one or more other devices

Retrieval means to cause a session currently on another 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 multiple devices

Page 28: Session Initialization Protocol (SIP)

28

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 node), using the SDP parameters to establish media sessions between 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

another 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

Page 29: Session Initialization Protocol (SIP)

29

Local Device

INVITE

200 OK local Parameters

INVITE local Parameters

Mobile Node Corresponding Node

ACK CN Parameters

200 OK CN parameters

Media Session

ACK

Media Session

Page 30: Session Initialization Protocol (SIP)

30

Local Device Mobile Node Corresponding Node

REFER ,refer-to

Media Session

200 OK

ACK

NOTIFY

200 OKBYE

200 OK

200 Accepted

INVITE, Replaces

Media Session

Media Session

Page 31: Session Initialization Protocol (SIP)

31

References

J. Rosenberg, SIP: Session Initialization Protocol, RFC 3261, 2002

A. Johnston, SIP: Understanding the Session Initialization Protocol, 2nd edition

Page 32: Session Initialization Protocol (SIP)

32

Questions