29
SIP Fundimentals IAP 2008 VoIP Series Dennis Baron January 15, 2008

SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 1np160

SIP FundimentalsIAP 2008 VoIP Series

Dennis Baron

January 15, 2008

Page 2: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 2np160

Outline

• What is SIP

• SIP system components

• SIP messages and responses

• SIP call flows

• SDP basics/CODECs

• IS&T Services

• Questions and answers

Page 3: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 3np160

What’s SIP

• IETF Standard defined by RFC 3261

• “The Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants.”

• Can be used for voice, video, instant messaging, gaming, etc., etc., etc.

• Uses URIs for addressing – single communications identity– mailto:[email protected] for email

– xmpp:[email protected] for instant messaging

– sip:[email protected] for voice and video

• Username replaced by numbers for telephone applications

Page 4: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 4np160

Where’s SIP

Application

Transport

Network

Physical/Data Link Ethernet

IP

TCP UDP

RTSP SIP

SDP codecs

RTP DNS(SRV)

Page 5: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 5np160

SIP Components

• User Agents– Clients – Make requests– Servers – Accept requests

• Server types– Redirect Server– Proxy Server– Registrar Server– Location Server

• Gateways

Page 6: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 6np160

SIP Trapezoid

DNS Server

Location Server

Terminating User Agent

Outbound Proxy

Originating User Agent

DNS

SIP

SIP

SIP SIP

RTP

Registrar

Inbound Proxy

SIP

Page 7: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 7np160

SIP Triangle ?

DNS Server

Location Server

Terminating User Agent

Originating User Agent

DNS

SIP

SIP SIP

RTP

Registrar

Inbound Proxy

SIP

Page 8: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 8np160

Terminating User Agent

Originating User Agent RTP

SIP SIP

B2BUA

SIP Peer to Peer !

Back-to-Back User Agent

Terminating User Agent

Originating User Agent

SIP

RTP

Page 9: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 9np160

SIP Methods

• INVITE Requests a session

• ACK Final response to the INVITE

• OPTIONS Ask for server capabilities

• CANCEL Cancels a pending request

• BYE Terminates a session

• REGISTER Sends user’s address to server

Page 10: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 10np160

SIP Responses

• 1XX Provisional 100 Trying

• 2XX Successful 200 OK

• 3XX Redirection 302 Moved Temporarily

• 4XX Client Error 404 Not Found

• 5XX Server Error 504 Server Time-out

• 6XX Global Failure 603 Decline

Page 11: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 11np160

SIP Flows - Basic

ACK

200 - OK

INVITE: sip:18.10.0.79“Calls”18.18.2.4

180 - Ringing Rings

200 - OK Answers

BYEHangs up

RTPTalking Talking

User A

User B

Page 12: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 12np160

SIP INVITEINVITE joeuser.mit.edu SIP/2.0

From: "Dennis Baron"<sip:[email protected]>;tag=1c41

To: sip:joeuser.mit.edu

Call-Id: [email protected]

Cseq: 1 INVITE

Contact: "Dennis Baron"<sip:[email protected]>

Content-Type: application/sdp

Content-Length: 304

Accept-Language: en

Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE

Supported: sip-cc, sip-cc-01, timer, replaces

User-Agent: Pingtel/2.1.11 (WinNT)

Date: Thu, 30 Sep 2004 00:28:42 GMT

Via: SIP/2.0/UDP 18.10.0.79

Page 13: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 13np160

Session Description Protocol

• IETF RFC 2327

• “SDP is intended for describing multimedia sessions for the purposes of session announcement, session invitation, and other forms of multimedia session initiation.”

• SDP includes:

– The type of media (video, audio, etc.)

– The transport protocol (RTP/UDP/IP, H.320, etc.)

– The format of the media (H.264 video, MPEG video, etc.)

– Information to receive those media (addresses, ports, formats and so on)

Page 14: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 14np160

SDP

v=0

o=Pingtel 5 5 IN IP4 18.10.0.79

s=phone-call

c=IN IP4 18.10.0.79

t=0 0

m=audio 8766 RTP/AVP 96 97 0 8 18 98

a=rtpmap:96 eg711u/8000/1

a=rtpmap:97 eg711a/8000/1

a=rtpmap:0 pcmu/8000/1

a=rtpmap:8 pcma/8000/1

a=rtpmap:18 g729/8000/1

a=fmtp:18 annexb=no

a=rtpmap:98 telephone-event/8000/1

Page 15: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 15np160

CODECs

• Audio– G.711

• 8kHz sampling rate• 64kbps

– G.729• 8kHz sampling rate• 8kbps• Voice Activity Detection

• Video– H.264

• MPEG-4– H.263

Page 16: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 16np160

SIP Flows - Registration

200 - OK

REGISTER: sip:[email protected]

401 - Unauthorized

User B MIT.EDUMIT.EDU

Registrar

REGISTER: (add credentials)

MIT.EDUMIT.EDU

Location

sip:[email protected]

Contact 18.10.0.79

Page 17: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 17np160

SIP REGISTERREGISTER sip:mit.edu SIP/2.0From: "Dennis Baron"<sip:[email protected]>;tag=4561c4561To: "Dennis Baron"<sip:[email protected]>;tag=324591026Call-Id: 9ce902bd23b070ae0108b225b94ac7faCseq: 5 REGISTERContact: "Dennis Baron"<sip:[email protected];LINEID=05523f7a97b54dfa3f0c0e3746d73a24>Expires: 3600Date: Thu, 30 Sep 2004 00:46:53 GMTAccept-Language: enSupported: sip-cc, sip-cc-01, timer, replacesUser-Agent: Pingtel/2.1.11 (WinNT)Content-Length: 0Via: SIP/2.0/UDP 18.10.0.79

Page 18: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 18np160

SIP REGISTER – 401 ResponseSIP/2.0 401 UnauthorizedFrom: "Dennis Baron"<sip:[email protected]>;tag=4561c4561To: "Dennis Baron"<sip:[email protected]>;tag=324591026Call-Id: 9ce902bd23b070ae0108b225b94ac7faCseq: 5 REGISTERVia: SIP/2.0/UDP 18.10.0.79Www-Authenticate: Digest realm="mit.edu",

nonce="f83234924b8ae841b9b0ae8a92dcf0b71096505216", opaque="reg:change4"Date: Thu, 30 Sep 2004 00:46:56 GMTAllow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, REGISTER, NOTIFY, SUBSCRIBE, INFOUser-Agent: Pingtel/2.2.0 (Linux)Accept-Language: enSupported: sip-cc-01, timerContent-Length: 0

Page 19: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 19np160

SIP REGISTER with CredentialsREGISTER sip:mit.edu SIP/2.0From: "Dennis Baron"<sip:[email protected]>;tag=4561c4561To: "Dennis Baron"<sip:[email protected]>;tag=324591026Call-Id: 9ce902bd23b070ae0108b225b94ac7faCseq: 6 REGISTERContact: "Dennis Baron"<sip:[email protected];LINEID=05523f7a97b54dfa3f0c0e3746d73a24>Expires: 3600Date: Thu, 30 Sep 2004 00:46:53 GMTAccept-Language: enSupported: sip-cc, sip-cc-01, timer, replacesUser-Agent: Pingtel/2.1.11 (WinNT)Content-Length: 0Authorization: DIGEST USERNAME=“[email protected]", REALM="mit.edu",

NONCE="f83234924b8ae841b9b0ae8a92dcf0b71096505216", URI="sip:mit.edu", RESPONSE="ae064221a50668eaad1ff2741fa8df7d", OPAQUE="reg:change4"

Via: SIP/2.0/UDP 18.10.0.79

Page 20: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 20np160

SIP Flows – Via Proxy

INVITE: sip:[email protected]“Calls” [email protected]

INVITE:sip:[email protected]

100 - Trying

180 - Ringing

Rings180 - Ringing

200 - OK Answers200 - OK

ACK

BYEHangs up

200 - OK

User A

User BMIT.EDUMIT.EDU

Proxy

Talking TalkingRTP

Page 21: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 21np160

SIP Flows – Via Gateway

INVITE: sip:[email protected]“Calls” [email protected]

INVITE: sip:[email protected]

100 - Trying

ACKACK

User A MIT.EDUMIT.EDU

Proxy38400

Gateway

180 - Ringing

180 - Ringing

Rings

200 - OK200 - OK

Answers

BYEHangs upBYE

200 - OK

200 - OK

Talking TalkingRTP

Page 22: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 22np160

SIP INVITE with Record-RouteINVITE sip:[email protected] SIP/2.0Record-Route: <sip:18.7.21.118:5080;lr;a;t=2c41;s=b07e28aa8f94660e8545313a44b9ed50>From: \"Dennis Baron\"<sip:[email protected]>;tag=2c41To: sip:[email protected]: [email protected]: 1 INVITEContact: \"Dennis Baron\"<sip:[email protected]>Content-Type: application/sdpContent-Length: 304Accept-Language: enAllow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, REGISTER, SUBSCRIBESupported: sip-cc, sip-cc-01, timer, replacesUser-Agent: Pingtel/2.1.11 (WinNT)Date: Thu, 30 Sep 2004 00:44:30 GMTVia: SIP/2.0/UDP 18.7.21.118:5080;branch=z9hG4bK2cf12c563cec06fd1849ff799d069cc0Via: SIP/2.0/UDP 18.7.21.118;branch=z9hG4bKd26e44dfdc2567170d9d32a143a7f4d8Via: SIP/2.0/UDP 18.10.0.79Max-Forwards: 17

Page 23: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 23np160

SIP Standards

Just a sampling of IETF standards work…

IETF RFCs http://ietf.org/rfc.html

• RFC3261 Core SIP specification – obsoletes RFC2543

• RFC2327 SDP – Session Description Protocol

• RFC1889 RTP - Real-time Transport Protocol

• RFC2326 RTSP - Real-Time Streaming Protocol

• RFC3262 SIP PRACK method – reliability for 1XX messages

• RFC3263 Locating SIP servers – SRV and NAPTR

• RFC3264 Offer/answer model for SDP use with SIP

Page 24: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 24np160

SIP Standards (cont.)

• RFC3265 SIP event notification – SUBSCRIBE and NOTIFY

• RFC3266 IPv6 support in SDP

• RFC3311 SIP UPDATE method – eg. changing media

• RFC3325 Asserted identity in trusted networks

• RFC3361 Locating outbound SIP proxy with DHCP

• RFC3428 SIP extensions for Instant Messaging

• RFC3515 SIP REFER method – eg. call transfer

• RFC4474 Authenticated Identity Management

• SIMPLE IM/Presence - http://ietf.org/ids.by.wg/simple.html

Page 25: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 25np160

IS&T Services

• MITvoip

– Desktop VoIP telephones to replace traditional 5ESS telephones

– New voice mail system

– Web interface for user control

– Transition over 2 to 2.5 years

• Personal SIP accounts

– Bring your own devices/software

– Limited support

Page 26: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 26np160

• “Hard phones”

• “Soft phones”

Soft and Hard SIP Clients

Page 27: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 27np160

Asterisk• Open source phone system

• Runs on Linux, Mac OS X, OpenBSD, FreeBSD and Solaris

• Supports SIP (and other VoIP protocols)

– Cisco SCCP, H.323, IAX

• Highly customizable

• Hardware telephone interfaces available

• MIT applications

– Shuttletrack IVR

– Media Lab Owl Project

– SIPB VoIP Scripts?

Page 28: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 28np160

IAP 2008 - VoIP Series• SIP Fundimentals

Dennis Baron Tue Jan 15, 01-02:30pm, 4-149

• Personal SIP Account WorkshopDennis Baron Tue Jan 22, 01-02:30pm, 4-231

• Build, Test, and Deploy VoIP Applications with Asterisk and other Open-Source Applications

Elliot EichenTue Jan 29, 01-02:30pm, 4-231

Page 29: SIP Fundimentals - Information Systems & Technology · 15.01.2008  · What’s SIP • IETF Standard defined by RFC 3261 • “The Session Initiation Protocol (SIP) is an application-layer

Dennis Baron, January 15, 2008Page 29np160

Questions?