2. Service Examples
2.16. Call Pickup
Alice Bob Bill | | | | INVITE F1 | | |--->| | |180 Ringing F2| | |<---| | | | SUBSCRIBE F3 | | |<---|
| | 200 OK F4 | | |--->|
| | NOTIFY F5 | | |--->|
| | 200 OK F6 | | |<---|
| INVITE Replaces:Bob F7 | |<---|
| | 200 OK F8 | |--->|
| CANCEL F9 | | |--->| | | 200 OK F10 | | |<---| | | 487 F11 | | |<---| | | ACK F12 | | |--->| | | ACK F13 | |<---|
| | | Two-Way RTP Established | |<================================>|
| BYE F14 | |--->|
| 200 OK F15 | |<---|
| |
Bob and Bill are part of a work group at example.com that can pick up each other’s calls. Alice calls Bob, who does not answer. Bill wishes to pick up the call and sends a SUBSCRIBE to Bob to retrieve the dialog information. Bill then generates an INVITE with a
Replaces to Alice. Alice answers the INVITE and sends a CANCEL to stop Bob’s phone ringing. Note that the relative order of the
487/ACK sequence (F11/F12) and the 200 OK to the CANCEL (F10) is not deterministic.
This call flow shows the use of the "early-only" parameter [RFC3891]
in the Replaces header field of F7. This parameter prevents Alice from accepting the INVITE if Bob has already accepted the INVITE. If Bill had wished to "take" the call from Bob regardless of whether he had answered, the parameter would not have been present in F7.
Also note that the subscription between Bob and Carol could have been established prior to Alice’s call.
Message Details
F1 INVITE Alice -> Bob
INVITE sips:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
Max-Forwards: 70
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>
Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE
Contact: <sips:a8342043f@atlanta.example.com;gr>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY Supported: replaces, gruu
Content-Type: application/sdp Content-Length: ...
v=0
o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com s=
c=IN IP4 client.atlanta.example.com t=0 0
m=audio 49170 RTP/AVP 0 a=rtpmap:0 PCMU/8000
F2 180 Ringing Bob -> Alice SIP/2.0 180 Ringing
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
;received=192.0.2.103
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=3145678
Call-ID: 12345600@atlanta.example.com
CSeq: 1 INVITE
Contact: <sips:bob@client.biloxi.example.com>
Content-Length: 0
/* Bill decides to pick up the call. */
F3 SUBSCRIBE Bill -> Bob
SUBSCRIBE sips:bob@biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS pc.biloxi.example.com:5061 ;branch=z9hG4bK74bf
Max-Forwards: 70
From: Bill <sips:bill@biloxi.example.com>;tag=8675309 To: Bob <sips:bob@biloxi.example.com>
Call-ID: rt4353gs2egg@pc.biloxi.example.com CSeq: 1 SUBSCRIBE
Contact: <sips:bill@pc.biloxi.example.com>
Event: dialog Expires: 0
Accept: application/dialog-info+xml Content-Length: 0
F4 200 OK Bob -> Bill SIP/2.0 200 OK
Via: SIP/2.0/TLS pc.biloxi.example.com:5061 ;branch=z9hG4bK74bf
;received=192.0.2.114 Max-Forwards: 70
From: Bill <sips:bill@biloxi.example.com>;tag=8675309 To: Bob <sips:bob@biloxi.example.com>;tag=31451098 Call-ID: rt4353gs2egg@pc.biloxi.example.com
CSeq: 1 SUBSCRIBE Content-Length: 0
F5 NOTIFY Bob -> Bill
NOTIFY sips:bill@pc.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bK74br
Max-Forwards: 70
From: Bob <sips:bob@biloxi.example.com>;tag=31451098 To: Bill <sips:bill@biloxi.example.com>;tag=8675309 Call-ID: rt4353gs2egg@pc.biloxi.example.com
CSeq: 1 NOTIFY
Contact: <sips:bob@client.biloxi.example.com>
Event: dialog
Subscription-State: terminated;reason=timeout Content-Type: application/dialog-info+xml Content-Length: ...
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="0" state="full" entity="sips:bob@biloxi.example.com">
<dialog id="94992014524" call-id="12345600@atlanta.example.com"
local-tag="3145678" remote-tag="1234567" direction="recipient">
<duration>1</duration>
<local>
<identity display="Bob">sips:bob@biloxi.example.com</identity>
<target>sips:bob@client.biloxi.example.com</target>
</local>
<remote>
<identity display="Alice">sips:alice@atlanta.example.com </identity>
<target>sips:a8342043@atlanta.example.com;gr</target>
</remote>
<state>early</state>
</dialog>
</dialog-info>
F6 200 OK Bill -> Bob SIP/2.0 200 OK
Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bK74br
;received=192.0.2.105
From: Bob <sips:bob@biloxi.example.com>;tag=31451098 To: Bill <sips:bill@biloxi.example.com>;tag=8675309 Call-ID: rt4353gs2egg@pc.biloxi.example.com
CSeq: 1 NOTIFY
Contact: <sips:bill@pc.biloxi.example.com>
Content-Length: 0
F7 INVITE Bill -> Alice
INVITE sips:a8342043f@atlanta.example.com;gr SIP/2.0 Via: SIP/2.0/TLS pc.biloxi.example.com:5061
;branch=z9hG4bK74HH Max-Forwards: 70
From: Bill <sips:bill@biloxi.example.com>;tag=8675310 To: Alice <sips:alice@atlanta.example.com>
Call-ID: 563456212@b2.biloxi.example.com CSeq: 1 INVITE
Require: replaces
Replaces: 12345600@atlanta.example.com ;from-tag=314578;to-tag=1234567;early-only Contact: <sips:bill@pc.biloxi.example.com>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY Supported: replaces
Content-Type: application/sdp Content-Length: ...
v=0
o=bill 2890843122 2890843122 IN IP4 pc.biloxi.example.com s=
c=IN IP4 pc.biloxi.example.com t=0 0
m=audio 5342 RTP/AVP 0 a=rtpmap:0 PCMU/8000
/* Alice matches the dialog information in the Replaces header and accepts the INVITE. */
F8 200 OK Alice -> Bill SIP/2.0 200 OK
Via: SIP/2.0/TLS pc.biloxi.example.com:5061 ;branch=z9hG4bK74HH
;received=192.0.2.114
From: Bill <sips:bill@biloxi.example.com>;tag=8675310 To: Alice <sips:alice@atlanta.example.com>;tag=131256 Call-ID: 563456212@b2.biloxi.example.com
CSeq: 1 INVITE
Contact: <sips:a8342043f@atlanta.example.com;gr>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY Supported: replaces, gruu
Content-Type: application/sdp Content-Length: ...
v=0
o=alice 289084543 289084543 IN IP4 client.atlanta.example.com s=
c=IN IP4 client.atlanta.example.com t=0 0
m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
/* Alice stops Bob’s phone from ringing by sending a CANCEL. */
F9 CANCEL Alice -> Bob
CANCEL sips:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
Max-Forwards: 70
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>
Call-ID: 12345600@atlanta.example.com CSeq: 1 CANCEL
Content-Length: 0
F10 200 OK Bob -> Alice SIP/2.0 200 OK
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
;received=192.0.2.103
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=3145678
Call-ID: 12345600@atlanta.example.com CSeq: 1 CANCEL
Content-Length: 0
F11 487 Request Terminated Bob -> Alice SIP/2.0 487 Request Terminated
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9
;received=192.0.2.103
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=3145678
Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE
Content-Length: 0
F12 ACK Alice -> Bob
ACK sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK83749.1
Max-Forwards: 70
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=3145678
Call-ID: 12345600@atlanta.example.com CSeq: 1 ACK
Content-Length: 0
F13 ACK Bill -> Alice
ACK sips:a8342043f@atlanta.example.com;gr SIP/2.0 Via: SIP/2.0/TLS pc.biloxi.example.com:5061
;branch=z9hG4bK7435 Max-Forwards: 70
From: Bill <sips:bill@biloxi.example.com>;tag=8675310 To: Alice <sips:alice@atlanta.example.com>;tag=131256 Call-ID: 563456212@b2.biloxi.example.com
CSeq: 1 ACK
Content-Length: 0
/* RTP streams are established between Alice and Bill.
Later, Alice hangs up with Bill. */
F14 BYE Alice -> Bill
BYE sips:bill@pc.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf2
Max-Forwards: 70
To: Bill <sips:bill@biloxi.example.com>;tag=8675310 From: Alice <sips:alice@atlanta.example.com>;tag=131256 Call-ID: 563456212@b2.biloxi.example.com
CSeq: 1 BYE
Content-Length: 0
F15 200 OK Bill -> Alice SIP/2.0 200 OK
Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf2
;received=192.0.2.105
To: Bill <sips:bill@biloxi.example.com>;tag=8675310 From: Alice <sips:alice@atlanta.example.com>;tag=131256 Call-ID: 563456212@b2.biloxi.example.com
CSeq: 1 BYE Content-Length: 0