Introduction to SIP(Session Initiation Protocol)

Preview:

DESCRIPTION

SIP is a VoIP protocol in Application Layer of OSI arch

Citation preview

Introduction to

Session Iinitiation Protocol(a VoIP protocol)

2007-10-16William.L

wiliwe@gmail.com

Agenda

� Introduction

� Architecture

� SIP Message Format

� Call Flows

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

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

Architecture (2/2)

Request

Response

Server Client

SIP Message (1/8)

SIP Message

Message Headers

Request / Status Line

Message Body

C R L F

INVITE sip:allen@10.7.1.228:5060 SIP/2.0

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

From: sip:carol@22.3.56.790:5060

To: sip:bob@22.3.56.789:5060

Call-ID: 1234567890@10.8.2.106

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)

SIP

Request

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

From: sip:carol@22.3.56.790:5060

To: sip:bob@22.3.56.789:5060

Call-ID: 1234567890@10.8.2.106

Cseq: 1 INVITE

Content-Type: applcation/sdp

Content-Length: 224

INVITE sip:allen@22.3.56.789: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)

SIP Message (4/8)

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

� 6 Methods defined for request� REGISTER

� INVITE

� ACK

� BYE

� CANCEL

� OPTONS

SIP Message (6/8)

� Status codes

� Informational – 1xx

� Success – 2xx

� Redirection – 3xx

� Client-Error – 4xx

� Server-Error – 5xx

� Global-Failure – 6xx

SIP Message (7/8)

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

SIP Message (8/8)

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

Registration

Registration_Register_request

Registration_Register_response

Request

Response

bob@biloix.com

Registrar

User

Agent

Entity

Location

Server

Bob

192.0.2.4

use

store bob@biloix.com : 192.0.2.4

Basic Call

1

2

3

4

5

6

Basic Call_message_1

Basic Call_message_2

Basic Call_message_3

Bob Off-hook

Basic Call_message_4

Basic Call_message_5

Bob On-hook

Basic Call_message_6

Basic Call_the session is terminated

Session with re-INVITE (IP Address Change)

9

6

F6

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

F9

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

Unsuccessful --- No Answer

Unsuccessful --- Busy

Call

Hold

Call Hold_message_Request

F5

Call Hold_message_Response

F6

Three-Way Conference --- Third Party is Added

Three-Way Conference - Message_1

F5

F8

Three-Way Conference - Message_2

Three-Way Conference - start to 3-way conference

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

Recommended