• Aucun résultat trouvé

Établissement de session

Dans le document SIP : Protocole d initialisation de session (Page 117-121)

| REGISTER F1 | |<---|

| 200 OK F2 | |--->|

Figure 9 : Exemple d’enregistrement SIP F1 REGISTER de Bob --> Registraire

REGISTER sip:registrar.biloxi.com SIP/2.0

Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7 Max-Forwards: 70

To: Bob <sip:bob@biloxi.com>

From: Bob <sip:bob@biloxi.com>;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER

Contact: <sip:bob@192.0.2.4>

Expires: 7200 Content-Length: 0

L’enregistrement expire après deux heures. Le registraire répond par un 200 OK : F2 200 OK du registraire --> Bob

SIP/2.0 200 OK

Via: SIP/2.0/UDP bobspc.biloxi.com:5060;branch=z9hG4bKnashds7;received=192.0.2.4 To: Bob <sip:bob@biloxi.com>;tag=2493k59kd

From: Bob <sip:bob@biloxi.com>;tag=456248 Call-ID: 843817637684230@998sdasdh09 CSeq: 1826 REGISTER

Contact: <sip:bob@192.0.2.4>

Expires: 7200 Content-Length: 0

24.2 Établissement de session

Cet exemple contient tous les détails de l’établissement de session exemple de la Section 4. Le flux de message est montré dans la Figure 1. Noter que ces flux montrent l’ensemble minimum requis de champs d’en-tête – certains autres champs d’en-tête comme Allow et Supported devraient normalement être présents.

F1 INVITE d’Alice --> mandataire atlanta.com INVITE sip:bob@biloxi.com SIP/2.0

Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 Max-Forwards: 70

To: Bob <sip:bob@biloxi.com>

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 314159 INVITE

Contact: <sip:alice@pc33.atlanta.com>

Content-Type: application/sdp Content-Length: 142

(On ne montre pas le SDP d’Alice)

F2 100 Essai du mandataire atlanta.com --> Alice SIP/2.0 100 Trying

Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8;received=192.0.2.1 To: Bob <sip:bob@biloxi.com>

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 314159 INVITE Content-Length: 0

F3 INVITE du mandataire atlanta.com --> mandataire biloxi.com INVITE sip:bob@biloxi.com SIP/2.0

Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1 Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8;received=192.0.2.1 Max-Forwards: 69

To: Bob <sip:bob@biloxi.com>

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 314159 INVITE

Contact: <sip:alice@pc33.atlanta.com>

Content-Type: application/sdp Content-Length: 142

(On ne montre pas le SDP d’Alice)

F4 100 Essai du mandataire biloxi.com --> mandataire atlanta.com SIP/2.0 100 Trying

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.com>

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 314159 INVITE Content-Length: 0

F5 INVITE du mandataire biloxi.com --> Bob INVITE sip:bob@192.0.2.4 SIP/2.0

Via: SIP/2.0/UDP server10.biloxi.com;branch=z9hG4bK4b43c2ff8.1

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

Max-Forwards: 68

To: Bob <sip:bob@biloxi.com>

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 314159 INVITE

Contact: <sip:alice@pc33.atlanta.com>

Content-Type: application/sdp Content-Length: 142

(On ne montre pas le SDP d’Alice)

F6 180 Sonnerie de Bob --> mandataire biloxi.com SIP/2.0 180 Sonnerie

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.com>;tag=a6c85cf

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

Contact: <sip:bob@192.0.2.4>

CSeq: 314159 INVITE Content-Length: 0

F7 180 Sonnerie de biloxi.com --> mandataire atlanta.com SIP/2.0 180 Sonnerie

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.com>;tag=a6c85cf

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

Contact: <sip:bob@192.0.2.4>

CSeq: 314159 INVITE Content-Length: 0

F8 180 Sonnerie du mandataire atlanta.com --> Alice SIP/2.0 180 Sonnerie

Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8;received=192.0.2.1 To: Bob <sip:bob@biloxi.com>;tag=a6c85cf

From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

Contact: <sip:bob@192.0.2.4>

CSeq: 314159 INVITE Content-Length: 0

F9 200 OK de Bob --> mandataire biloxi.com 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.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

(On ne montre pas le SDP de Bob)

F10 200 OK du mandatairebiloxi.com --> mandataire atlanta.com SIP/2.0 200 OK

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.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

(On ne montre pas le SDP de Bob)

F11 200 OK du mandataire atlanta.com --> Alice SIP/2.0 200 OK

Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8 ;received=192.0.2.1 To: Bob <sip:bob@biloxi.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

(On ne montre pas le SDP de Bob) F12 ACK d’Alice --> Bob

ACK sip:bob@192.0.2.4 SIP/2.0

Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds9 Max-Forwards: 70

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

La session entre Alice et Bob est maintenant établie.

Bob raccroche le premier. Noter que le téléphone SIP de Bob maintient son propre espace de numérotation CSeq, qui, dans cet exemple, commence par 231. Comme Bob fait la demande, les URI To et From et les étiquettes ont été sautés.

F13 BYE de Bob --> Alice

BYE sip:alice@pc33.atlanta.com SIP/2.0

Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10 Max-Forwards: 70

From: Bob <sip:bob@biloxi.com>;tag=a6c85cf To: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 231 BYE Content-Length: 0 F14 200 OK d’Alice --> Bob

SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.0.2.4;branch=z9hG4bKnashds10 From: Bob <sip:bob@biloxi.com>;tag=a6c85cf To: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710

CSeq: 231 BYE Content-Length: 0

Le document des flux d’appel SIP [40] contient d’autres exemples de messages SIP.

25 BNF augmenté pour le protocole SIP

Tous les mécanismes spécifiés dans ce document sont décrits à la fois en prose et en forme Backus-Naur augmentée (BNF) définie dans la RFC 2234 [10]. Le paragraphe 6.1 de la RFC 2234 définit un ensemble de règles centrales qui sont utilisées par cette spécification, et ne sont pas répétées ici. Les mises en œuvre ont besoin d’être familiarisées avec la notation et le contenu de la RFC 2234 afin de comprendre la présente spécification. Certaines règles de base sont en majuscules , telles que SP, LWS, HTAB, CRLF, DIGIT, ALPHA, etc. Des crochets angulaires sont utilisés dans les définitions pour clarifier l’utilisation des noms de règles.

L’utilisation des crochets carrés est syntaxiquement redondante. Elle est utilisée comme conseil sémantique pour

indiquer que l’utilisation du paramètre spécifique est facultative.

Dans le document SIP : Protocole d initialisation de session (Page 117-121)