You are on page 1of 22

SIP Tutorial

Presentation Of Session Initiation Protocol

Daniel-Constantin Mierla
openser.org daniel.mierla@voice-system.ro

Tutorial Overview

SIP history and architecture SIP functionality SIP and Voice over IP Service creation over SIP SIP Security Present and Future of SIP

October 2005

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

SIP History

1980s first packet multimedia experime ts 199! first I"T# audiocast 199$ first SIP related I"T# drafts

Sessio I vitatio Protocol Simple %o fere ce I vitatio Protocol &&'SI% I"T# ()

1999 *#% !+,!00! *#% -!$1 Today . over -0 I"T# *#%s related to SIP/ ma y I ter et 0rafts a d (orki 1 )roups
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue !

SIP Purpose

2pplicatio .layer si1 ali 1 protocol "asy to u dersta d %reatio / modificatio a d termi atio of multimedia commu icatio sessio s 3e1otiatio of sessio 4s parameters *e. e1otiatio duri 1 commu icatio sessio 'ser mo5ility 25ility to allow suppleme tary services "xte si5ility
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue "

SIP 2 d 6oIP 2rc7itecture

AUDIO VIDEO

Session Control SDP SIP TCP TLS SCTP IP

RTP RTCP UDP

October 2005

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

6oIP Protocols

trans$ort $rotocols

T%P Tra smissio %o trol Protocol '0P 'ser 0ata1ram Protocol S%TP Stream %o trol Tra smissio Protocol T8S Tra sport 8ayer Security Protocol *TP *eal.time Tra sport Protocol 9*#%1889: *T%P *eal.time %o trol Protocol 9*#%-$0+: S*TP Secure *eal.time Tra sport Protocol 9*#%-;11: $rotocol SIP Sessio I itiatio Protocol 9*#%-!$1: S0P Sessio 0escriptio Protocol 9*#%!-!;:
Daniel-Constantin Mierla, The Future of VoIP, The Ha ue #

%e&ia trans$ort an& control $rotocols


si nalin

session ne otiation

October 2005

SIP 0esi1

Text 5ased protocol i a format similar to HTTP %lie t.server commu icatio Tra sactio orie ted< re=uest.respo se se=ue ces I depe de t of tra sport layer protocol *e=uest mea i 1 is specified 5y met7od type Sessio capa5ility e1otiatio 2llow alp7a. umeric addresses i '*I format 9email.like address: as well as ">1$, um5ers 'se of domai ames to locate servers PST3 um5er tra slatio via "3'&

October 2005

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

'

SIP " tities

User Agent (UA)


User Agent Client (UAC) initiates a SIP request User Agent Server (UAS) handles and eventually sends a response to a request

Proxy server routing of SIP requests Registrar server registration of user's contact addresses Location server providing of user location details Redirect server return callee's addresses to caller Application server providing advanced services for users
October 2005 (

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

SIP 0eployme t 2rc7itecture


PSTN

SIP Location Registrar Ser#er Server Server Redirect Proxy Server Server App Server
IP LIN% UA UA UA

G te! "

G te! "

GSM UMTS IP (H.323)

G te! " SIP Net!or$

(phone)
October 2005

(PC)

(media server)

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

SIP *e=uest Sy tax


Start line
INVITE si&'(ser)si&ser#er.*o+ SIP,2.Vi ' SIP,2.-,UDP .-..-..-..-'/-01ro+' 2Me2 3si&'+e)si&ser#er.or456t 47 To' 2User2 3si&'(ser)si&ser#er.or45 C ll8ID' 9).-..-..-..CSe:' . INVITE Cont *t' 3si&'.-..-..-..-'/-0-5 User8A4ent' SIPTele&;one Content8T"&e' &&li* tion,s9& Content8Len4t;' 2/.
#7o7 (9io. - - IN IP< .-..-..-..s7session *7IN IP< .-..-..-..+7 (9io /<=<2 RTP,AVP < 3 7rt&+ &'< G=23,>--7rt&+ &'3 GSM,>--Daniel-Constantin Mierla, The Future of VoIP, The Ha ue *0

Message headers

Message body

October 2005

SIP *eply Sy tax


Start line
SIP,2.- 2-- O% Vi ' SIP,2.-,UDP .-..-..-..-'/-01ro+' 2Me2 3si&'+e)si&ser#er.or456t 47 To' 2User2 3si&'(ser)si&ser#er.or456t 47?C ll8ID' 9).-..-..-..CSe:' . INVITE Cont *t' 3si&'.-..-..-.2-'/-0-5 User8A4ent' SIPSo@tP;one Content8T"&e' &&li* tion,s9& Content8Len4t;' .23
#7o7 (9io2 - - IN IP< .-..-..-.2s7session *7IN IP< .-..-..-.2+7 (9io 02-<3 RTP,AVP - <

Message headers

Message body

October 2005

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

**

SIP Tra sactio


Re:(est +et;o9s: A - INVI ! - CANC!L Create Re:(est Transaction - AC" - #$! - R!%IS !R Pro#ision l res&onses - &&& Res&onse *l sses: - provisiona' - Stat(s code )**-)++ 1in l res&onse - ,ina' Destroy Transaction - S(ccess,(' (-**--++) - Redirection (.**-.++) - Re/(est ,ai'(re (0**-0++) - Server ,ai'(re (1**-1++) - %'o2a' ,ai'(res (3**-3++)
October 2005

A
Create Transaction

Destroy Transaction

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

*2

SIP 0ialo1
- (ni/(e dia'og identi,iers - 2oth parties maintain dia'og state Initi te 9i lo4

A
Create Dialog

Est ?lis; 9i lo4

A Cre te U&9 te U&9 te Destro"


Create Dialog

Update/Modify Dialog

Update/Modify Dialog -

Destroy Dialog
October 2005

Destroy Dialog

dia'og state changed on'y 4hen transaction s(cceed

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

*!

SIP &edia Sessio


A
Early Dialog

A INVITE .-- Tr"in4 .>- Rin4in4 2-- O%


Initiate Dialog Start Media Waiting For UAC Decision

Establish Dialog Start Media Media Session

AC%
Establish Dialog

MEDIA STREAMS ABE

Media Session Stop Media Destroy Dialog

Stop Media Destroy Dialog

2-- O%

October 2005

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

*"

SIP *e1istratio
SIP Re4istr r REGISTER (*ont *t 99ress)
Re !ire !ser"s a!thentication

- registration via R!%IS !R re/(est - third party registration s(pport - m('tip'e contact addresses - re,reshing contact address - (ser a(thentication is recommended - Registrar server 4or5s together 4ith Location server

<-. ( (t;enti* tion re:) REGISTER (*ont *t 99ress) (*re9enti ls)

A!thenticate !ser Sa#e contact address

2-- O% (*ont *t 99resses)


October 2005

Confir$ registration

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

*5

SIP *edirectio
A .-- Tr"in4 3-2 Mo#e9 Te+&r r" Cont *t' so&'A)si&ser#er.or4 AC% INVITE si&'A)si&ser#er.or4 .-- Tr"in4 2-- O% AC% MEDIA STREAMS
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue *#

Re9ire*t Ser#er INVITE si&'A)si&ser#er.net

6ser Location Loo5(p


- A contacts the SIP server 4hich acts as a Redirect server - the Redirect servers sends 2ac5 to A the contact address o, # - A sends the re/(est direct'y to # - media streams are exchanged direct'y 2et4een A and #

SIP Proxyi 1
6ser Location - A contacts the SIP ProC" server 4hich acts as a Loo5(p A Ser#er Proxy server INVITE - the Proxy servers sends si&'A)si&ser#er.net A the INVI ! to the .-- Tr"in4 contact address o, # INVITE si&'A)si&ser#er.or4 - A sends the AC" re/(est direct'y to # .-- Tr"in4 - media streams are 2-- O% 2-- O% exchanged direct'y 2et4een A and #
AC%

MEDIA STREAMS
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue *'

SIP 2 d 32T Traversal


importa t issue i t7e early sta1e of 6oIP SIP clie ts ca ot 1o alo e t7rou17 symmetric 32Ts 9very commo < 8i ux?ipta5les: clie t.side solutio ST'3 . Simple Traversal of 'ser 0ata1ram Protocol 9'0P: T7rou17 3etwork 2ddress Tra slators 932Ts: 9*#%-,89: server.side solutio T'*3 Traversal 'si 1 *elay 32T 9I"T# draft: com5i ed solutio I%" I teractive %o
October 2005

ectivity "sta5lis7me t
*(

Daniel-Constantin Mierla, The Future of VoIP, The Ha ue

SIP Security

e sure privacy/ service protectio / proper accou ti 1 a d 5illi 1 HTTP di1est aut7e ticatio sc7ema c7alle 1e.respo se arc7itecture 5asic aut7e ticatio deprecated T8S for SIP e tity ide tificatio a d traffic e cryptio IPSe= secure c7a els 5etwee SIP servers S?&I&" exte sio s for e d.to.e d e cryptio
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue *)

Services o top of SIP

voice co versatio s adva ced call features< call redirect/ call forwardi 1/ call 5ari 1/ 5lack?w7ite lists easy to ma a1e a d use caller4s prefere ces a d callee4s capa5ilities parallel a d serial searc7 of users audio co fere ces/ video a d i sta t messa1i 1 sessio s/ 1ami 1 prese ce a d service locatio system provisio i 1 exte si5le a d pro1ramma5le e viro me t
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue 20

Prese t 2 d #uture Of SIP

0eployed all over t7e world "urope< 0eutsc7e Telekom/ @T/ Tiscali/ 2rcor/ Sip)ate/ Telio/ 6oAtelecom >>> 'S2< "art7li k/ 2O8/ #ree(orld0ialup/ SipP7o e/ 6o a1e >>> *eplaceme t for H>-!- a d adopted as si1 ali 1 protocol i -)PP %o ti uous exte sio developme t wit7i I"T# (idest used protocol 5y ewest ITSP 0evices a d applicatio s from most famous providers< %IS%O/ 2vaya/ &icrosoft a d very 1ood represe tatio i Ope Source world
October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue 2*

*efere ces

SIP< *#%-!$1 . 7ttp<??www>ietf>or1?rfc?rfc-!$1>txt SIP< *#%-!$- . 7ttp<??www>ietf>or1?rfc?rfc-!$->txt S0P< *#%!--; . 7ttp<??www>ietf>or1?rfc?rfc!-!;>txt *TP< *#%1889 . 7ttp<??www>ietf>or1?rfc?rfc1889>txt *T%P< *#%-$0+ . 7ttp<??www>ietf>or1?rfc?rfc-$0+>txt ST'3< *#%-,89 . 7ttp<??www>ietf>or1?rfc?rfc-,89>txt I"T# . 7ttp<??www>ietf>or1 -)PP . 7ttp<??www>-1pp>or1

B #urt7er details< B da iel>mierlaCvoice.system>ro


October 2005 Daniel-Constantin Mierla, The Future of VoIP, The Ha ue 22

You might also like