Skip to main content

11. Example Message Flows

The next section shows call flow and message examples. The flows and descriptions are non-normative. Note that, in these examples, all INVITEs sent by a UA in the group will be From the shared AOR (sip:[email protected] in this case), and all INVITES sent to the group will have a Request-URI of the shared AOR. Any other requests would not apply to this feature and would be handled using normal SIP mechanisms.

Note that the first 12 examples assume the Appearance Agent is aware of dialog state events. The example in Section 11.13 shows the case where this is not the case, and, as a result, the Appearance Agent initiates a subscription to users of the shared AOR. Any of the other call flow examples could have shown this mode of operation as it is equally valid.

11.1. Registration and Subscription​

Bob and Alice are in a shared appearance group identified by the shared appearance AOR sip:[email protected]. Bob REGISTERs using contact sip:[email protected]. Alice REGISTERs with contact sip:[email protected].

UAs for Alice and Bob subscribe to the dialog package for the appearance AOR and publish dialog state to the Appearance Agent. Message exchanges between the Registrar, Appearance Agent, Alice, and Bob are shown below. The call flow examples below do not show the authentication of subscriptions, publications, and notifications. It should be noted that for security purposes, all publications and subscriptions must be authorized before they are accepted.

Also note that registrations and subscriptions must all be refreshed by Alice at intervals determined by the expiration intervals returned by the Registrar or Appearance Agent.

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. Registration and Subscription Example

F1-F2: Alice registers AOR with 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 also subscribes to the events associated with the Appearance AOR. Appearance Agent notifies Alice of the status.

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. Appearance Selection for Incoming Call​

In the call flow below, Bob and Alice are in a shared appearance group. Carol places a call to the shared appearance group AOR. The Appearance Agent sends NOTIFYs to Alice and Bob telling them what appearance the call is using. Both Alice and Bob's devices are alerted of the incoming call. Bob answers the call.

Note that it is possible that both Alice and Bob answer the call and send 200 (OK) responses to Carol. It is up to Carol to resolve this situation. Typically, Carol will send ACKs to both 200 OKs but send a BYE to terminate one of the dialogs. As a result, either Alice or Bob will receive the BYE and publish that their dialog is over. However, if Carol answers both Alice and Bob and keeps both dialogs active, then the Appearance Agent will need to resolve the situation by moving either Alice or Bob's dialog to a different appearance.

All NOTIFY messages in the call flow below carry dialog events and only dialog states are mentioned for simplicity. For brevity, the details of some messages are not shown below. Note that the order of F2 - F5 and F7 - F8 could be reversed.

           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. Appearance Selection for Incoming Call Example

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. Outgoing Call without Appearance Seizure​

In this scenario, Bob's UA places a call without first selecting/ seizing an appearance number. After Bob sends the INVITE, the appearance assigns an appearance number for it and notifies both Alice and 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. Outgoing Call without Appearance Seizure Example

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. Outgoing Call with Appearance Seizure​

In this scenario, Bob's UA sends out a dialog event PUBLISH with state (trying) selecting/seizing an appearance number before sending the INVITE. After receiving the 200 (OK) from the Appearance Agent confirming the appearance number, Bob's UA sends the INVITE to Carol and establishes a session. For brevity, details of some of the messages are not included in the message flows. Bob's UA puts as much of the dialog information from F7 as can be determined in advance. In this case, the minimum of the Contact URI is included, which allows the Appearance Agent to correlate the INVITE with the 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. Outgoing Call with Appearance Seizure Example

F1 to F4: Bob uses the shared appearance of the Help Desk on his UA to place an outgoing call (e.g., he goes off-hook). Before sending the outgoing INVITE request, Bob publishes to the Appearance Agent reserving appearance number 1. The Appearance Agent notifies Alice (and all other UAs, including Bob) of the event by sending NOTIFYs.

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 Not Shown)

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. Outgoing Call without Using an Appearance Number​

In this scenario, Bob's UA sends out a dialog event PUBLISH with state (trying) indicating that he does not want to utilize an appearance number for this dialog. The PUBLISH does not have an appearance element but does have the 'shared' Event header field parameter. As a result, the Appearance Agent knows the UA does not wish to use an appearance number for this call. If the Appearance Agent does not wish to allow this, it would reject the PUBLISH with a 400 (Bad Request) response and the UA would know to re-PUBLISH selecting/seizing an appearance number.

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. Outgoing Call without using an Appearance Number Example

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>

Note that F7 would be the same as the previous example.

11.6. Appearance Release​

Bob and Carol are in a dialog, created, for example as in Section 11.3. Carol sends a BYE to Bob to terminate the dialog and the Appearance Agent de-allocates the appearance number used, sending notifications out to the UAs in the shared group.

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. Appearance Release Example

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. Appearance Pickup​

In this scenario, Bob has an established dialog with Carol created using the call flows of Figures 1 or 2. Bob then places Carol on hold. Alice receives a notification of this and renders this on Alice's UI. Alice subsequently picks up the held call and has a established session with Carol. Finally, Carol hangs up. Alice must PUBLISH F32 to indicate that the INVITE F38 will be an attempt to pickup the dialog between Carol and Bob and, hence, may use the same appearance number. This example also shows Secure SIP (sips) being used.

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. Appearance Pickup Example

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. Call between UAs within the Group​

In this scenario, Bob calls Alice who is also in the shared appearance group. Only one appearance number is used for this dialog. This example also shows the use of the 'exclusive' tag to indicate that other UAs in the group can not join or take this dialog.

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. Call between UAs within the Group Example

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. Consultation Hold with Appearances​

In this scenario, Bob has a call with Carol. Bob makes a consultation call to Alice by putting Carol on hold and calling Alice. Bob's UA chooses not to have an appearance number for the call to Alice since it is treating it as part of the call to Carol. He indicates this in the PUBLISH F32, which contains the 'shared' Event header field parameter but no <appearance> element. The PUBLISH is sent before the INVITE to Alice to ensure no appearance number is assigned by the Appearance Agent. Finally, Bob hangs up with Alice and resumes the call with Carol. Dialog notifications of the consultation call are not shown, as they are not used.

Note that if Carol hangs up while Bob is consulting with Alice, Bob can decide if he wants to reuse the appearance number used with Carol for the call with Alice. If not, Bob publishes the termination of the dialog with Carol and the Appearance Agent will re-allocate the appearance. If he wants to keep the appearance, Bob will publish the termination of the dialog with Carol and also publish the appearance with the dialog with Alice. This will result in Bob keeping the appearance number until he reports the dialog with Alice terminated.

Note that the call flow would be similar if Bob called a music on hold server instead of Alice to implement a music on hold service as described in [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. Consultation Hold with Appearances Example

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. Joining or Bridging an Appearance​

In this call flow, a call answered by Bob is joined by Alice or "bridged". The Join header field is used by Alice to request this bridging. If Bob did not support media mixing, Bob could obtain conferencing resources as described in [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. Joining or Bridging an Appearance Example

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. Loss of Appearance during Allocation​

Bob reserves an appearance with a PUBLISH, sends an INVITE to Carol, then becomes unreachable. When he fails to refresh his publication to the appearance agent, the Appearance Agent declares the dialog terminated and frees up the appearance using NOTIFYs F14 and F16. After retransmitting the NOTIFY to Bob (in not shown messages F17, F18, etc.), the subscription is terminated.

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. Loss of Appearance during Allocation Example

11.12. Appearance Seizure Contention Race Condition​

Bob and Alice both try to reserve appearance 2 by publishing at the same time. The Appearance Agent allocates the appearance to Bob by sending a 200 OK and denies it to Alice by sending a 400 (Bad Request) response. After the NOTIFY F5, Alice learns that Bob is using appearance 2. Alice then attempts to reserve appearance 3 by publishing, which is then accepted.

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. Appearance Seizure Contention Race Condition Example

11.13. Appearance Agent Subscription to UAs​

In this scenario, the Appearance Agent does not have any way of knowing Bob's dialog state information, except through Bob. This could be because the Appearance Agent is not part of a B2BUA, or perhaps Bob is remotely registering. When Bob registers, the Appearance Agent receives a registration event package notification from the registrar. The Appearance Agent then SUBSCRIBEs to Bob's dialog event state using Event:dialog in the SUBSCRIBE. Whenever Bob's dialog state changes, Bob's UA sends a NOTIFY to the Appearance Agent which then notifies the other UAs in the group.

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. Appearance Agent Subscription to UAs Example

11.14. Appearance Pickup Race Condition Failure​

In this scenario, Bob has an established dialog with Carol created using the call flows of Figure 1 or Figure 2. Bob then places Carol on hold. Alice receives a notification of this and renders this on Alice's UI. Alice attempts to pick up the call but Carol hangs up before the pickup can complete. Alice cancels the pickup attempt with the PUBLISH F48. Note that the call flow for a failed Join would be almost identical.

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. Appearance Pickup Race Condition Failure Example

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. Appearance Seizure Incoming/Outgoing Contention Race Condition​

Alice tries to seize appearance 2 at the same time appearance 2 is allocated to an incoming call. The Appearance Agent resolves the conflict by sending a 400 (Bad Request) to Alice. After the NOTIFY F6, Alice learns that the incoming call is using appearance 2. Alice republishes for appearance 3, which is accepted. Note that this example shows the INVITE being received before the NOTIFY from the Appearance Agent.

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. Appearance Seizure Incoming/Outgoing Contention Race Condition Example