Documente Academic
Documente Profesional
Documente Cultură
Z. Mammeri
1. Introduction
Concept de session
1
1. Introduction
Concept de session
Protocoles de session
Approche OSI Couche Session
Approche IETF Protocole SIP (de niveau Application)
Approche ITU Protocole H.323 (de niveau Application)
1. Introduction
SIP en bref
SIP : Session Initiation Protocol
Protocole phare pour la gestion de session dans le monde Internet
P
Pour IInternet,
t t SIP estt un protocole
t l de
d niveau
i A li ti
Application
RFC consacrs SIP
- Premier RFC sur SIP : RFC 2543 Mars 1999
- Version actuelle : RFC 3261 (juin 2002) 269 pages plusieurs fois tendue
- En Mars 2009 : 82 RFC contiennent SIP dans leur titre (prise en compte de la
scurit, diversit des flux multimdia, diversit des rseaux et protocoles de
transport
2
1. Introduction
SIP en bref
SCTP DCCP
STCP : Stream Control Transmission Protocol DCCP : Datagram Congestion Control Protocol
RTSP : Real Time Streaming Protocol RTCP : Real time Transport Control Protocol
1. Introduction
SIP en bref
En gnral, lobjectif de SIP est de rendre plus facile (transparent) le
dploiement dapplications multimdia via IP. Atteindre le ALL-over-IP
Applications actuelles de SIP
- Flux continus
* Tlconfrence
* Tlphonie
* Distribution de contenu multimdia (streaming)
- Flux vnementiels
* Messagerie instantane
* Prsence (ex. contrle dclairage ou dintrusion dans les habitations) : quand
llvnement
vnement arrive
arrive, on avertit llusager
usager abonn lvnement
l vnement
Les messages SIP sont transports par un protocole de transport (TCP, RTP,
UDP)
SIP est largement inspir de HTTP (mode requte-rponse)
3
1. Introduction
SIP en bref
Localisation de lappel
l appel : dtermination de lendroit
l endroit o se trouve lappel
l appel
Etablissement de lappel
l appel (Call setup) : sonnerie
sonnerie , mise en
correspondance des deux interlocuteurs
1. Introduction
SIP en bref
4
1. Introduction
SIP en bref
Codage de mdia
Utilisation dun codec
Codecs usuels : G.711, G.723.1, G.729, AMR
Transport de mdia
Utilisation dun protocole de transport (UDP, TCP, SCTP, DCCP, RTP)
RTP est le protocole gnralement associ SIP pour les flux multimdia
RTP est fond sur lestampillage de messages et le rejet de messages
tardifs
Pr_j456@yahoo.fr
Pierre.jacques@ups-tlse.fr
ups-tlse.fr
Pierre.jacques@irit.fr
Pierre jacques@irit fr
712@irit.fr
irit.fr
0561111111 0662222222
5
2. Entits SIP et leurs interactions
SIP en mode pair pair (sans intermdiaire SIP)
irit.fr inria.fr
1 2
Pascal.robert@inria.fr
INVITE
Pierre.jacques@Irit.fr
Pascal.robert@inria.fr
200 OK
200 OK
3
ACK pascal.robert@inria.fr
5 Flux multimdia
irit.fr inria.fr
1 2
dupont@inria.fr
INVITE Dupont@inria.fr
3
200 OK
Pierre.jacques@Irit.fr 4
ACK dupont@inria
labri.fr
5 Flux multimdia
1 2
martin@labri.ffr
INVITE martin@labri.fr
3
200 OK
4
ACK martin@labri.fr
6
2. Entits SIP et leurs interactions
SIP avec proxy
inria.fr
Location
server
pr@dep.inria.fr
1 2 4 5
pr@PC_y
irit.fr INVITE
robert
INVITE pr@dep.inria.fr
Pascal.robert@inria.fr
200 OK
Pierre.jacques@Irit.fr 200 OK 6
7
Proxy
8 ACK pr@dep.inria.fr
9 Flux multimdia
server
Pascal.robert@inria.fr Pascal.robert
Pierre.jacques@Irit.fr
Redirect
4
server
302 Moved temporarily Pas_Rob@lip6.fr
Contact: pas_rob@lip6.fr 3
5
ACK pascal.robert@inria.fr
INVITE pas_rob@lip6.fr
6
200 OK 7
8 ACK pas_rob@lip6.fr
lip6.fr
Flux multimdia 9
7
2. Entits SIP et leurs interactions
Entits de SIP
SIP : bas sur le modle Client/serveur (comme HTTP)
Entits SIP
Agent Client (appel UAC : user agent client) : entit,
entit qui se trouve sur
tout quipement, ayant pour rle denvoyer les requtes et recevoir
les rponses
Agent Serveur (appel aussi UAS : user agent server) : entit, qui se
trouve sur tout quipement SIP, ayant pour rle de gnrer et
denvoyer les rponses
Serveur proxy
Serveur de redirection
Registre et Service de localisation
Passerelles SIP vers des rseaux non-conformes SIP
Les serveurs sont des fonctions (appareils logiques) qui peuvent tre
dployes ou non sur des appareils physiques distincts.
8
2. Entits SIP et leurs interactions
Entits de SIP
9
2. Entits SIP et leurs interactions
Exemple 2 Etablissement dappel (avec chec)
Inutile si le
pro
proxy
connat
l@IP de Bob
10
2. Entits SIP et leurs interactions
Exemple 3 Prsence (2 Enregistrement et notification )
Bob devient
de ient joignable
joignable.
Il senregistre auprs
de son proxy.
Le proxy met jour la
base de donnes.
Le proxy joue aussi
le rle de REGISTRE
Le proxy notifie
Alice que Bob est
maintenant joignable.
v=
o= Description de mdias avec
c= le protocole SDP Corps
... de message
11
3. Requtes et rponses SIP
Requtes (mthodes) SIP
INVITE : demande dtablissement de session entre agents utilisateurs
ACK : confirmation de lchange prcdent
BYE : terminaison de session
CANCEL : annulation de requte pendante sans mettre fin la session
OPTIONS : demande dinformations sur le profil (capacits) de lappel,
sans initialisation de session
REGISTER : demande dun agent utilisateur pour enregistrer son adresse
IP et URL courantes pour recevoir les appels.
Une requte SIP est spcifie sur une ligne selon la forme suivante :
<Mthode> <URI> <SP> <SIP-Version> <retourChariot>
<Mthode> ::= INVITE | ACK | BYE | CANCEL | OPTIONS | REGISTER
Exemple :
INVITE sip:picard@societe.com SIP/2.0
Une rponse SIP est spcifie sur une ligne selon la forme suivante :
<SIP-Version> <SP status-code> <SP reason> <Carriage return>
Exemple :
SIP/2.0 404 Not Found // le premier (4) caractre du code indique la classe de rponse
12
3. Requtes et rponses SIP
Codes Rponses SIP
13
3. Requtes et rponses SIP
Exemples dentte de message SIP
INVITE sip:picard@societe1.com SIP/2.0
Via: SIP/2.0/UDP host.societe2.com:5060
From: Pierre Jules <sip:pierre.jules@societe2.com>
To: Jean Luc Picard <sip:picard@societe1.com>
Call-ID: 314159@host.societe1.com
CSeq: 1 INVITE
14
3. Requtes et rponses SIP
Protocole SDP (RFC 4566)
15
3. Requtes et rponses SIP
Protocole SDP
Bande passante propose pour supporter la session : b*=
Aspects temporels : on spcifie une liste dlments
I t t (en
Instants ( sec depuis
d i 1900) d de db
dbutt ett fifin d i : t=
de session t
Rptition de la session : r*=
Ajustements dhoraires en cas de fuseaux horaires multiples : z*=
Cl de cryptage : k*=
Autres attributs de session : a*=
Description dun ou plusieurs mdias avec les lments suivants :
Nom du mdia et adresse de transport : m=
m=
Type de media (texte, audio, vido, message)
Port de communication pour la session
Protocole de transport (RTP/AVP, RTP/SAVP, UDP)
Format de media :
Titre du mdia : i*=
v=0
o=robert 2890844526 2890842807 IN IP4 10.47.16.5
s= Film SDP
i= Principaux concepts pour comprendre le protocole SIP
u=http://www.societe.com/cours/sdp.pdf
e=jean.pierre@societe.com (Jean Pierre)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
m=audio 49170 RTP/AVP 0 Deux
m=video 51372 RTP/AVP 99 mdias
16
3. Requtes et rponses SIP
Exemples de messages SIP avec entte et corps
Message de requte Message de rponse
v 0
v=0 v 0
v=0
o= ... o= ...
c= IN IP4 x.a.com c= IN IP4 x.a.com
m= audio 3456 RTP m= audio 3456 RTP
m=video 4000 RTP m=video 0 RTP
4. Conclusion
Nouveaux marchs pour la tlphonie
Beaucoup de fabricants dquipements de tlphonie Tlphoner via
proposent des appareils compatibles SIP (i.e. SIP est Internet
intgr dans les appareils) : Nokia, Samsung
17
4. Conclusion
Terminaux SIP
INVITE F1
INVITE F2
100 Trying F3 INVITE F4
100 Trying F5
180 Ringing F6
180 Ringing F7
180 Ringing F8
200 OK F9
200 OK F10
200 OK F11
ACK F12
Media
Bye F13
200 OK F14
18
5. Exemple long (tir du RFC 3262)
F3 INVITE atlanta.com proxy -> biloxi.com proxy
F1 INVITE Alice -> atlanta.com proxy INVITE sip:bob@biloxi.com SIP/2.0
INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 branch=z9hG4bK77ef4c2312983.1
Max-Forwards: 70 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
To: Bob <sip:bob@biloxi.com> ;received=192.0.2.1
From: Alice <sip:alice@atlanta.com>;tag=1928301774 Max-Forwards: 69
Call-ID: a84b4c76e66710 To: Bob <sip:bob@biloxi.com>
CSeq: 314159 INVITE From: Alice <sip:alice@atlanta.com>;tag=1928301774
Contact: <sip:alice@pc33.atlanta.com> Call-ID: a84b4c76e66710
Content-Type: application/sdp CSeq: 314159 INVITE
Content-Length: 142 Contact: <sip:alice@pc33.atlanta.com>
(Alice's SDP not shown) Content-Type: application/sdp
Content-Length: 142
F2 100 Trying atlanta.com proxy -> Alice (Alice's SDP not shown)
SIP/2.0 100 Trying
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 F4 100 Trying biloxi.com proxy -> atlanta.com proxy
;received=192.0.2.1 SIP/2.0 100 Trying
To: Bob <sip:bob@biloxi.com> Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;
From: Alice <sip:alice@atlanta.com>;tag=1928301774 branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2
Call-ID: a84b4c76e66710 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8
CSeq: 314159 INVITE ;received=192.0.2.1
Content-Length: 0 To: Bob <sip:bob@biloxi.com>
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Content-Length: 0
19
5. Exemple long (tir du RFC 3262)
F9 200 OK Bob -> biloxi.com proxy
SIP/2.0 200 OK
Via: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bK4b43c2ff8.1 ;received=192.0.2.3
Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 ;received=192.0.2.2
Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1
To: Bob <sip:bob@biloxi
<sip:bob@biloxi.com>;tag=a6c85cf
com>;tag=a6c85cf
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 INVITE
Contact: <sip:bob@192.0.2.4>
Content-Type: application/sdp
Content-Length: 131
(Bob's SDP not shown)
F11 200 OK atlanta.com proxy -> Alice F13 BYE Bob -> Alice
SIP/2.0 200 OK BYE sip:alice@pc33.atlanta.com SIP/2.0
Via: SIP/2.0/UDP pc33.atlanta.com; Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10
branch=z9hG4bKnashds8 ;received=192.0.2.1 Max-Forwards: 70
To: Bob <sip:bob@biloxi.com>;tag=a6c85cf From: Bob <sip:bob@biloxi.com>;tag=a6c85cf
p @ ; g
From: Alice <sip:alice@atlanta.com>;tag=1928301774 To: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710 Call-ID: a84b4c76e66710
CSeq: 314159 INVITE CSeq: 231 BYE
Contact: <sip:bob@192.0.2.4> Content-Length: 0
Content-Type: application/sdp
Content-Length: 131 F14 200 OK Alice -> Bob
(Bob's SDP not shown) SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.0.2.4; branch=z9hG4bKnashds10
F12 ACK Alice -> Bob From: Bob <sip:bob@biloxi.com>;tag=a6c85cf
ACK sip:bob@192.0.2.4 SIP/2.0 To: Alice <sip:alice@atlanta.com>;tag=1928301774
Via: SIP/2.0/UDP Call-ID: a84b4c76e66710
pc33 atlanta com;branch=z9hG4bKnashds9
pc33.atlanta.com;branch=z9hG4bKnashds9 CSeq: 231 BYE
Max-Forwards: 70 Content-Length: 0
To: Bob <sip:bob@biloxi.com>;tag=a6c85cf
From: Alice <sip:alice@atlanta.com>;tag=1928301774
Call-ID: a84b4c76e66710
CSeq: 314159 ACK
Content-Length: 0
20