71
Session Initiation Protocol (SIP) Onno W. Purbo [email protected]

Ppt Session Initiation Protocol 1 2002

  • Upload
    payalc

  • View
    336

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Ppt Session Initiation Protocol 1 2002

Session Initiation Protocol (SIP)

Onno W. [email protected]

Page 2: Ppt Session Initiation Protocol 1 2002

Referensi Henning Schulzrinne, Columbia

University, New York, May 2001 Dr. Andreas Steffen,

Komunikationsysteme

Page 3: Ppt Session Initiation Protocol 1 2002

SIP in short .. Dr. Andreas Steffen,

Komunikationsysteme

Page 4: Ppt Session Initiation Protocol 1 2002

SIP addressing ..

Page 5: Ppt Session Initiation Protocol 1 2002

SIP processes

Page 6: Ppt Session Initiation Protocol 1 2002

SIP format

Page 7: Ppt Session Initiation Protocol 1 2002

Overview Protocol architecture Typical component architecture Addressing and locating SIP

entities. Protocol operation and extensions.

Page 8: Ppt Session Initiation Protocol 1 2002

Introduction .. SIP = core protocol for establishing

sessions in the internet. Transports session description

information from initiator (caller) to callees.

Allows to exchange parameters in mid-session.

Terminate session.

Page 9: Ppt Session Initiation Protocol 1 2002

VoIP protocol architecture

Page 10: Ppt Session Initiation Protocol 1 2002
Page 11: Ppt Session Initiation Protocol 1 2002

Media Protocol Stack

Page 12: Ppt Session Initiation Protocol 1 2002
Page 13: Ppt Session Initiation Protocol 1 2002

SIP Protocol Use

Page 14: Ppt Session Initiation Protocol 1 2002
Page 15: Ppt Session Initiation Protocol 1 2002

SIP Applications .. Setting up voice-over-IP calls. Setting up multimedia

conferences. Event notification (subscribe /

notify) IM and presence. Text and general messaging. Signaling transport.

Page 16: Ppt Session Initiation Protocol 1 2002

SIP addressing SIP uses e-mail style addressing to

identify users.

Page 17: Ppt Session Initiation Protocol 1 2002

Personal Mobility

Page 18: Ppt Session Initiation Protocol 1 2002

SIP addressing .. Typically, same as user’s e-mail

address: [email protected] [email protected]

Written as URL, e.g, Sip:[email protected]

Can add parameters, such as, type (user=“phone”) or transport protocol.

Page 19: Ppt Session Initiation Protocol 1 2002

Tel URLs (RFC 2806) Also can use tel URL for telephone

numbers, e.g., Tel:+0811797677 Fax:+022.253.4677

Either global (tel:+001..) or local (tel:0w00222534677; phone-context=+0222534677) number.

Allow post-dialing digits; postd=pp32. Also modem:+52990000; type=v32b?7e1; type=v110.

Page 20: Ppt Session Initiation Protocol 1 2002

SIP building blocks

Page 21: Ppt Session Initiation Protocol 1 2002

Back-to-Back UA (B2BUA) Two (or more) user agents, where

incoming calls trigger outgoing calls to somebody else.

Also, “third-party call control” (later)

Useful for services and anonymity

Page 22: Ppt Session Initiation Protocol 1 2002

Back-to-Back UA (B2BUA)

Page 23: Ppt Session Initiation Protocol 1 2002

Maintaining state in SIP enitities. Stateless:

Each request and response handled independently.

(Transaction) Stateful: Remember a whole request/response

transaction. Call stateful:

Remember a call from beginning to end.

Page 24: Ppt Session Initiation Protocol 1 2002

SIP archirecture Peer-to-peer Outbound proxy VoIP to PSTN PSTN to VoIP

Page 25: Ppt Session Initiation Protocol 1 2002

peer-to-peer

Page 26: Ppt Session Initiation Protocol 1 2002

outbound proxy

Page 27: Ppt Session Initiation Protocol 1 2002

VoIP to PSTN

Page 28: Ppt Session Initiation Protocol 1 2002

PSTN to VoIP

Page 29: Ppt Session Initiation Protocol 1 2002

SIP operation in proxy mode

Page 30: Ppt Session Initiation Protocol 1 2002
Page 31: Ppt Session Initiation Protocol 1 2002

SIP operation in redirect mode 302: redirection for a single call 301: permanently

Page 32: Ppt Session Initiation Protocol 1 2002
Page 33: Ppt Session Initiation Protocol 1 2002

Locating SIP users

Page 34: Ppt Session Initiation Protocol 1 2002

Registrar and location servers

Page 35: Ppt Session Initiation Protocol 1 2002
Page 36: Ppt Session Initiation Protocol 1 2002

Basic user location mechanism Host (SIP URL) hostname of proxy DNS: hostname of proxy SIP server(s) If SIP UAS: alter user; done. If SIP proxy/redirect server: map URLn

URLn+1, using any information in the request

Go to step 1

One minor exception ..

Page 37: Ppt Session Initiation Protocol 1 2002

Basic SIP “routing” mechanism Will fill in details later Route using request URIs. All but first request in call typically

bypass proxies and go direct UAC-UAS. However, can use “record-routing” to

force certain proxies to be visited all the time.

Responses always traverse the same route as requests

Page 38: Ppt Session Initiation Protocol 1 2002

Outbound proxies Normally, proxy servers one or more

domains. Outbound proxies are used for all

outbound requests from within a domain.

Typically, for managing corporate firewalls and policy enforcement.

May also provide dial plans or route tel/fax URLs.

Other uses: lawyer client billing, ..

Page 39: Ppt Session Initiation Protocol 1 2002

Locating users: DNS SRV .. e-mail: DNS MX record mapping

domain to mail server(s). SIP: use newer record for general

purpose mapping, SRV (RFC 2782) Mapping from service and

transport protocol to one or more servers, including protocols.

Page 40: Ppt Session Initiation Protocol 1 2002

Locating users: DNS SRV ..

Allow priority (for back-up) and weight (for load balancing).

Page 41: Ppt Session Initiation Protocol 1 2002

Using DNS SRV for scalable load balacing ..

Page 42: Ppt Session Initiation Protocol 1 2002
Page 43: Ppt Session Initiation Protocol 1 2002

Aside: SIP scaling .. HTTP request director SIP

client-based HTTP randomized DNS (short TTL!)

SRV weight and priorities. Can’t just distribute request

randomly, since backend (registration) synchronization is needed.

Page 44: Ppt Session Initiation Protocol 1 2002

Aside: SIP scaling .. Registration scaling:

request/second * 3600; e.g. 100 request/second 360.000 user/server.

Major bottleneck are logging and database updates.

Generally, higher registration than INVITE rates.

Page 45: Ppt Session Initiation Protocol 1 2002

SIP operation ..

Page 46: Ppt Session Initiation Protocol 1 2002

SIP requests and responses Text, not binary, format. Look very similar to HTTP/1.1 Requests and responses are similar

except for first line. Requests and responses can

contain message bodies; typically session descriptions, but also ASCII or HTML.

Page 47: Ppt Session Initiation Protocol 1 2002

SIP syntax

Page 48: Ppt Session Initiation Protocol 1 2002

SIP syntax Field names and some tokens, e.g.

media type, are case-insensitive. Everything else is case-sensitive. White space doesn’t matter except

in the first line. Lines can be folded. Multi-valued header fields can be

combined as a comma-lists.

Page 49: Ppt Session Initiation Protocol 1 2002

SIP methods

Page 50: Ppt Session Initiation Protocol 1 2002

SIP invitation and media negotiation

Page 51: Ppt Session Initiation Protocol 1 2002

Tagging To After forking and merging, hard to

tell who responded. UAS responds with random tag

added to disambiquate To: “cuk” <sip:cuk@sip-

gtw.tel.co.id>; tag=7gt8 Future requests ignored if they

contain wrong tag.

Page 52: Ppt Session Initiation Protocol 1 2002

SIP call legs Call legs: From, To, Call-ID Requests from callee to caller

reverse To and From. Caller and callee keep their own

Cseq space. Either side can send more INVITEs

or BYE

Page 53: Ppt Session Initiation Protocol 1 2002

SIP responses

Page 54: Ppt Session Initiation Protocol 1 2002

SIP response routing .. Request are routed via URL Response trace back request route

without proxy server state Forward to host, port in next Via TCP: re-use connection if possible,

create new one if needed. UDP: may send responses to same

port as requests.

Page 55: Ppt Session Initiation Protocol 1 2002

SIP response routing

Page 56: Ppt Session Initiation Protocol 1 2002

SIP spirals

Page 57: Ppt Session Initiation Protocol 1 2002

SIP spirals

Page 58: Ppt Session Initiation Protocol 1 2002

Forcing Request Path Usually, bypass proxies on

subsequent requests. Some-proxies want to stay in path

call-stateful: Firewalls Anonymizer proxies. Proxies controlling PSTN gateways.

Use Record-Route and Route

Page 59: Ppt Session Initiation Protocol 1 2002

Request Routing

Page 60: Ppt Session Initiation Protocol 1 2002

SIP request forking

Page 61: Ppt Session Initiation Protocol 1 2002

SIP sequential request forking

Page 62: Ppt Session Initiation Protocol 1 2002

SIP request forking Branches tried in sequence or

parallel (or some combination). Recursion: may try new branches if

branch returns 3xx. Return best final answer = lower

status code. Forward provisional responses.

Page 63: Ppt Session Initiation Protocol 1 2002

Parallel forking call flow

Page 64: Ppt Session Initiation Protocol 1 2002
Page 65: Ppt Session Initiation Protocol 1 2002

SIP transport issues SIP over any packet network, reliable or

unreliable. Choices:

UDP: most common Low state overhead Small max. packet size

TCP: can combine multiple signaling flows over one link

Use with SSL Connection setup overhead HOL blocking for trunks

Page 66: Ppt Session Initiation Protocol 1 2002

SIP transport issues .. Choices:

SCTP: new protocol No HOL blocking Fall back address (but SVR provides this

already) Connection setup overhead

Page 67: Ppt Session Initiation Protocol 1 2002

Other signaling approaches

Page 68: Ppt Session Initiation Protocol 1 2002

Diff to classical signaling

Page 69: Ppt Session Initiation Protocol 1 2002

Aside: Alternative architecture Master-slave: MGC (media gateway

controller) controls one or more gateways.

Allows splitting of signal and media functionality.

“please send from circuit 42 to 10.1.2.3” Uses MGCP (implemented) or

Megaco/H.248 (standarized, but just beginning to be implemented).

Gateway can be residential.

Page 70: Ppt Session Initiation Protocol 1 2002

Aside: Alternative architecture Basis of PacketCable NCS (Network

Control System) architecture. Service creation similar to digital

PBX or switch. End system has no semantic

knowledge what’s happening. can charge for caller id, call

waiting.

Page 71: Ppt Session Initiation Protocol 1 2002

MGCP/SIP architecture