Session Initiation Protocol (SIP)

41
Session Initiation Protocol (SIP) Chapter 5 speaker Wenpin g Zhang data 2007.11.8

description

Session Initiation Protocol (SIP). Chapter 5 speaker : Wenping Zhang data : 2007.11.8. Introduction. A powerful alternative to H.323 More flexible, simpler Easier to implement Advanced features Better suited to the support of intelligent user devices - PowerPoint PPT Presentation

Transcript of Session Initiation Protocol (SIP)

Page 1: Session Initiation Protocol (SIP)

Session Initiation Protocol (SIP)

Chapter 5

speaker : Wenping Zhangdata : 2007.11.8

Page 2: Session Initiation Protocol (SIP)

2

Introduction A powerful alternative to H.323 More flexible, simpler Easier to implement

Advanced features 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)

Page 3: Session Initiation Protocol (SIP)

3

The Popularity of SIP Originally Developed in the MMUSIC (Multiparty Multimedia S

ession Control) A separate SIP working group RFC 2543 Many developers The latest version : RFC 3261

SIP + MGCP/MEGACO The VoIP signaling in the future

“bake-off” Various vendors come together and test their products against e

ach other To ensure that they have implemented the specification correctly To ensure compatibility with other implementations

Page 4: Session Initiation Protocol (SIP)

4

SIP Architecture A signaling protocol

The setup, modification, and tear-down of multimedia sessions

SIP + SDP Describe the session characteristics

Separate signaling and media streams

Page 5: Session Initiation Protocol (SIP)

5

SIP Server 1/3 Registrar

Accepts SIP REGISTER requests Indicating that the user is at a particular address Personal mobility

Typically combined with a proxy or redirect server

Page 6: Session Initiation Protocol (SIP)

6

SIP Server 2/3 Proxy servers

Handle requests or forward requests to other servers

Can be used for call forwarding, time-of-day routing, or follow-me services

Page 7: Session Initiation Protocol (SIP)

7

SIP Server 3/3 Redirect servers

Map the destination address to zero or more new address and returns the new address

Page 8: Session Initiation Protocol (SIP)

8

SIP Call Establishment 1/2

Page 9: Session Initiation Protocol (SIP)

9

SIP Call Establishment 2/2 It is simple, which contains a number of

interim responses.

Page 10: Session Initiation Protocol (SIP)

10

Examples of SIP Messages

Page 11: Session Initiation Protocol (SIP)

11

Overview of SIP Messaging Syntax

Text-based Similar to HTTP Disadvantage – more bandwidth

consumption SIP messages

Message = start-line *message-header CRLF [message-body]

start-line = request-line | status-line request-line specifies the type of request The response (or status) line indicates

the success or failure of a given request.

Page 12: Session Initiation Protocol (SIP)

12

Message headers Additional information of the request or

response Message body

Describe the type of session The most common structure for the message

body is SDP (Session Description Protocol). Could include an ISDN User Part (ISUP)

message Examined only at the two ends

Page 13: Session Initiation Protocol (SIP)

13

Example

Page 14: Session Initiation Protocol (SIP)

14

SIP Requests request-line =

Method <SP> Request-URI <SP> SIP-version <CRLF>

Request-URI The address of the destination

Methods INVITE, ACK, OPTIONS, BYE, CANCEL, REGISTER

E.g.

Page 15: Session Initiation Protocol (SIP)

15

SIP Responses status-line =

SIP-version <SP> Status-code <SP> Reason-Phrase <CRLF>

Reason-Phrase A textual description of the outcome Could be presented to the user

Status-code (refer to Table 5-1) 1xx Informational 2xx Success 3xx redirection 4xx Request failure

E.g.

Page 16: Session Initiation Protocol (SIP)

16

Message Headers Provide further information about the mess

age E.g.

To: header in an INVITE The called party (callee)

From: header The calling party (caller)

Four main categories General, Request, Response, Entity

Page 17: Session Initiation Protocol (SIP)

17

General Headers Used in both requests and responses Basic information

E.g. To, From, Call-ID, …..

Contact : header Provides a URL for use in future

communication regarding a particular session

Page 18: Session Initiation Protocol (SIP)

18

Request Headers Apply only to SIP requests Addition information about the request or

the client E.g.

Subject, Priority, …….

Response Headers Further information about the response that

cannot be include in the status line E.g.

Unsupported, Retry-After, ……

Page 19: Session Initiation Protocol (SIP)

19

Entity Headers Indicate the type and format of

information included in the message body

E.g. Content-Length, Content-Type, Content-

Encoding, Content-Disposition, …….

Page 20: Session Initiation Protocol (SIP)

20

Examples : Registration

REGISTER

200 OK

Page 21: Session Initiation Protocol (SIP)

21

Page 22: Session Initiation Protocol (SIP)

22

Examples : Invitation

Conversation

ACK

INVITE

180 Ringring

200 OK

Page 23: Session Initiation Protocol (SIP)

23

Page 24: Session Initiation Protocol (SIP)

24

Examples : Termination of a Call

BYE

200 OK

Page 25: Session Initiation Protocol (SIP)

25

Page 26: Session Initiation Protocol (SIP)

26

The Session Description Protocol (SDP) The Most Common Message Body

Be session information describing the media to be exchanged between the parties

SDP, RFC 2327 (initial publication) SIP uses SDP in an answer/offer mode

An agreement between the two parties as to the types of media they are willing to share

RFC 3264 (An Offer/Answer Model with SDP) To describe how SDP and SIP should be used

together

Page 27: Session Initiation Protocol (SIP)

27

The Structure of SDP SDP simply provides a format for describing

session information to potential session participants.

Text-based Protocol The Structure of SDP

Session Level Info Name of the session Originator of the session Time that the session is to be active

Media Level Info Media type Port number Transport protocol Media format

Page 28: Session Initiation Protocol (SIP)

28

Page 29: Session Initiation Protocol (SIP)

29

SDP Syntax

A number of lines of text In each line

Field = value Field is exactly one character

Session-level fields Media-level fields

Begin with media description field

Page 30: Session Initiation Protocol (SIP)

30

Mandatory Fields v = (protocol version) o = (session origin or creator) s = (session name), a text string

For multicast conference t = (time of the session), the start time and stop

time For pre-arranged multicast conference

m = (media) Media type The transport port The transport protocol The media format, an RTP payload format

Page 31: Session Initiation Protocol (SIP)

31

Page 32: Session Initiation Protocol (SIP)

32

Optional Fields 1/2

Some optional fields can be applied at both session and media levels

i = (session information) u = (URI of description) e = (e-mail address) p = (phone number) c = (connection information)

Page 33: Session Initiation Protocol (SIP)

33

Optional Fields 2/2

b = (bandwidth information) r = (repeat times) z = (time zone adjustments) k = (encryption key) a = (attributes)

Describe additional attributes

Page 34: Session Initiation Protocol (SIP)

34

Ordering of Fields Session Level

Protocol version (v) Origin (o) Session name (s) Session information (i) URI (u) E-mail address (e) Phone number (p) Connection info (c) Bandwidth info (b) Time description (t) Repeat info (r) Time zone adjustments

(z) Encryption key (k) Attributes (a)

Media level Media description (m) Media info (i) Connection info (c) Bandwidth info (b) Encryption key (k) Attributes (a)

Page 35: Session Initiation Protocol (SIP)

35

Subfields 1/4 Field = <value of subfield1> <value of subfield2> <value of

sbufield3> Origin

username, the originator’s login id or “-” session ID

A unique ID Make use of NTP timestamp

version, a version number for this particular session network type

A text string IN refers to Internet

address type IPv4, IPv6

address, a fully-qualified domain name or the IP address

Page 36: Session Initiation Protocol (SIP)

36

Subfields 2/4 Connection Data

The network and address at which media data will be received

Network type Address type Connection address

Page 37: Session Initiation Protocol (SIP)

37

Subfields 3/4 Media Information

Media type audio, video, data, or control

Port Format

List the various types of media format that can be supported

According to the RTP audio/video profile

Page 38: Session Initiation Protocol (SIP)

38

Subfields 4/4 Attributes

To enable additional information to be included Property attribute

a=sendonly a=recvonly

value attribute a=orient:landscape used in a shared whiteboard session

rtpmap attribute The use of dynamic payload type a=rtpmap:<payload type> <encoding name>/<clock rate> [/<en

coding parameters>].

Page 39: Session Initiation Protocol (SIP)

39

Usage of SDP with SIP SIP and SDP make a wonderful partnership

for the transmission of session information. SIP provides the messaging mechanism for

the establishment of multimedia sessions. SDP provides a structured language for des

cribing the sessions. The entity headers identifies the message body.

Content-Length : 1280 Content-Type : application/sdp

Page 40: Session Initiation Protocol (SIP)

40

Page 41: Session Initiation Protocol (SIP)

41

Example : Negotiation of Media

Conversation

ACK

200 OK

INVITE