sip - the basics

18
@borjessonjonas About SIP SIP The Basics Jonas Borjesson

Upload: jonas-borjesson

Post on 28-Nov-2014

1.527 views

Category:

Documents


5 download

DESCRIPTION

If you don't know what SIP is, what it is used for or why you should even care then this is the section for you. This presentation will go over the very basics of SIP and assumes no previous knowledge of SIP or really any other network experience either. Topics it will touch upon is: - What SIP is all about - SIP and sessions management - Basic call flow - Brief discussion of SIP messages - SIP and audio

TRANSCRIPT

Page 1: SIP - The Basics

@borjessonjonas

About SIP

SIPThe Basics

Jonas Borjesson

Page 2: SIP - The Basics

@borjessonjonas

NOTE

● This version has been adapted to be viewed without transitions.

● Go to aboutsip.com to download the original version.

● Also be sure to check out vimeo.com/aboutsip for any recorded presentations.

Page 3: SIP - The Basics

@borjessonjonas

This is SIP!

Page 4: SIP - The Basics

@borjessonjonas

GamingVoice Video

Chat Presence

Whatever

SIP is about communication!

Page 5: SIP - The Basics

@borjessonjonas

SIP is about sessions● A session represents a p2p relationship

between two SIP endpoints.● SIP helps you:

● Setup sessions.● Negotiate what you want to do with the session● Tear down sessions

● Session can be anything● Voice/video/gaming/your own whatever● SIP only helps you establish and manage the

session, you decide what to do!

Page 6: SIP - The Basics

@borjessonjonas

SIP is about finding your friends

● Before you can “call” your friends (establish a session), you must find them!

● No magic though... you need to tell someone where you are...

Went to get a

coffee

/Bob

Page 7: SIP - The Basics

@borjessonjonas

No Magic

! Tell my friends that I [email protected] amonline at Cafe Capuchino

? Hey, have you seen Bob?

! He is over atCafe Capuchino

Hey, I'm coming over, need a coffee too...

aboutsip.com

Page 8: SIP - The Basics

@borjessonjonas

Basic User Scenario

INVITE sip:[email protected] sip:[email protected]

180 Ringing180 Ringing

ACKACK

200 OK200 OK

audio

Proxy

Page 9: SIP - The Basics

@borjessonjonas

SIP Components

● User Agents (UA)● User Agent Client (UAC)● User Agent Server (UAS)

● Servers● Proxy – forwards the request to the next hop● Registrar – accepts registrar requests● Redirect Server – finds alternative locations● Location Service – stores bindings.

(note, all SIP components are logical components and a such one server can act as all of the roles)

Page 10: SIP - The Basics

@borjessonjonas

SIP Messages

● Request/Response model● UAC sends the request, UAS responds

● Requests starts with a request line● INVITE sip:[email protected] SIP/2.0

● Methods● INVITE, ACK, BYE, CANCEL, REGISTER, OPTIONS● And many more...

Page 11: SIP - The Basics

@borjessonjonas

SIP Messages

● SIP responses starts with a status line● SIP/2.0 200 OK

● Response Codes:● 1xx – Provisional.● 2xx – Success.● 3xx – Redirection.● 4xx – Client Error.● 5xx – Server Error.● 6xx - Global Failures.

INVITE

180 Ringing

500 Server Error

Page 12: SIP - The Basics

@borjessonjonas

INVITE Request

INVITE sip:[email protected] SIP/2.0To: <sip:[email protected]>From: <sip:[email protected]>;tag=987lkajsdf89auCall-ID: lkjasdf90989lkjCSeq: 1 INVITEContent-Type: application/sdpContent-Length: 450Record-Route: <sip:192.168.1.52:5060;transport=tcp;lr>Via: SIP/2.0/TCP 192.168.0.122:5060;branch=xxx;rport...Contact: <sip:192.168.0.122:3156;transport=TCP>

Page 13: SIP - The Basics

@borjessonjonas

200 OK Response

SIP/2.0 200 OKTo: <sip:[email protected]>;tag=89uasdkfjoiuFrom: <sip:[email protected]>;tag=987lkajsdf89auCall-ID: lkjasdf90989lkjCSeq: 1 INVITEVia: SIP/2.0/TCP 192.168.0.122:5060;branch=xxx;rport...Contact: <sip:192.168.0.22:3156;transport=TCP>Record-Route: <sip:192.168.1.52:5060;transport=tcp;lr>Content-Type: application/sdpContent-Length: 451

Page 14: SIP - The Basics

@borjessonjonas

SIP Headers● Headers carries important information about

e.g. routing or request and responses.● Similar in syntax and meaning to HTTP● The more important headers:

● To & From● Via● Contact● Call-ID● Route & Record-Route● CSeq

Page 15: SIP - The Basics

@borjessonjonas

Addressing

● SIP-address is used to locate and communicate with other users.● sip:[email protected] ● sips:[email protected]

● Each user typically have an Address of Record (AOR) through which that user can be contacted.

Page 16: SIP - The Basics

@borjessonjonas

What about the actual Audio

● SIP doesn't care about audio● SIP only cares about managing sessions*● Allows any type of sessions to be established,

such as an audio session.

● SDP + RTP = gets audio going● SDP – describes e.g. an audio session● RTP carries the actual audio

Page 17: SIP - The Basics

@borjessonjonas

Summary

● SIP != VoIP● SIP can do VoIP but is so much more● SIP actually doesn't care about audio at all● SIP helps you route messages through the

network.● SIP helps to locate your friends.

Page 18: SIP - The Basics

@borjessonjonas

More presentations and material at aboutsip.com

Thanks!