11. Exemples de flux de messages
La section suivante présente des exemples de flux d'appel et de messages. Les flux et les descriptions sont non normatifs. Notez que, dans ces exemples, tous les INVITE envoyés par un UA du groupe auront pour From l'AOR partagé (sip:[email protected] dans ce cas), et tous les INVITE envoyés au groupe auront pour Request-URI l'AOR partagé. Toute autre requête ne s'appliquerait pas à cette fonctionnalité et serait traitée à l'aide des mécanismes SIP normaux.
Notez que les 12 premiers exemples supposent que l'agent d'apparence connaît les événements d'état de dialogue. L'exemple de la section 11.13 montre le cas où ce n'est pas le cas et, par conséquent, l'agent d'apparence initie un abonnement auprès des utilisateurs de l'AOR partagé. N'importe lequel des autres exemples de flux d'appel aurait pu illustrer ce mode de fonctionnement, car il est tout aussi valide.
11.1. Enregistrement et abonnement
Bob et Alice font partie d'un groupe d'apparence partagée identifié par l'AOR d'apparence partagée sip:[email protected]. Bob s'enregistre (REGISTER) avec le contact sip:[email protected]. Alice s'enregistre avec le contact sip:[email protected].
Les UA d'Alice et de Bob s'abonnent au paquet de dialogue pour l'AOR d'apparence et publient l'état de dialogue auprès de l'agent d'apparence. Les échanges de messages entre le registraire, l'agent d'apparence, Alice et Bob sont présentés ci-dessous. Les exemples de flux d'appel ci-dessous ne montrent pas l'authentification des abonnements, des publications et des notifications. Il convient de noter que, pour des raisons de sécurité, toutes les publications et tous les abonnements doivent être autorisés avant d'être acceptés.
Notez également que les enregistrements et les abonnements doivent tous être rafraîchis par Alice à des intervalles déterminés par les intervalles d'expiration renvoyés par le registraire ou l'agent d'apparence.
Registrar Appearance Agent Alice Bob
| | | |
| | | |
|<--------------------------- REGISTER F1<| |
| | | |
|>F2 200 OK ----------------------------->| |
| | | |
| |<----- SUBSCRIBE F3<| |
| | | |
| |>F4 200 OK -------->| |
| | | |
| |>F5 NOTIFY -------->| |
| | | |
| |<-------- 200 OK F6<| |
| | | |
|<-------------------------------------------- REGISTER F7<|
| | | |
|>F8 200 OK ---------------------------------------------->|
| | | |
| |<---------------------- SUBSCRIBE F9<|
| | | |
| |>F10 200 OK ------------------------>|
| | | |
| |>F11 NOTIFY ------------------------>|
| | | |
| |<------------------------ 200 OK F12<|
| | | |
Figure 1. Exemple d'enregistrement et d'abonnement
F1-F2: Alice enregistre l'AOR avec le contact: <sip:[email protected]>
F1 Alice ----> Registrar
REGISTER sip:registrar.example.com SIP/2.0
Via: SIP/2.0/UDP ua1.example.com;branch=z9hG4bK527b54da8ACC7B09
From: <sip:[email protected]>;tag=CDF9A668-909E2BDD
To: <sip:[email protected]>
CSeq: 2 REGISTER
Call-ID: d3281184-518783de-cc23d6bb
Contact: <sip:[email protected]>
Max-Forwards: 70
Expires: 3600
Content-Length: 0
F2 Registrar ----> Alice
SIP/2.0 200 OK
Via: SIP/2.0/UDP ua1.example.com;branch=z9hG4bK527b54da8ACC7B09
CSeq: 2 REGISTER
Call-ID: d3281184-518783de-cc23d6bb
From: <sip:[email protected]>;tag=CDF9A668-909E2BDD
To: <sip:[email protected]>;tag=1664573879820199
Contact: <sip:[email protected]>;expires=3600
Content-Length: 0
F3 to F6: Alice s'abonne également aux événements associés à l'AOR d'apparence. L'agent d'apparence notifie Alice de l'état.
F3 Alice ----> Appearance Agent
SUBSCRIBE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua1.example.com;branch=z9hG4bKf10fac97E7A76D6A
From: <sip:[email protected]>;tag=925A3CAD-CEBB276E
To: <sip:[email protected]>
CSeq: 91 SUBSCRIBE
Call-ID: ef4704d9-bb68aa0b-474c9d94
Contact: <sip:[email protected]>
Event: dialog;shared
Accept: application/dialog-info+xml
Max-Forwards: 70
Expires: 3700
Content-Length: 0
F4 Appearance Agent ----> Alice
SIP/2.0 200 OK
Via: SIP/2.0/UDP ua1.example.com;branch=z9hG4bKf10fac97E7A76D6A
CSeq: 91 SUBSCRIBE
Call-ID: ef4704d9-bb68aa0b-474c9d94
From: <sip:[email protected]>;tag=925A3CAD-CEBB276E
To: <sip:[email protected]>;tag=1636248422222257
Allow-Events: dialog
Expires: 3700
Contact: <sip:appearanceagent.example.com>
Content-Length: 0
F5 Appearance Agent ----> Alice
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=1636248422222257
To: <sip:[email protected]>;tag=925A3CAD-CEBB276E
Call-ID: ef4704d9-bb68aa0b-474c9d94
CSeq: 232 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com;branch=z9hG4bK1846
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=3000
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="40"
state="full"
entity="sip:[email protected]">
</dialog-info>
F6 Alice ----> Appearance Agent
SIP/2.0 200 OK
Via: SIP/2.0/UDP appearanceagent.example.com;branch=z9hG4bK1846
From: <sip:[email protected]>;tag=1636248422222257
To: <sip:[email protected]>;tag=925A3CAD-CEBB276E
CSeq: 232 NOTIFY
Call-ID: ef4704d9-bb68aa0b-474c9d94
Contact: <sip:[email protected]>
Content-Length: 0
F7 Bob ----> Registrar
REGISTER sip:registrar.example.com SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4b53b54d87B
From: <sip:[email protected]>;tag=34831131
To: <sip:[email protected]>
CSeq: 72 REGISTER
Call-ID: 139490230230249348
Contact: <sip:[email protected]>
Max-Forwards: 70
Expires: 3600
Content-Length: 0
F8 Registrar ----> Bob
SIP/2.0 200 OK
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4b53b54d87B
From: <sip:[email protected]>;tag=34831131
To: <sip:[email protected]>;tag=fkwlwqi1
CSeq: 72 REGISTER
Call-ID: 139490230230249348
Contact: <sip:[email protected]>;expires=3200
Contact: <sip:[email protected]>;expires=3600
Content-Length: 0
11.2. Sélection de l'apparence pour un appel entrant
Dans le flux d'appel ci-dessous, Bob et Alice font partie d'un groupe d'apparence partagée. Carol appelle l'AOR du groupe d'apparence partagée. L'agent d'apparence envoie des NOTIFY à Alice et Bob pour leur indiquer quelle apparence l'appel utilise. Les appareils d'Alice et de Bob sont tous deux alertés de l'appel entrant. Bob répond à l'appel.
Notez qu'il est possible qu'Alice et Bob répondent tous deux à l'appel et envoient des réponses 200 (OK) à Carol. Il appartient à Carol de résoudre cette situation. Généralement, Carol enverra des ACK aux deux 200 OK mais enverra un BYE pour terminer l'un des dialogues. Par conséquent, Alice ou Bob recevra le BYE et publiera que son dialogue est terminé. Toutefois, si Carol répond à la fois à Alice et à Bob et maintient les deux dialogues actifs, l'agent d'apparence devra résoudre la situation en déplaçant le dialogue d'Alice ou de Bob vers une autre apparence.
Tous les messages NOTIFY du flux d'appel ci-dessous transportent des événements de dialogue et seuls les états de dialogue sont mentionnés pour simplifier. Par souci de concision, les détails de certains messages ne sont pas présentés ci-dessous. Notez que l'ordre de F2 - F5 et de F7 - F8 pourrait être inversé.
Forking Appearance
Carol Proxy Agent Alice Bob
| | | | |
|>F1 INVITE >| | | |
| |< - - - - - >| | |
| | |>F2 NOTIFY ----------->|
| | | | |
| | |<F3 200 OK -----------<|
| | | | |
| | |>F4 NOTIFY ->| |
| | | | |
| | |<-200 OK F5-<| |
|<- 100 F6 -<| | | |
| |>F7 INVITE (appearance=1) ---------->|
| | | | |
| |>F8 INVITE (appearance=1) >| |
| | | | |
| |<-------------------- Ringing 180 F9<|
|< 180 F10 -<| | | |
| |<--------- 180 Ringing F11<| |
|< 180 F12 -<| | | |
| | | | |
| |<------------------------ 200 OK F13<|
|< 200 F14 -<| | | |
| | | | |
| |>F15 CANCEL -------------->| |
| | | | |
| |<-------------- 200 OK F16<| |
| | | | |
| |<Request Cancelled 487 F17<| |
| | | | |
| |>F18 ACK ----------------->| |
|>F19 ACK -->| | | |
| |>F20 ACK --------------------------->|
| | | | |
|<=============Both way RTP established===========>|
| | | | |
| |< - - - - - >| | |
| | | | |
| | |>F21 NOTIFY >| |
| | | | |
| | |<- 200 F22 -<| |
| | | | |
| | |>F23 NOTIFY ---------->|
| | | | |
| | |<F24 200 OK ----------<|
| | | |
Figure 2. Exemple de sélection de l'apparence pour un appel entrant
F4 Appearance Agent ----> Alice
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=151702541050937
To: <sip:[email protected]>;tag=18433323-C3D237CE
Call-ID: 1e361d2f-a9f51109-bafe31d4
CSeq: 12 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com;branch=z9hG4bK1403
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=2800
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="13"
state="partial"
entity="sip:[email protected]">
<dialog id="2a7294823093f5274e3fd2ec54a2d76c"
call-id="14-1541707345"
remote-tag="44BAD75D-E3128D42"
direction="recipient">
<sa:appearance>1</sa:appearance>
<state>trying</state>
<remote>
<identity>sip:[email protected]</identity>
</remote>
</dialog>
</dialog-info>
F7 Proxy ----> Bob
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua3.example.com;branch=z9hG4bK4324ea
Via: SIP/2.0/UDP proxy.example.com;branch=z9hG4bK38432ji
From: <sip:[email protected]>;tag=44BAD75D-E3128D42
To: <sip:[email protected]>
CSeq: 106 INVITE
Call-ID: 14-1541707345
Contact: <sip:[email protected]>
Max-Forwards: 69
Alert-Info: <urn:alert:service:normal>;appearance=1
Content-Type: application/sdp
Content-Length: ...
v=0
o=- 1102980499 1102980499 IN IP4 ua3.example.com
s=
c=IN IP4 ua3.example.com
t=0 0
m=audio 2238 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
F21 Appearance Agent ----> Alice
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=151702541050937
To: <sip:[email protected]>;tag=18433323-C3D237CE
Call-ID: 1e361d2f-a9f51109-bafe31d4
CSeq: 13 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com;branch=z9hG4bK4164F03j
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=2500
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="17"
state="partial"
entity="sip:[email protected]">
<dialog id="2a7294823093f5274e3fd2ec54a2d76c"
call-id="14-1541707345"
remote-tag="44BAD75D-E3128D42"
local-tag="7349dsfjkFD03s"
direction="recipient">
<sa:appearance>1</sa:appearance>
<state>confirmed</state>
<local>
<target>sip:[email protected]</target>
</local>
<remote>
<identity>sip:[email protected]</identity>
</remote>
</dialog>
</dialog-info>
11.3. Appel sortant sans saisie d'apparence
Dans ce scénario, l'UA de Bob passe un appel sans avoir d'abord sélectionné/saisi un numéro d'apparence. Après que Bob a envoyé l'INVITE, l'agent d'apparence lui attribue un numéro d'apparence et notifie à la fois Alice et Bob.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | | |
| |<------------------------------------- INVITE F1<|
| | | | |
| |>F2 100 Trying --------------------------------->|
|<-- INVITE F3<| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<-- NOTIFY F4<| |
| | | | |
| | |>F5 200 OK -->| |
| | | |------- NOTIFY F6>|
| | | | |
| | | |<F7 200 OK ------<|
|>F8 180 ---->| | | |
| |>F9 180 Ringing -------------------------------->|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F10<| |
| | | | |
| | |>F11 200 OK ->| |
| | | |------ NOTIFY F12>|
| | | | |
| | | |<F13 200 OK -----<|
|>F14 200 OK ->| | | |
| |>F15 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F16<|
|<---- ACK F17<| | | |
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F18<| |
| | | | |
| | |>F19 200 OK ->| |
| | | |------ NOTIFY F20>|
| | | | |
| | | |<F21 200 OK -----<|
| | | | |
Figure 3. Exemple d'appel sortant sans saisie d'apparence
F1 Bob ----> Proxy
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK98c87c52123A08BF
From: <sip:[email protected]>;tag=15A3DE7C-9283203B
To: <sip:[email protected]>
CSeq: 1 INVITE
Call-ID: f3b3cbd0-a2c5775e-5df9f8d5
Contact: <sip:[email protected]>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 223
v=0
o=- 1102980499 1102980499 IN IP4 ua2.example.com
s=IP SIP UA
c=IN IP4 ua2.example.com
t=0 0
a=sendrecv
m=audio 2236 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
F4 Appearance Agent ----> Alice
NOTIFY sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP appearanceagent.example.com;branch=z9hG4bK81d84f62
From: <sip:[email protected]>;tag=1636248422222257
To: <sip:[email protected]>;tag=925A3CAD-CEBB276E
Call-ID: ef4704d9-bb68aa0b-474c9d94
CSeq: 233 NOTIFY
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=2200
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="27"
state="partial"
entity="sip:[email protected]">
<dialog id="fa02538339df3ce597f9e3e3699e28fc"
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
local-tag="15A3DE7C-9283203B" direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
</dialog>
</dialog-info>
F6 Appearance Agent ----> Bob
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=497585728578386
To: <sip:[email protected]>;tag=633618CF-B9C2EDA4
Call-ID: a7d559db-d6d7dcad-311c9e3a
CSeq: 7 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com
;branch=z9hG4bK1711759878512309
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=2000
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="78"
state="partial"
entity="sip:[email protected]">
<dialog id="02538339hfgdf3ce597f9e3egkl3699e28fc"
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
local-tag="15A3DE7C-9283203B" direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
</dialog>
</dialog-info>
11.4. Appel sortant avec saisie d'apparence
Dans ce scénario, l'UA de Bob envoie un PUBLISH d'événement de dialogue avec l'état (trying) sélectionnant/saisissant un numéro d'apparence avant d'envoyer l'INVITE. Après avoir reçu le 200 (OK) de l'agent d'apparence confirmant le numéro d'apparence, l'UA de Bob envoie l'INVITE à Carol et établit une session. Par souci de concision, les détails de certains messages ne sont pas inclus dans les flux de messages. L'UA de Bob inclut autant d'informations de dialogue de F7 qu'il est possible de déterminer à l'avance. Dans ce cas, au minimum l'URI de Contact est incluse, ce qui permet à l'agent d'apparence de corréler l'INVITE avec le PUBLISH.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | |<----- PUBLISH F1<|
| | | | |
| | | |>F2 200 OK ------>|
| | | | |
| | |<-- NOTIFY F3<| |
| | | | |
| | |>F4 200 OK -->| |
| | | |------- NOTIFY F5>|
| | | | |
| | | |<F6 200 OK ------<|
| | | | |
| |<------------------------------------- INVITE F7<|
| | | | |
| |>F8 100 Trying --------------------------------->|
|<-- INVITE F9<| | | |
| | | |<---- PUBLISH F10<|
| | | | |
| | | |>F11 200 OK ----->|
| | | | |
|>F12 180 --->| | | |
| |>F13 180 Ringing ------------------------------->|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F14<| |
| | | | |
| | |>F15 200 OK ->| |
| | | |------ NOTIFY F16>|
| | | | |
| | | |<F17 200 OK -----<|
|>F18 200 OK ->| | | |
| |>F19 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F20<|
|<---- ACK F21<| | | |
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F22<| |
| | | | |
| | |>F23 200 OK ->| |
| | | |------ NOTIFY F24>|
| | | | |
| | | |<F25 200 OK -----<|
| | | | |
Figure 4. Exemple d'appel sortant avec saisie d'apparence
F1 to F4: Bob utilise l'apparence partagée du Help Desk sur son UA pour passer un appel sortant (par exemple, il décroche). Avant d'envoyer la requête INVITE sortante, Bob publie auprès de l'agent d'apparence pour réserver le numéro d'apparence 1. L'agent d'apparence notifie Alice (et tous les autres UA, y compris Bob) de l'événement en envoyant des NOTIFY.
F1 Bob ----> Appearance Agent
PUBLISH sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK61314d6446383E79
From: <sip:[email protected]>;tag=44150CC6-A7B7919D
To: <sip:[email protected]>
CSeq: 7 PUBLISH
Call-ID: 44fwF144-F12893K38424
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="6"
state="full"
entity="sip:[email protected]">
<dialog id="id3d4f9c83" direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
</dialog>
</dialog-info>
F2 Appearance Agent ----> Bob
SIP/2.0 200 OK
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK61314d6446383E79
From: <sip:[email protected]>;tag=44150CC6-A7B7919D
To: <sip:[email protected]>
CSeq: 7 PUBLISH
Call-ID: 44fwF144-F12893K38424
Contact: <sip:[email protected]>
Event: dialog;shared
SIP-Etag: 482943245
Allow-Events: dialog
Expires: 60
Content-Length: 0
F7 Bob ---> Proxy
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK342122
Max-Forwards: 70
From: <sip:[email protected]>;tag=15A3DE7C-9283203B
To: <sip:[email protected]>
Call-ID: f3b3cbd0-a2c5775e-5df9f8d5
CSeq: 31 INVITE
Contact: <sip:[email protected]>
Content-Type: application/sdp
Content-Length: ...
(SDP non présenté)
F10 Bob ----> Appearance Agent
PUBLISH sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK6d644638E7
From: <sip:[email protected]>;tag=0CCf6-A7FdsB79D
To: <sip:[email protected]>
CSeq: 437 PUBLISH
Call-ID: fwF14d4-F1FFF2F2893K38424
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="6"
state="full"
entity="sip:[email protected]">
<dialog id="id3d4f9c83"
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
local-tag="15A3DE7C-9283203B"
direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
<remote>
<identity uri="sip:[email protected]">
</identity>
</remote>
</dialog>
</dialog-info>
11.5. Appel sortant sans utiliser de numéro d'apparence
Dans ce scénario, l'UA de Bob envoie un PUBLISH d'événement de dialogue avec l'état (trying) indiquant qu'il ne souhaite pas utiliser de numéro d'apparence pour ce dialogue. Le PUBLISH ne contient pas d'élément appearance mais contient le paramètre 'shared' du champ d'en-tête Event. Par conséquent, l'agent d'apparence sait que l'UA ne souhaite pas utiliser de numéro d'apparence pour cet appel. Si l'agent d'apparence ne souhaite pas l'autoriser, il rejetterait le PUBLISH avec une réponse 400 (Bad Request) et l'UA saurait qu'il doit re-PUBLISH en sélectionnant/saisissant un numéro d'apparence.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | |<----- PUBLISH F1<|
| | | | |
| | | |>F2 200 OK ------>|
| | | | |
| | |<-- NOTIFY F3<| |
| | | | |
| | |>F4 200 OK -->| |
| | | |------- NOTIFY F5>|
| | | | |
| | | |<F6 200 OK ------<|
| | | | |
| |<------------------------------------- INVITE F7<|
| | | | |
| |>F8 100 Trying --------------------------------->|
|<-- INVITE F9<| | | |
| | | |<---- PUBLISH F10<|
| | | | |
| | | |>F11 200 OK ----->|
| | | | |
|>F12 180 --->| | | |
| |>F13 180 Ringing ------------------------------->|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F14<| |
| | | | |
| | |>F15 200 OK ->| |
| | | |------ NOTIFY F16>|
| | | | |
| | | |<F17 200 OK -----<|
|>F18 200 OK ->| | | |
| |>F19 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F20<|
|<---- ACK F21<| | | |
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F22<| |
| | | | |
| | |>F23 200 OK ->| |
| | | |------ NOTIFY F24>|
| | | | |
| | | |<F25 200 OK -----<|
| | | | |
Figure 5. Exemple d'appel sortant sans utiliser de numéro d'apparence
F1 Bob ----> Appearance Agent
PUBLISH sip:appearanceagent.example.com SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bK61314d6446383E79
From: <sip:[email protected]>;tag=4415df82k39sf
To: <sip:[email protected]>
CSeq: 7 PUBLISH
Call-ID: 44fwF144-F12893K38424
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="6"
state="full"
entity="sip:[email protected]">
<dialog id="id3d4f9c83" direction="initiator">
<sa:exclusive>false</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
</dialog>
</dialog-info>
Notez que F7 serait identique à l'exemple précédent.
11.6. Libération d'apparence
Bob et Carol sont dans un dialogue, créé par exemple comme dans la section 11.3. Carol envoie un BYE à Bob pour terminer le dialogue et l'agent d'apparence désalloue le numéro d'apparence utilisé, en envoyant des notifications aux UA du groupe partagé.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
|>F22 BYE ---->| | | |
| |>F23 BYE --------------------------------------->|
| | | | |
| |<------------------------------------ 200 OK F24<|
|<--200 OK F25<| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F26<| |
| | | | |
| | |>F27 200 OK ->| |
| | | |------ NOTIFY F28>|
| | | | |
| | | |<F29 200 OK -----<|
Figure 6. Exemple de libération d'apparence
F28 Appearance Agent ----> Bob
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=497585728578386
To: <sip:[email protected]>
Call-ID: a7d559db-d6d7dcad-311c9e3a
CSeq: 7 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com
;branch=z9hG4bK759878512309
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=1800
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="27"
state="partial"
entity="sip:[email protected]">
<dialog id="fa02538339df3ce597f9e3e3699e28fc"
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
local-tag="15A3DE7C-9283203B"
remote-tag="65a98f7c-1dd2-11b2-88c6-b0316298f7c"
direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>terminated</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
</dialog>
</dialog-info>
11.7. Reprise d'apparence
Dans ce scénario, Bob a un dialogue établi avec Carol créé à l'aide des flux d'appel des figures 1 ou 2. Bob met ensuite Carol en attente. Alice reçoit une notification de cela et l'affiche sur l'interface utilisateur d'Alice. Alice reprend ensuite l'appel en attente et a une session établie avec Carol. Enfin, Carol raccroche. Alice doit envoyer le PUBLISH F32 pour indiquer que l'INVITE F38 sera une tentative de reprise du dialogue entre Carol et Bob et, par conséquent, peut utiliser le même numéro d'apparence. Cet exemple montre également l'utilisation de SIP sécurisé (sips).
Carol Proxy Alice Appearance Agent Bob
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |<------------------------------(hold) INVITE F22<|
|<- INVITE F23<| | | |
| | | | |
|>F24 200 OK ->| | | |
| |>F25 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F26<|
|<---- ACK F27<| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F28<| |
| | | | |
| | |>F29 200 OK ->| |
| | | |>F30 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F31<|
| | | | |
| | Alice decides to pick up the call |
| | | | |
| | |>F32 PUBLISH->| |
| | | | |
| | |<- 200 OK F33<| |
| | | | |
| | |<- NOTIFY F34<| |
| | | | |
| | |>F35 200 OK ->| |
| | | |>F36 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F37<|
| |<-- INVITE F38<| | |
|<- INVITE F39<|(w/ Replaces) | | |
|( w/ Replaces)| | | |
|>F40 200 OK ->| | | |
| |>F41 200 OK -->| | |
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | | |>F42 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F43<|
| | |<- NOTIFY F44<| |
| | | | |
| | |>F45 200 OK ->| |
| | | | |
| |<----- ACK F46<| | |
|<---- ACK F47<| | | |
| | | | |
|<= Both way RTP established =>| | |
| | | | |
|>F48 BYE ---->| | | |
| |>F49 BYE --------------------------------------->|
| | | | |
| |<------------------------------------ OK 200 F50<|
|<- 200 OK F51<| | | |
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F52<| |
| | | | |
| | |>F53 200 OK ->| |
| | | | |
| | | |>F54 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F55<|
Figure 7. Exemple de reprise d'apparence
F28 Appearance ----> Alice
NOTIFY sips:[email protected] SIP/2.0
From: <sips:[email protected]>;tag=151702541050937
To: <sips:[email protected]>;tag=18433323-C3D237CE
Call-ID: 1e361d2f-a9f51109-bafe31d4
CSeq: 12 NOTIFY
Via: SIP/2.0/TLS appearanceagent.example.com
;branch=z9hG4bK1403
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=1800
Contact: <sips:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="partial"
entity="sips:[email protected]">
<dialog id="id3d4f9c83"
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
local-tag="15A3DE7C-9283203B"
remote-tag="65a98f7c-1dd2-11b2-88c6-b0316298f7c"
direction="initiator">
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<state>active</state>
<local>
<target uri="sips:[email protected]">
<param pname="+sip.rendering" pval="no"/>
</target>
</local>
<remote>
<identity>sips:[email protected]</identity>
<target uri="sips:[email protected]" />
</remote>
</dialog>
</dialog-info>
F32 Alice ----> Appearance Agent
PUBLISH sips:[email protected] SIP/2.0
Via: SIP/2.0/TLS ua2.example.com;branch=z9hG4bKa5d6cf61F5FBC05A
From: <sips:[email protected]>;tag=44150CC6-A7B7919D
To: <sips:[email protected]>;tag=428765950880801
CSeq: 11 PUBLISH
Call-ID: 87837Fkw87asfds
Contact: <sips:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="full"
entity="sips:[email protected]">
<dialog id="id3d4f9c83"
call-id="3d57cd17-47deb849-dca8b6c6"
local-tag="8C4183CB-BCEAB710" >
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<sa:replaced-dialog
call-id="f3b3cbd0-a2c5775e-5df9f8d5"
from-tag="15A3DE7C-9283203B"
to-tag="65a98f7c-1dd2-11b2-88c6-b03162323164+65a98f7c" />
<state>trying</state>
<local>
<target uri="sips:[email protected]">
<param pname="+sip.rendering" pval="yes"/>
</target>
</local>
<remote>
<target uri="sips:[email protected]" />
</remote>
</dialog>
</dialog-info>
F38 Alice ----> Proxy
INVITE sips:[email protected] SIP/2.0
Via: SIP/2.0/TLS ua1.example.com;branch=z9hG4bK4ea695b5B376A60C
From: <sips:[email protected]>;tag=8C4183CB-BCEAB710
To: <sips:[email protected]:5075>
CSeq: 1 INVITE
Call-ID: 3d57cd17-47deb849-dca8b6c6
Contact: <sips:[email protected]>
<all-one-line>
Replaces: f3b3cbd0-a2c5775e-5df9f8d5;to-tag=65a98f7c
-1dd2-11b2-88c6-b03162323164+65a98f7c;from-tag=15A3DE7C-9283203B
</all-one-line>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 223
v=0
o=- 1102980497 1102980497 IN IP4 ua1.example.com
s=IP SIP UA
c=IN IP4 ua1.example.com
t=0 0
a=sendrecv
m=audio 2238 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
11.8. Appel entre UA au sein du groupe
Dans ce scénario, Bob appelle Alice qui fait également partie du groupe d'apparence partagée. Un seul numéro d'apparence est utilisé pour ce dialogue. Cet exemple montre également l'utilisation de la balise 'exclusive' pour indiquer que les autres UA du groupe ne peuvent pas rejoindre ou prendre ce dialogue.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| |<-------------------- INVITE (to Alice's UA) F1<|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | | | |
| | |<-- NOTIFY F2<| |
| | | | |
| | |>F3 200 OK -->| |
| | | |>F4 NOTIFY ------>|
| | | | |
| | | |<------ 200 OK F5<|
| |>F6 INVITE --->| | |
| | (appearance=1)| | |
| | | | |
| |<------ 180 F7<| | |
| | | | |
| |>F8 180 --------------------------------------->|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<-- NOTIFY F9<| |
| | | | |
| | |>F10 200 OK ->| |
| | | |>F11 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F12<|
| |<-- 200 OK F13<| | |
| | | | |
| |>F14 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F15<|
| | | | |
| |>F16 ACK ----->| | |
| | | | |
| | |<======= RTP established =======>|
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F17<| |
| | | | |
| | |>F18 200 OK ->| |
| | | |>F19 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F24<|
| | | | |
Figure 8. Exemple d'appel entre UA au sein du groupe
F19 Appearance Agent ----> Bob
NOTIFY sip:[email protected] SIP/2.0
From: <sip:[email protected]>;tag=497585728578386
To: <sip:[email protected]>;tag=633618CF-B9C2EDA4
Call-ID: a7d559db-d6d7dcad-311c9e3a
CSeq: 7 NOTIFY
Via: SIP/2.0/UDP appearanceagent.example.com
;branch=z9hG4bK1711759878512309
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Event: dialog;shared
Subscription-State: active;expires=1500
Contact: <sip:appearanceagent.example.com>
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="partial"
entity="sip:[email protected]">
<dialog id="3xdsd4f9c83"
call-id="b3cbd0-ad2c5775e-5df9f8d5"
local-tag="34322kdfr234f"
remote-tag="3153DE7C-928203B"
direction="initiator">
<sa:exclusive>true</sa:exclusive>
<sa:appearance>1</sa:appearance>
<state>confirmed</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
<remote>
<identity>sip:[email protected]</identity>
<target uri="sip:[email protected]" />
</remote>
</dialog>
<dialog id="4839589"
call-id="b3cbd0-ad2c5775e-5df9f8d5"
local-tag="3153DE7C-928203B"
remote-tag="34322kdfr234f"
direction="responder">
<sa:exclusive>true</sa:exclusive>
<sa:appearance>1</sa:appearance>
<state>confirmed</state>
<local>
<target uri="sip:[email protected]" />
</local>
<remote>
<identity>sip:[email protected]</identity>
<target uri="sip:[email protected]" />
</remote>
</dialog>
</dialog-info>
11.9. Mise en attente pour consultation avec apparences
Dans ce scénario, Bob a un appel avec Carol. Bob effectue un appel de consultation vers Alice en mettant Carol en attente et en appelant Alice. L'UA de Bob choisit de ne pas utiliser de numéro d'apparence pour l'appel vers Alice, car il le traite comme une partie de l'appel vers Carol. Il l'indique dans le PUBLISH F32, qui contient le paramètre 'shared' du champ d'en-tête Event mais aucun élément <appearance>. Le PUBLISH est envoyé avant l'INVITE vers Alice afin de garantir qu'aucun numéro d'apparence n'est attribué par l'agent d'apparence. Enfin, Bob raccroche avec Alice et reprend l'appel avec Carol. Les notifications de dialogue de l'appel de consultation ne sont pas présentées, car elles ne sont pas utilisées.
Notez que si Carol raccroche pendant que Bob consulte Alice, Bob peut décider s'il souhaite réutiliser le numéro d'apparence utilisé avec Carol pour l'appel avec Alice. Sinon, Bob publie la terminaison du dialogue avec Carol et l'agent d'apparence réattribuera l'apparence. S'il souhaite conserver l'apparence, Bob publiera la terminaison du dialogue avec Carol et publiera également l'apparence avec le dialogue avec Alice. Cela aura pour effet que Bob conserve le numéro d'apparence jusqu'à ce qu'il signale la terminaison du dialogue avec Alice.
Notez que le flux d'appel serait similaire si Bob appelait un serveur de musique d'attente au lieu d'Alice pour mettre en œuvre un service de musique d'attente tel que décrit dans [RFC7088].
Carol Proxy Alice Appearance Agent Bob
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |<------------------------------(hold) INVITE F22<|
|<- INVITE F23<| | | |
| | | | |
|>F24 200 OK ->| | | |
| |>F25 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F26<|
|<---- ACK F27<| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F28<| |
| | | | |
| | |>F29 200 OK ->| |
| | | |>F30 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F31<|
| | | | |
| | Bob makes a consultation call to Alice |
| | | | |
| | | |<---- PUBLISH F32<|
| | | | |
| | | |>F33 200 OK ----->|
| | | | |
| |<------------------------------------ INVITE F34<|
| | | | |
| |>F35 INVITE -->| | |
| | | | |
| |<-- 200 OK F36<| | |
| | | | |
| |>F37 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F38<|
| | | | |
| |>F39 ACK ----->| | |
| | | | |
| | |<======= RTP established =======>|
| | | | |
| | Bob hangs up with Alice |
| | | | |
| |<--------------------------------------- BYE F40<|
| | | | |
| |>F41 BYE ----->| | |
| | | | |
| |<-- 200 OK F42<| | |
| | | | |
| |>F43 200 OK ------------------------------------>|
| | | | |
| |<----------------------------(unhold) INVITE F44<|
|<- INVITE F45<| | | |
| | | | |
|>F46 200 OK ->| | | |
| |>F47 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F48<|
|<---- ACK F49<| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F50<| |
| | | | |
| | |>F51 200 OK ->| |
| | | |>F52 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F53<|
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
Figure 9. Exemple de mise en attente pour consultation avec apparences
F32 Bob ----> Appearance Agent
PUBLISH sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bKa5d6cf61F5FBC05A
From: <sip:[email protected]>;tag=44150CC6-A7B7919D
To: <sip:[email protected]>;tag=428765950880801
CSeq: 11 PUBLISH
Call-ID: 44fwF144-F12893K38424
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="full"
entity="sip:[email protected]">
<dialog id="id3d4f9c83"
call-id="b3cbd0-ad2c5775e-5df9f8d5"
local-tag="3153DE7C-928203B"
direction="initiator">
<sa:exclusive>true</sa:exclusive>
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
<remote>
<identity>sip:[email protected]</identity>
<target uri="sip:[email protected]" />
</remote>
</dialog>
</dialog-info>
11.10. Rejoindre ou pontage d'une apparence
Dans ce flux d'appel, un appel auquel Bob a répondu est rejoint par Alice, ou "ponté". Alice utilise le champ d'en-tête Join pour demander ce pontage. Si Bob ne prenait pas en charge le mélange de médias, Bob pourrait obtenir des ressources de conférence comme décrit dans [RFC4579].
Carol Forking Proxy Appearance Agent Alice Bob
| | | | |
|<=============Both way RTP established===========>|
| | | | |
| | |< PUBLISH F22| |
| | | | |
| | |>F23 200 OK >| |
| | | | |
| |<---- INVITE (w/ Join) F24<| |
| | | | |
| |>F25 INVITE (w/Join)---------------->|
| | | | |
| |<---- OK 200 Contact:Bob;isfocus F26<|
| | | | |
| |< - - - - - >| | |
| | | | |
| | |>F27 NOTIFY >| |
| | | | |
| | |< 200 OK F28<| |
| | | | |
| | |>F29 NOTIFY ---------->|
| | | | |
| | |<F30 200 OK ----------<|
| | | | |
| |>F31 200 OK Contact:B----->| |
| | | | |
| |<----------------- ACK F32<| |
| | | | |
| |>ACK F33---------------------------->|
| | | | |
| |<-----INVITE Contact:Bob;isfocus F34<|
|<-INVITE F35| | | |
| | | | |
|>F26 200 -->| | | |
| |>F37 200 OK ------------------------>|
| | | | |
| |<--------------------------- ACK F38<|
|<--- ACK F39| | | |
| | | |<==RTP==>|
|<=============Both way RTP established===========>|
| | | | |
| |< - - - - - >| | |
| | | | |
| | |>F40 NOTIFY >| |
| | | | |
| | |< 200 OK F41<| |
| | | | |
| | |>F42 NOTIFY ---------->|
| | | | |
| | |<F43 200 OK ----------<|
| | | | |
Figure 10. Exemple de jonction ou de pontage d'une apparence
F22 Alice ----> Appearance Agent
PUBLISH sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bKa5d6cf61F5FBC05A
From: <sip:[email protected]>;tag=44150CC6-A7B7919D
To: <sip:[email protected]>;tag=428765950880801
CSeq: 11 PUBLISH
Call-ID: 87837Fkw87asfds
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="full"
entity="sip:[email protected]:5060">
<dialog id="id3d4f9c83"
call-id="dc95da63-60db1abd-d5a74b48"
local-tag="605AD957-1F6305C2" >
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<sa:joined-dialog
call-id="14-1541707345"
from-tag="44BAD75D-E3128D42"
to-tag="d3b06488-1dd1-11b2-88c5-b03162323164+d3e48f4c" />
<state>trying</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
<remote>
<target uri="sip:[email protected]" />
</remote>
</dialog>
</dialog-info>
F24 Alice ----> Proxy
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua1.example.com;branch=z9hG4bKcc9d727c2C29BE31
From: <sip:[email protected]>;tag=605AD957-1F6305C2
To: <sip:[email protected]>
CSeq: 2 INVITE
Call-ID: dc95da63-60db1abd-d5a74b48
Contact: <sip:[email protected]>
<all-one-line>
Join: 14-1541707345;to-tag=d3b06488-1dd1-11b2-88c5
-b03162323164+d3e48f4c;from-tag=44BAD75D-E3128D42
</all-one-line>
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: 223
v=0
o=- 1103061265 1103061265 IN IP4 ua1.example.com
s=IP SIP UA
c=IN IP4 ua1.example.com
t=0 0
a=sendrecv
m=audio 2236 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
11.11. Perte d'apparence pendant l'allocation
Bob réserve une apparence avec un PUBLISH, envoie un INVITE à Carol, puis devient injoignable. Lorsqu'il ne parvient pas à rafraîchir sa publication auprès de l'agent d'apparence, l'agent d'apparence déclare le dialogue terminé et libère l'apparence à l'aide des NOTIFY F14 et F16. Après avoir retransmis le NOTIFY à Bob (messages non présentés F17, F18, etc.), l'abonnement est terminé.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | |<----- PUBLISH F1<|
| | | | |
| | | |>F2 200 OK ------>|
| | | | |
| | |<-- NOTIFY F3<| |
| | | | |
| | |>F4 200 OK -->| |
| | | |------- NOTIFY F5>|
| | | | |
| | | |<F6 200 OK ------<|
| | | | |
| |<------------------------------------- INVITE F7<|
| | | | |
| |>F8 100 Trying --------------------------------->|
|<-- INVITE F9<| | | |
| | | |<---- PUBLISH F10<|
| | | | |
| | | |>F11 200 OK ----->|
| | | | |
|>F12 180 --->| | | |
| |>F13 180 Ringing ------------------------------->|
| | | | |
| | | | Bob goes offline |
| | | | |
| | | Appearance selection times out |
| | | | |
| | |<- NOTIFY F14<| |
| | | | |
| | |>F15 200 OK ->| |
| | | |------ NOTIFY F16>|
| | | | |
| | | NOTIFY is retransmitted |
Figure 11. Exemple de perte d'apparence pendant l'allocation
11.12. Condition de concurrence sur la saisie d'apparence
Bob et Alice tentent tous deux de réserver l'apparence 2 en publiant en même temps. L'agent d'apparence attribue l'apparence à Bob en envoyant un 200 OK et la refuse à Alice en envoyant une réponse 400 (Bad Request). Après le NOTIFY F5, Alice apprend que Bob utilise l'apparence 2. Alice tente alors de réserver l'apparence 3 en publiant, ce qui est accepté.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| | | |<----- PUBLISH F1<|
| | | | (appearance=2)
| | |>F2 PUBLISH ->| |
| | | (appearance=2) |
| | | | |
| | | |>F3 200 OK ------>|
| | |<---- F4 400 <| |
| | | | |
| | |<-- NOTIFY F5<| |
| | | | |
| | |>F6 200 OK -->| |
| | | |------- NOTIFY F7>|
| | | | |
| | | |<F8 200 OK ------<|
| | | | |
| |<------------------------------------- INVITE F9<|
| | | | |
| |>F10 100 Trying -------------------------------->|
|<- INVITE F11<| | | |
| | | |<---- PUBLISH F12<|
| | | | (appearance=2)
| | | |>F13 200 OK ----->|
| | |>F14 PUBLISH->| |
| | | (appearance=3) |
| | | | |
| | |<--- F15 200 <| |
| | | | |
| | |<- NOTIFY F16<| |
| | | | |
| | |>F17 200 OK ->| |
Dave | | |------ NOTIFY F18>|
| | | | |
| | | |<F19 200 OK -----<|
| |<-- INVITE F20<| | |
| | | | |
| |>F21 100 ----->| | |
|<- INVITE F22<| | | |
Figure 12. Exemple de condition de concurrence sur la saisie d'apparence
11.13. Abonnement de l'agent d'apparence aux UA
Dans ce scénario, l'agent d'apparence n'a aucun moyen de connaître les informations d'état de dialogue de Bob, sauf par l'intermédiaire de Bob. Cela peut être dû au fait que l'agent d'apparence ne fait pas partie d'un B2BUA, ou peut-être que Bob s'enregistre à distance. Lorsque Bob s'enregistre, l'agent d'apparence reçoit une notification du paquet d'événements d'enregistrement de la part du registraire. L'agent d'apparence s'abonne ensuite à l'état d'événement de dialogue de Bob en utilisant Event:dialog dans le SUBSCRIBE. Chaque fois que l'état de dialogue de Bob change, l'UA de Bob envoie un NOTIFY à l'agent d'apparence, qui notifie ensuite les autres UA du groupe.
Carol Proxy Alice Appearance Agent Bob
| | | | |
| |<----------------------------------- REGISTER F1<|
| | | | |
| |>F2 200 OK ------------------------------------->|
| | | | |
| |>F3 NOTIFY ------------------>| |
| | | | |
| |<------------------ 200 OK F4<| |
| | | |---- SUBSCRIBE F5>|
| | | | |
| | | |<F6 200 OK ------<|
| | | | |
| | | |<------ NOTIFY F7<|
| | | | |
| | | |>F8 200 OK ------>|
| | | | |
| | | |<--- SUBSCRIBE F9<|
| | | | |
| | | |>F10 200 OK ----->|
| | | | |
| | | |------ NOTIFY F11>|
| | | | |
| | | |<F12 200 OK -----<|
| | | | |
| |<------------------------------------ INVITE F13<|
| | | | |
| |>F14 100 Trying -------------------------------->|
|<- INVITE F15<| | | |
| | | |<----- NOTIFY F16<|
| | | | |
| | | |>F17 200 OK ----->|
| | |<- NOTIFY F18<| |
| | | | |
| | |>F19 200 OK ->| |
| | | |------ NOTIFY F20>|
| | | | |
| | | |<F21 200 OK -----<|
|>F22 180 --->| | | |
| |>F23 180 Ringing ------------------------------->|
| | | | |
| | | |<----- NOTIFY F24<|
| | | | |
| | | |>F25 200 OK ----->|
| | |<- NOTIFY F26<| |
| | | | |
| | |>F27 200 OK ->| |
| | | |------ NOTIFY F28>|
| | | | |
| | | |<F29 200 OK -----<|
|>F30 200 OK ->| | | |
| |>F31 200 OK ------------------------------------>|
| | | | |
| | | |<----- NOTIFY F32<|
| | | | |
| | | |>F33 200 OK ----->|
| | | | |
| |<--------------------------------------- ACK F34<|
|<---- ACK F35<| | | |
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| | |<- NOTIFY F36<| |
| | | | |
| | |>F37 200 OK ->| |
| | | |------ NOTIFY F38>|
| | | | |
| | | |<F39 200 OK -----<|
| | | | |
Figure 13. Exemple d'abonnement de l'agent d'apparence aux UA
11.14. Échec de la condition de concurrence sur la reprise d'apparence
Dans ce scénario, Bob a un dialogue établi avec Carol créé à l'aide des flux d'appel de la figure 1 ou de la figure 2. Bob met ensuite Carol en attente. Alice reçoit une notification de cela et l'affiche sur l'interface utilisateur d'Alice. Alice tente de reprendre l'appel, mais Carol raccroche avant que la reprise ne puisse aboutir. Alice annule la tentative de reprise avec le PUBLISH F48. Notez que le flux d'appel pour un Join échoué serait presque identique.
Carol Proxy Alice Appearance Agent Bob
| | | | |
|<================= Both way RTP established ===================>|
| | | | |
| |<------------------------------(hold) INVITE F22<|
|<- INVITE F23<| | | |
| | | | |
|>F24 200 OK ->| | | |
| |>F25 200 OK ------------------------------------>|
| | | | |
| |<--------------------------------------- ACK F26<|
|<---- ACK F27<| | | |
| | | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |<- NOTIFY F28<| |
| | | | |
| | |>F29 200 OK ->| |
| | | |>F30 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F31<|
| | | | |
| | Alice decides to pick up the call |
| | | | |
| | |>F32 PUBLISH->| |
| | | | |
| | |<- 200 OK F33<| |
| | | | |
| | |<- NOTIFY F34<| |
| | | | |
| | |>F35 200 OK ->| |
| | | |>F36 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F37<|
|>F38 BYE ---->| | | |
| |>F39 BYE --------------------------------------->|
| | | | |
| |<------------------------------------ OK 200 F40<|
|<- 200 OK F41<| | | |
| |<-- INVITE F42<| | |
|<- INVITE F43<|(w/ Replaces) | | |
|( w/ Replaces)| | | |
| | | | |
|>F44 481 ---->| | | |
| |>F45 481 ----->| | |
|<---- ACK F46<| | | |
| |<----- ACK F47<| | |
| | |>F48 PUBLISH->| |
| | | | |
| | |<- 200 OK F49<| |
| | | | |
| | |<- NOTIFY F50<| |
| | | | |
| | |>F51 200 OK ->| |
| | | |>F52 NOTIFY ----->|
| | | | |
| | | |<----- 200 OK F53<|
Figure 14. Exemple d'échec de la condition de concurrence sur la reprise d'apparence
F48 Alice ----> Appearance Agent
PUBLISH sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP ua2.example.com;branch=z9hG4bKa5d6cf61F5FBC05A
From: <sip:[email protected]>;tag=44150CC6-A7B7919D
To: <sip:[email protected]>;tag=428765950880801
CSeq: 11 PUBLISH
Call-ID: 87837Fkw87asfds
Contact: <sip:[email protected]>
Event: dialog;shared
Max-Forwards: 70
Content-Type: application/dialog-info+xml
Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
xmlns:sa="urn:ietf:params:xml:ns:sa-dialog-info"
version="10"
state="full"
entity="sip:[email protected]">
<dialog id="id3d4f9c83"
call-id="dc95da63-60db1abd-d5a74b48"
local-tag="605AD957-1F6305C2" >
<sa:appearance>1</sa:appearance>
<sa:exclusive>false</sa:exclusive>
<sa:replaced-dialog
call-id="14-1541707345"
from-tag="44BAD75D-E3128D42"
to-tag="d3b06488-1dd1-11b2-88c5-b03162323164+d3e48f4c" />
<state>terminated</state>
<local>
<target uri="sip:[email protected]">
</target>
</local>
<remote>
<target uri="sip:[email protected]" />
</remote>
</dialog>
</dialog-info>
11.15. Condition de concurrence sur la saisie d'apparence entrante/sortante
Alice tente de saisir l'apparence 2 en même temps que l'apparence 2 est attribuée à un appel entrant. L'agent d'apparence résout le conflit en envoyant un 400 (Bad Request) à Alice. Après le NOTIFY F6, Alice apprend que l'appel entrant utilise l'apparence 2. Alice republie pour l'apparence 3, ce qui est accepté. Notez que cet exemple montre l'INVITE reçu avant le NOTIFY de l'agent d'apparence.
Carol Proxy Alice Appearance Agent Bob
| | | | |
|>-- INVITE F1>| | | |
| |< - - - - - - - - - - - - - ->| |
| | | | |
| | |>F2 PUBLISH ->| |
| | | (appearance=2) |
| | | | |
| |>F3 INVITE (appearance=2) ---------------------->|
| | | | |
| |>F4 INVITE | | |
| |(appearance=2)>| | |
| | |<---- F5 400 <| |
| | | | |
| | |<-- NOTIFY F6<| |
| | | | |
| | |>F7 200 OK -->| |
| | | |------- NOTIFY F8>|
| | | | |
| | | |<F9 200 OK ------<|
| | | | |
| | |>F10 PUBLISH->| |
| | | (appearance=3) |
| | | | |
| | |< F11 200 OK <| |
| | | | |
| | |<- NOTIFY F12<| |
| | | | |
| |>F13 200 OK ->| |
Dave | | |------ NOTIFY F14>|
| | | | |
| | | |<F15 200 OK -----<|
| |<-- INVITE F16<| | |
| | | | |
| |>F17 100 ----->| | |
|<- INVITE F18<| | | |
Figure 15. Exemple de condition de concurrence sur la saisie d'apparence entrante/sortante