introduction to sip(session initiation protocol)

40
Introduction to Session Iinitiation Protocol (a VoIP protocol) 2007-10-16 William.L [email protected]

Upload: william-lee

Post on 19-May-2015

5.858 views

Category:

Technology


2 download

DESCRIPTION

SIP is a VoIP protocol in Application Layer of OSI arch

TRANSCRIPT

Page 1: Introduction to SIP(Session Initiation Protocol)

Introduction to

Session Iinitiation Protocol(a VoIP protocol)

2007-10-16William.L

[email protected]

Page 2: Introduction to SIP(Session Initiation Protocol)

Agenda

� Introduction

� Architecture

� SIP Message Format

� Call Flows

Page 3: Introduction to SIP(Session Initiation Protocol)

Introduction

� An application-layer signaling protocol� Create, Modify, and Terminate sessions

� SIP is ASCII text-based

� SIP incorporates elements of two widely used Internet

protocols:

� HTTP � SIP borrowed a client-server design and the use of URLs and URIs

� SMTP � SIP borrowed a text-encoding scheme and header style

� SIP uses e-mail-like names for addresses

� UserName@Host-Domain

Page 4: Introduction to SIP(Session Initiation Protocol)

Architecture (1/2)

� Client-Server architecture --- the same as HTTP

� Client

� originates message

� Server

� responds to or forwards message

� Elements

� SIP User Agents

� takes direction or input from a user and acts as an agent on their

behalf to set up and tear down media sessions with other user

agents.

� SIP Servers

� Registrar

� Proxy

� Redirect

Page 5: Introduction to SIP(Session Initiation Protocol)

Architecture (2/2)

Request

Response

Server Client

Page 6: Introduction to SIP(Session Initiation Protocol)

SIP Message (1/8)

SIP Message

Message Headers

Request / Status Line

Message Body

C R L F

Page 7: Introduction to SIP(Session Initiation Protocol)

INVITE sip:[email protected]:5060 SIP/2.0

Via: SIP/2.0/UDP 22.3.56.790:5060;branch=z9G4bK0e8d

From: sip:[email protected]:5060

To: sip:[email protected]:5060

Call-ID: [email protected]

Cseq: 1 INVITE

Content-Type: applcation/sdp

Content-Length: 224

v=0o=jessica 0 0 IN IP4 10.7.1.229s=Session SDPc=IN IP4 10.7.1.229m=audio 5004 RTP/AVP 0 3 5a=rtpmap:0 PCMU/8000

SIP Message (2/8)

Page 8: Introduction to SIP(Session Initiation Protocol)

SIP

Request

Message Via: SIP/2.0/UDP 22.3.56.790:5060;branch=z9G4bK0e8d

From: sip:[email protected]:5060

To: sip:[email protected]:5060

Call-ID: [email protected]

Cseq: 1 INVITE

Content-Type: applcation/sdp

Content-Length: 224

INVITE sip:[email protected]:5060 SIP/2.0

v=0o=jessica 0 0 IN IP4 10.7.1.229s=Session SDPc=IN IP4 10.7.1.229m=audio 5004 RTP/AVP 0 3 5a=rtpmap:0 PCMU/8000

C R L F

SIP Message (3/8)

Page 9: Introduction to SIP(Session Initiation Protocol)

SIP Message (4/8)

Page 10: Introduction to SIP(Session Initiation Protocol)

GET /2001/Talks/0710-ep-grid/all.htm,access HTTP/1.1

User-Agent: W3C ChACL agent

Host: www.w3.org

Accept: text/xml

Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0

Authorization: Basic xxxxxxxxxxxxxxxxxxxx

Connection: Keep-Alive, TE

TE: deflate, gzip, chunked, identity, trailers

HTTP Message Request

HTTP/1.0 200

Date: Sat, 07 Jul 2001 14:08:12 GMT

Server: Apache/1.3.6 (Unix) PHP/3.0.15

WWW-Authenticate: Basic realm="W3CACL“

Content-length: 301

Content-Type: text/xml<?xml version="1.0"?>

<!-- Session-Id: 994514895.830925 --><rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:s="http://www.w3.org/2001/02/acls/ns#"> <rdf:Description

aboutEach="#B1"> <s:hasAccessTo

rdf:resource="http://www.w3.org/2001/Talks/0710-ep-grid/all.htm"/>

</rdf:Description></rdf:RDF>

HTTP Message Response

SIP Message (5/8)

SIP messages’ format

is the same as HTTP

ones

Page 11: Introduction to SIP(Session Initiation Protocol)

� 6 Methods defined for request� REGISTER

� INVITE

� ACK

� BYE

� CANCEL

� OPTONS

SIP Message (6/8)

Page 12: Introduction to SIP(Session Initiation Protocol)

� Status codes

� Informational – 1xx

� Success – 2xx

� Redirection – 3xx

� Client-Error – 4xx

� Server-Error – 5xx

� Global-Failure – 6xx

SIP Message (7/8)

Page 13: Introduction to SIP(Session Initiation Protocol)

� Most header fields and its using are the same as that defined in HTTP and SMTP

SIP Message (8/8)

Page 14: Introduction to SIP(Session Initiation Protocol)

Call Flows

� Registration

� Basic Call

� Re-INVITE – modify the session’s parameter

� No Answer – use CANCEL method

� Busy

� Call Hold

� 3-way Conference -- The third party is added

Page 15: Introduction to SIP(Session Initiation Protocol)

Registration

Page 16: Introduction to SIP(Session Initiation Protocol)

Registration_Register_request

Page 17: Introduction to SIP(Session Initiation Protocol)

Registration_Register_response

Page 18: Introduction to SIP(Session Initiation Protocol)

Request

Response

[email protected]

Registrar

User

Agent

Entity

Location

Server

Bob

192.0.2.4

use

store [email protected] : 192.0.2.4

Page 19: Introduction to SIP(Session Initiation Protocol)

Basic Call

1

2

3

4

5

6

Page 20: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_1

Page 21: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_2

Page 22: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_3

Bob Off-hook

Page 23: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_4

Page 24: Introduction to SIP(Session Initiation Protocol)
Page 25: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_5

Bob On-hook

Page 26: Introduction to SIP(Session Initiation Protocol)

Basic Call_message_6

Page 27: Introduction to SIP(Session Initiation Protocol)

Basic Call_the session is terminated

Page 28: Introduction to SIP(Session Initiation Protocol)

Session with re-INVITE (IP Address Change)

9

6

Page 29: Introduction to SIP(Session Initiation Protocol)

F6

Session with re-INVITE – Bob’s Original IP address

Page 30: Introduction to SIP(Session Initiation Protocol)

F9

Session with re-INVITE – Bob’s new IP address

Page 31: Introduction to SIP(Session Initiation Protocol)

Unsuccessful --- No Answer

Page 32: Introduction to SIP(Session Initiation Protocol)

Unsuccessful --- Busy

Page 33: Introduction to SIP(Session Initiation Protocol)

Call

Hold

Page 34: Introduction to SIP(Session Initiation Protocol)

Call Hold_message_Request

F5

Page 35: Introduction to SIP(Session Initiation Protocol)

Call Hold_message_Response

F6

Page 36: Introduction to SIP(Session Initiation Protocol)

Three-Way Conference --- Third Party is Added

Page 37: Introduction to SIP(Session Initiation Protocol)

Three-Way Conference - Message_1

F5

Page 38: Introduction to SIP(Session Initiation Protocol)

F8

Three-Way Conference - Message_2

Page 39: Introduction to SIP(Session Initiation Protocol)

Three-Way Conference - start to 3-way conference

Page 40: Introduction to SIP(Session Initiation Protocol)

References

� RFC-3261 SIP:Session Initiation Protocol

� Understanding the Session Initiation Protocol, Alan B.

Johnstone , 2/e, 2004

� draft-ietf-sipping-service-examples-10.txt, March 5,

2006

� draft-ietf-sipping-conferencing-models-01.txt, January

2003

� RFC 3665 Session Initiation Protocol (SIP) Basic Call

Flow Examples,

, December 2003

� http://www.in2eps.com/xrai/ztk-ietf-wg-rai-sip.html