44
Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM [email protected]

Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM [email protected]

Embed Size (px)

Citation preview

Page 1: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Session Initiation Protocol Tutorial

Ronen Ben-Yossef

VP of Products - RADCOM

[email protected]

Page 2: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Objectives

• What is SIP?

• Why Did the World Need SIP?

• What are the Differences between SIP, H.323 and MGCP?

• SIP Entities and their Functions

• Example of a Basic SIP Session.

Page 3: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

What is SIP?• Session Initiation Protocol (SIP) is an application layer

control (signaling) protocol for creating, modifying and terminating sessions with one or more participants.

• SIP can invite both persons and "robots," such as a media storage service, to participate in a call.

• These sessions include multimedia such as Voice, Video Messaging and events.

• SIP is defined in RFC 3261 (preceded by RFC 2543).

Page 4: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

What Else Is SIP Used For?• SIP is a flexible protocol designed to be part of

the overall IETF multimedia data and control architecture.

• Setup many types of sessions such as Push-To-Talk Over Cellular or IM

• Telephony over cable• Carrier backbone VoIP sessions (SIP-T)

between 2 PSTNs• Voice for 3G wireless networks (3GPP)

Page 5: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

What Doesn’t SIP Do?

• Basic SIP does not offer conference control services.

• SIP does not prescribe how a conference is to be managed.

• SIP does not reserve resources, but can convey to the invited system the information necessary to do this.

Page 6: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

How Does SIP Compare with H.323?

• SIP offers similar functionality to H.323

• SIP is protocol neutral: can use TCP/UDP or run on top of AAL5, IPX, X.25, SCTP etc.

• SIP architecture is modular hence extensible

• SIP is less complex

• SIP uses simpler encoding – Text vs. Binary.

• SIP supports calling-party number security

• SIP setup times are shorter

• SIP address is any URL while H.323 addressing is more confined

• Politics: SIP is IETF, H.323 is ITU-T

Page 7: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

ITU

H.323

H.225

H.245

RTP

RTCP

IETF

SIP

SDP

SAP

RTP

RTCP

RTSP

MGCP

RAS

Page 8: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

MGCP Carrier Grade

Page 9: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

MGCP At The Access

Page 10: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

How is SIP different from MGCP?• MGCP is a device control protocol. A slave (gateway

(MG)) is controlled by a master (media gateway controller (MGC), call agent).

• SIP may be used between controllers, in a peer-to-peer relationship.

• To the SIP side, the MGC looks like a node with a large number of connections, but otherwise the same as a "native" SIP device.

• The MG is completely unaware that the call between MGCs is established via SIP.

• Only the MGC needs to understand both protocols.

Page 11: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Combined Architecture

Page 12: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Why Did The World Need SIP?• H.323

– Uses the traditional approach of end-to-end call setup– Expands to accommodate other traditional services such as

Video

• SIP– “Flexible” protocol– Designed to scale and stay simple– Allows integrated services

• Voice• Video• IM• Presence• Conferencing

Page 13: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Why Did The World Need SIP?• VoIP–only applications are past the initial

adoption phase• Service providers are seeking to expand their

offerings• SIP is the most suitable tool to achieve that goal• SIP is matured enough for prime time • Example: adopted by cellular world for

– 3GPP Voice Core– Push-To-Talk over cellular– Packet Cable

Page 14: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Entities

• SIP servers:– User Agent Client– User Agent Server– Proxy servers– Redirect servers– Registrars– Location server

• Application – specific servers e.g.:– IM server– POC server

• There are several different SIP entities, each with their own purpose.

Page 15: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

User Agent Client• SIP device or application that initiates SIP

requests• This is the SIP name for endpoint device

Page 16: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

User Agent Server• SIP device or application that terminates SIP

requests• UAS contacts the user when a SIP request is

received.• The UAS returns a response on behalf of the user.• The response either accepts, rejects, or redirects

the request.

User Agent Server

“Call for you?”

“I’ll accept.”

SIP Call Request

Call Accepted

Page 17: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Proxy Server• A proxy server is an intermediary program that acts as both a

server and a client for the purpose of making requests on behalf of other clients.

• A proxy interprets a request, and if necessary, rewrites the request message before forwarding it.

• Helps routing requests to user’s current location

Proxy Server

Forwards SIP Requests.

Responds on behalf Y and X.

Implements provider’s Call-routing policies

User Agent Y

User Agent X

Page 18: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Redirect ServerRedirects calls to new location.

A redirect server is a server that accepts a SIP request, then returns new addresses to the client.

Unlike a proxy server, a redirect server does not initiate its own SIP request.

Unlike a user agent server, a redirect server does not accept calls.

User Agent

User Agent

RedirectServer

Page 19: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Registrar

Redirect Server

Specialized UAS that Allows a user to register their presence.

A registrar is a server that accepts REGISTER requests.

A registrar is typically co-located with a proxy or redirect server.

A registrar may offer location services.

Proxy Server

RegisterServer

Page 20: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Protocol Building Blocks

Request Response Request

Transaction Transaction Transaction

Dialog Dialog

Session

RequestRequest Response

Transaction

Page 21: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Request Types

• INVITE• ACK• BYE• CANCEL• OPTIONS

• REGISTER• MESSAGE• SUBSCRIBE• NOTIFY

Page 22: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Response Codes

Code Phrase1xx Provisional2xx Success3xx Redirection4xx Client Error5xx Server Error6xx Global Failure

Page 23: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Transactions• A SIP transaction consists of a SIP request

with the appropriate response.• To identify which SIP request a response is

for, the following fields should be identical.– Call-ID - uniquely identifies a particular invitation.– Cseq - (command sequence) a unique number that is

incremented for each command with the same call-ID.– To, From.– Tag (The Tag is only present when more than one Via

header field is present).

• In RFC 3261 less fields are required, with the presence of “magic cookie”

Page 24: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

INVITE• The INVITE request asks a callee to establish

a 2-party call or join a conference call.• The INVITE includes a session description

(using SDP). The session description enumerates media types & formats.

• If the callee agrees, the caller sends an ACK & returns a description listing the media it wishes to use.– For a multicast session, the callee should only return a

session description if it is unable to receive the media indicated.

You are

cordially

invited...

Page 25: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Sip Session Phone to Phone

INVITE

1XX - Ringing

ACK

Conversation

BYE

200OK

200OK

Page 26: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

INVITE With a Proxy Server

200 OK

EndUser

EndUser

ProxyServer

LocationServer

User AgentServerINVITE

[email protected]

RING

200 OK

ACK

mj

mj@bbThor

INVITEmj@bbThor

ACK

bulls.orgbulls.org

100 TRYING

Page 27: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Sip Session Via Proxy – RFC 3261

REGISTER (Address1)200OK

100 Trying

Conversation

200OK

INVITE

Register + Proxy Server

REGISTER (Address2)

200OK

INVITEINVITE

200Ok Invite (address2)

ACKACK

200OK

200Ok Invite (address1)

User decide

Page 28: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

INVITE With a Redirect ServerEndUser

EndUser

RedirectServer

LocationServer

User AgentServerINVITE

[email protected]

RING

200 OK

mj

[email protected]

[email protected]

ACK

302 MOVED [email protected]

ACK

Page 29: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Sip IM Session

REGISTER - Online

200OK

200OK - Subscribe

SUBSCRIBE (User1)

Register + IM Server

NOTIFY - Online

200OK - Notify

REGISTER – Busy

200OKNOTIFY - Busy

200OK - Notify

200OK - Subscribe

User1 User2

SUBSCRIBE (Expire=0) Delete Subscription

Page 30: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

The Scenario

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

Page 31: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Invite

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

INVITE

Status 100Trying

Page 32: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Invite

Page 33: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Invite

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

INVITEw/Token

Status 100Trying

INVITE

Page 34: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Another Invite

Page 35: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Invite

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

INVITE

Status 180

Page 36: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Invite with a Status Code

Page 37: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Provosional Response

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

Status 180

Status 180

Page 38: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP Status Codes

Page 39: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP OK Plus First RTP

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

RTP

200 OK

Page 40: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP OK Plus First RTP Frame

Page 41: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP OK Messages

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

200 OK

200 OK

Page 42: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

SIP OK Messages

Page 43: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com

Calling SIP Phone Called Proxy Servr Called SIP PhoneCalling Proxy Servr

ACK

ACK

ACK

Acknoledgement

Page 44: Session Initiation Protocol Tutorial Ronen Ben-Yossef VP of Products - RADCOM ronenb@radcomusa.com