Network Working Group A. Johnston, Ed. Request for Comments: 5359 Avaya BCP: 144 R. Sparks Category: Best Current Practice Tekelec C. Cunningham S. Donovan Cisco Systems K. Summers Sonus October 2008
Session Initiation Protocol Service Examples
Status of This Memo
This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. Distribution of this memo is unlimited.
Abstract
This document gives examples of Session Initiation Protocol (SIP) services. This covers most features offered in so-called IP Centrex offerings from local exchange carriers and PBX (Private Branch Exchange) features. Most of the services shown in this document are implemented in the SIP user agents, although some require the assistance of a SIP proxy. Some require some extensions to SIP including the REFER, SUBSCRIBE, and NOTIFY methods and the Replaces and Join header fields. These features are not intended to be an exhaustive set, but rather show implementations of common features likely to be implemented on SIP IP telephones in a business environment.
Johnston, et al. Best Current Practice [Page 1]
RFC 5359 SIP Service Examples October 2008
Table of Contents
1. Overview ........................................................3 1.1. Legend for Message Flows ...................................4 2. Service Examples ................................................6 2.1. Call Hold ..................................................6 2.2. Consultation Hold .........................................19 2.3. Music on Hold .............................................38 2.4. Transfer - Unattended .....................................50 2.5. Transfer - Attended .......................................58 2.6. Transfer - Instant Messaging ..............................71 2.7. Call Forwarding Unconditional .............................77 2.8. Call Forwarding - Busy ....................................84 2.9. Call Forwarding - No Answer ...............................92 2.10. 3-Way Conference - Third Party Is Added .................101 2.11. 3-Way Conference - Third Party Joins ....................107 2.12. Find-Me .................................................113 2.13. Call Management (Incoming Call Screening) ...............125 2.14. Call Management (Outgoing Call Screening) ...............132 2.15. Call Park ...............................................135 2.16. Call Pickup .............................................147 2.17. Automatic Redial ........................................154 2.18. Click to Dial ...........................................163 3. Security Considerations .......................................166 4. Acknowledgements ..............................................166 5. References ....................................................167 5.1. Normative References .....................................167 5.2. Informative References ...................................168
This document provides example call flows detailing a SIP implementation of the following traditional telephony services:
Call Hold 3-Way Conference Consultation Hold Find-Me Music on Hold Incoming Call Screening Unattended Transfer Outgoing Call Screening Attended Transfer Call Park Instant Messaging Transfer Call Pickup Unconditional Call Forwarding Automatic Redial Call Forwarding on Busy Click to Dial Call Forwarding on No Answer
Note that the Single Line Extension call flow has been removed from this document and will be covered in a separate document.
The call flows shown in this document were developed in the design of a SIP IP communications network. They represent an example set of so-called IP Centrex services or PBX services.
It is the hope of the authors that this document will be useful for SIP implementers, designers, and protocol researchers alike and will help further the goal of a standard implementation of RFC 3261 [RFC3261] and some of its extensions.
These flows represent carefully checked and working group reviewed scenarios of SIP service examples as a companion to the specifications.
These call flows are based on the current version 2.0 of SIP in RFC 3261 [RFC3261] with Session Description Protocol (SDP) usage described in RFC 3264 [RFC3264]. Other RFCs also form part of the SIP standard and are used and referenced in these call flows.
The SIP specification and the other referenced documents are definitive as far as protocol issues are concerned. Also, these flows do not represent the only way to implement these services -- other approaches such as 3pcc (Third Party Call Control) [RFC3725] or Back-to-Back User Agents (B2BUAs) can be used. This specification does not preclude these or other approaches for implementing such services. The peer-to-peer design and principles of these service examples are described in the Multiparty Framework document [FRAMEWORK].
Johnston, et al. Best Current Practice [Page 3]
RFC 5359 SIP Service Examples October 2008
These flows assume the functionality described in the SIP Call Flow Examples document [RFC3665], which explores basic SIP behavior. Some of the scenarios described herein make use of the SIP method extension REFER [RFC3515], the SIP header extension Replaces [RFC3891], and the SIP header extension Join [RFC3911]. The SIP Events document [RFC3265] describes the use of SUBSCRIBE and NOTIFY, while the SIP Dialog Event Package document [RFC4235] describes the dialog event package. Some examples make use of the GRUU (Globally Routable User Agent URI) extension [GRUU].
These flows were prepared assuming a network of proxies, registrars, and other SIP servers. The use of Secure SIP URIs (sips) is shown throughout this document, implying TLS transport on each hop with assumed certificate validation. However, other security approaches can be used. The use of Digest authentication is shown in some examples.
The emphasis in these call flows is the SIP signaling exchange. As a result, only very simple SDP offer/answer exchanges are shown with audio media. These flows apply equally well for other media and multimedia sessions. For more advanced examples of SDP offer/answer exchanges, refer to [RFC4317].
Each call flow is presented with a textual description of the scenario, a message flow diagram showing the messages exchanged between separate network elements, and the detailed contents of each message shown in the diagram.
For simplicity in reading and editing the document, there are a number of differences between some of the examples and actual SIP messages. For example, the HTTP Digest responses are not actual MD5 encodings. Call-IDs are often repeated, and CSeq counts often begin at 1. Header fields are usually shown in the same order. Usually only the minimum required header field set is shown. Also, message body content lengths are often not calculated, but instead shown as "..." where the actual octet count would be.
Alice Proxy Bob | INVITE F1 | | |--------------->| | | | INVITE F2 | |(100 Trying) F3 |------------->| |<---------------| | | |180 Ringing F4| | 180 Ringing F5 |<-------------| |<---------------| | | | 200 OK F6 | | 200 OK F7 |<-------------| |<---------------| | | ACK F8 | | |--------------->| ACK F9 | | |------------->| | Both way RTP Established | |<=============================>| | |INVITE(hold) F10 |INVITE(hold) F11|<-------------| |<---------------| | | 200 OK F12 | | |--------------->| 200 OK F13 | | |------------->| | | ACK F14 | | ACK F15 |<-------------| |<---------------| | | No RTP Sent! | | | INVITE F16 | | INVITE F17 |<-------------| |<---------------| | | 200 OK F18 | | |--------------->| 200 OK F19 | | |------------->| | | ACK F20 | | ACK F21 |<-------------| |<---------------| | | Both way RTP Established | |<=============================>| | BYE F22 | | |--------------->| BYE F23 | | |------------->| | | 200 OK F24 | | 200 OK F25 |<-------------| |<---------------| |
Johnston, et al. Best Current Practice [Page 6]
RFC 5359 SIP Service Examples October 2008
In this scenario, Alice calls Bob, then Bob places the call on hold. Bob then takes the call off hold, then Alice hangs up the call. Note that hold is unidirectional in nature. However, a UA that places the other party on hold will generally also stop sending media, resulting in no media exchange between the UAs. Older UAs may set the connection address to 0.0.0.0 when initiating hold. However, this behavior has been deprecated in favor or using the a=inactive SDP attribute if no media is sent, or the a=sendonly attribute if media is still sent.
Also note the use of the rendering feature tag defined in RFC 4235 [RFC4235] used in F10 and F11 to indicate that Bob's UA is no longer rendering media to Bob, i.e., that Bob has placed the call on hold.
In this scenario, Alice calls Bob. Bob places call on hold. Bob calls Carol. Bob then disconnects with Carol, then takes the call with Alice off hold. The call ends when Alice hangs up.
Also note the use of the rendering feature tag defined in RFC 4235 [RFC4235] used in F10 to indicate that Bob's UA is no longer rendering media to Bob, i.e., that Bob has placed the call on hold.
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds22 ;received=192.0.2.105 Record-Route: <sips:ss1.example.com;lr> From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=456654
BYE sips:carol@client.chicago.example.com SIP/2.0 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds7j Route: <sips:ss1.example.com;lr> Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=456654 Call-ID: 9876543210@biloxi.example.com CSeq: 2 BYE Content-Length: 0
F26 BYE Proxy 1 -> Carol
BYE sips:carol@client.chicago.example.com SIP/2.0 Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749k.1 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds7j ;received=192.0.2.105 Max-Forwards: 69 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=456654 Call-ID: 9876543210@biloxi.example.com CSeq: 2 BYE Content-Length: 0
F27 200 OK Carol -> Proxy 1
SIP/2.0 200 OK Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749k.1 ;received=192.0.2.54 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds7j ;received=192.0.2.105 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=456654
Alice Bob Music Server | | | | INVITE F1 | | |--------------->| | | 180 Ringing F2 | | |<---------------| | | 200 OK F3 | | |<---------------| | | ACK F4 | | |--------------->| | | RTP | | |<==============>| | | | | | Bob places Alice on hold | | | | | INVITE (hold) F5 | |<---------------| | | 200 OK F6 | | |--------------->| | | ACK F7 | | |<---------------| | | no RTP | | | | | | Bob initiates music on hold | | | | | | REFER Refer-To: A F8 | |------------->| | | 202 F9 | | |<-------------| | | NOTIFY F10 | | |<-------------| | | 200 F11 | | |------------->| | INVITE F12 Replaces: B | |<------------------------------| | 200 OK F13 | |------------------------------>| | ACK F14 | |<------------------------------| | RTP Music | |<==============================| | BYE F15 | | |--------------->| NOTIFY F17 | | 200 OK F16 |<-------------| |<---------------| 200 OK F18 | | |------------->|
Johnston, et al. Best Current Practice [Page 38]
RFC 5359 SIP Service Examples October 2008
| | | | The music on hold is complete | | | | | Bob takes Alice off hold | | | | | INVITE Replaces: M F19 | |<---------------| | | 200 OK F20 | | |--------------->| | | ACK F21 | | |<---------------| | | RTP | | |<==============>| | | BYE F22 | |------------------------------>| | 200 OK F23 | |<------------------------------|
In this flow, Bob places Alice on hold with music. This is performed by Bob sending a REFER to a Music Server that sends an INVITE with Replaces to Alice. The Music Server then sends RTP music to Alice. Bob picks the call up from hold by sending an INVITE with Replaces to Alice.
Note the use of the rendering feature tag defined in RFC 4235 [RFC4235] used in F5 to indicate that Bob's UA is no longer rendering media to Bob, i.e., that Bob has placed the call on hold. Feature tags are also used in F12 with the automaton (defined in RFC 3840 [RFC3840]) and byeless feature tags (defined in RFC 4235 [RFC4235]) to describe the capabilities of the Music Server.
Should Alice not wish to receive music on hold, her UA could refuse F12 and she will remain on hold with Bob, but in silence.
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
Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=02134 To: Music Server <sips:music@server.example.com> Call-ID: 4802029847@biloxi.example.com CSeq: 1 REFER <allOneLine> Refer-To: <sips:a8342043f@atlanta.example.com;gr?Replaces= 12345600%40atlanta.example.com%3Bfrom-tag%3D23431 %3Bto-tag%3D1234567&Require=replaces> </allOneLine> Referred-By: <sips:bob@biloxi.example.com> Contact: <sips:bob@client.biloxi.example.com> Content-Length: 0
F9 202 Accepted Music Server -> Bob
SIP/2.0 202 Accepted Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds9 ;received=192.0.2.105 From: Bob <sips:bob@biloxi.example.com>;tag=02134 To: Music Server <sips:music@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com Contact: <sips:music@server.example.com> CSeq: 1 REFER Content-Length: 0
F10 NOTIFY Music Server -> Bob
NOTIFY sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bT6 To: Bob <sips:bob@biloxi.example.com>;tag=02134 Max-Forwards: 70 From: Music Server <sips:music@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 1 NOTIFY Event: refer Subscription-State: active;expires=60 Contact: <sips:music@server.example.com> Content-Type: message/sipfrag Content-Length: ...
SIP/2.0 100 Trying
Johnston, et al. Best Current Practice [Page 43]
RFC 5359 SIP Service Examples October 2008
F11 200 OK Bob -> Music Server
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bT6 ;received=192.0.2.103 To: Bob <sips:bob@biloxi.example.com>;tag=02134 From: Music Server <sips:music@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 1 NOTIFY Content-Length: 0
/* Music Server places call to Alice to replace session between Alice and Bob. */
BYE sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bKnashds7 Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=23431 Call-ID: 12345600@atlanta.example.com
Johnston, et al. Best Current Practice [Page 45]
RFC 5359 SIP Service Examples October 2008
CSeq: 2 BYE Content-Length: 0
F16 200 OK Bob -> Alice
SIP/2.0 200 OK Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bKnashds7 ;received=192.0.2.105 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=23431 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
/* Music Server reports success back to Bob by returning a 200 OK response. Bob obtains the dialog identifiers from the headers included in the response. */
F17 NOTIFY Music Server -> Bob
NOTIFY sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bf9 To: Bob <sips:bob@biloxi.example.com>;tag=02134 Max-Forwards: 70 From: Music Server <sips:music@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 2 NOTIFY Event: refer Subscription-State: terminated;reason=noresource Contact: <sips:music@server.example.com> Content-Type: message/sipfrag Content-Length: ...
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74rf ;received=192.0.2.103 From: <sips:music@server.example.com>;tag=0111 To: <sips:a8342043f@atlanta.example.com;gr>;tag=098594 Call-ID: a5-75-34-12-76@server.example.com CSeq: 1 INVITE Contact: <sips:a8342043f@atlanta.example.com;gr>
Johnston, et al. Best Current Practice [Page 46]
RFC 5359 SIP Service Examples October 2008
F18 200 OK Bob -> Music Server
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bf9 ;received=192.0.2.103 To: Bob <sips:bob@biloxi.example.com>;tag=02134 From: Music Server <sips:music@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 2 NOTIFY Content-Length: 0
/* Alice is now parked at the Music Server. */
/* Bob picks up the call by sending an INVITE to Alice, who replaces the existing session with the Music Server. */
In this scenario, Bob calls Alice. Alice then transfers Bob to Carol, then Alice disconnects with Bob. Bob establishes the session to Carol then reports the success back to Alice in the NOTIFY in F15. If the transfer fails, Bob can send a new INVITE back to Alice to re- establish the session.
Despite the BYE sent by Alice in F9, the dialog between Alice and Bob still exists until the subscription created by the REFER has terminated (either due to a NOTIFY containing a Subscription-State: terminated;reason=noresource header field, as in F15, or a 481 response to a NOTIFY).
For more about call transfer, see the transfer document [TRANSFER].
SIP/2.0 180 Ringing Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds1 ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=928287 Call-ID: 7436222@atlanta.example.com CSeq: 1 INVITE Contact: <sips:carol@client.chicago.example.com> Content-Length: 0
F13 200 OK Carol -> Bob
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds1 ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=928287
In this scenario, Alice calls Bob. Bob puts Alice on hold then calls Carol to announce transfer, then places Carol on hold. Bob transfers Alice to Carol, which replaces the session between Bob and Carol. Carol then disconnects session with Bob. Alice reports success of transfer to Bob, who then disconnects with Alice. In this example, the Replaces header field [RFC3891] is inserted into the Refer-To URI by Bob. Note that the Refer-To URI is the Contact URI returned by Carol in the 200 OK response F10. This ensures that only the correct instance of Carol is reached. The presence of the gr URI parameter in the Contact URI in message F10 indicates that the Contact URI is a GRUU [GRUU] and will be globally routable outside of the dialog. Without knowing the Contact URI is a gruu, Bob must be prepared, if the triggered INVITE had failed, to retry the REFER with a Refer-To URI of the URI used to reach Carol but with a Require: replaces header escaped in the Refer-To header field, as discussed in the transfer document [TRANSFER].
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
SIP/2.0 180 Ringing Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnash ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=5f35a3 Call-ID: sdjfdjfskdf@biloxi.example.com CSeq: 42 INVITE Contact: <sips:39itp34klkd@chicago.example.com> Content-Length: 0
F10 200 OK Carol -> Bob
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnash ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=5f35a3 Call-ID: sdjfdjfskdf@biloxi.example.com
SIP/2.0 202 Accepted Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds2g ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=23431 To: Alice <sips:alice@atlanta.example.com>;tag=1234567 Call-ID: 12345600@atlanta.example.com Contact: <sips:alice@client.atlanta.example.com> CSeq: 1025 REFER Content-Length: 0
F17 NOTIFY Alice -> Bob
NOTIFY sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bfK Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=23431
SIP/2.0 200 OK Via: SIP/2.0/TLS chicago.example.com:5061 ;branch=z9hG4bKadfe4ko ;received=192.0.2.103 To: Carol <sips:39itp34klkd@chicago.example.com>;tag=ff3a From: Alice <sips:alice@atlanta.example.com>;tag=3461 Call-ID: 9435674543@atlanta.example.com CSeq: 1 INVITE Contact: <sips:39itp34klkd@chicago.example.com>
F25 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=23431 Call-ID: 12345600@atlanta.example.com CSeq: 3 NOTIFY Content-Length: 0
/* Bob disconnects with Alice. */
F26 BYE Bob -> Alice
BYE sips:alice@client.atlanta.example.com SIP/2.0 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds7P Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=23431 To: Alice <sips:alice@atlanta.example.com>;tag=1234567 Call-ID: 12345600@atlanta.example.com CSeq: 1026 BYE Content-Length: 0
F27 200 OK Alice -> Bob
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds7P
Johnston, et al. Best Current Practice [Page 70]
RFC 5359 SIP Service Examples October 2008
;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=23431 To: Alice <sips:alice@atlanta.example.com>;tag=1234567 Call-ID: 12345600@atlanta.example.com CSeq: 1026 BYE Content-Length: 0
Alice Bob Carol | | | | INVITE F1 | | |------------->| | | 180 Ringing F2 | |<-------------| | | 200 OK F3 | | |<-------------| | | ACK F4 | | |------------->| | | Both way RTP Established | |<============>| | | | MESSAGE F5 | | |------------------>| | | 200 OK F6 | | |<------------------| | | | | INVITE Replaces:A-B F7 | |<---------------------------------| | 200 OK F8 | |--------------------------------->| | ACK F9 | |<---------------------------------| | Both way RTP Established | |<================================>| | BYE F10 | | |------------->| | | 200 OK F11 | | |<-------------| | | |
In this scenario, Alice and Bob establish a session between them. Bob wants Carol to take the call and so sends an Instant Message (IM) to Carol containing Alice's URI and an embedded Replaces header field. If Carol clicks on the URI, Carol's SIP UA sends an INVITE to Alice, which replaces the session with Bob.
Johnston, et al. Best Current Practice [Page 71]
RFC 5359 SIP Service Examples October 2008
This scenario shows the use of the SIP MESSAGE [RFC3428] method to pass the URI. However, another IM protocol or other method could have been used to pass the URI from Bob to Carol.
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: ...
From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com> Call-ID: sdjfdjfskdf@biloxi.example.com CSeq: 42 MESSAGE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE Supported: replaces Content-Type: text/html Content-Length: ...
<HTML>Do you want to take this call from <allOneLine> <A HREF="sips:a8342043f@atlanta.example.com;gr?Replaces= 12345600@atlanta.example.com%3Bto-tag%3D3145678 %3Bfrom-tag%3D1234567&Require=replaces"> Alice</A>? </allOneLine> </HTML>
F6 200 OK Carol -> Bob
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnash ;received=192.0.2.113 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=5f35a3 Call-ID: sdjfdjfskdf@biloxi.example.com CSeq: 42 MESSAGE Contact: <sips:carol@client.chicago.example.com> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE Supported: replaces Content-Length: 0
/* Carol takes the call from Bob. */
F7 INVITE Carol -> 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: Carol <sips:carol@chicago.example.com>;tag=8675310 To: Alice <sips:a8342043f@atlanta.example.com;gr> Call-ID: 563456212@b2.chicago.example.com CSeq: 1 INVITE Require: replaces
Alice Proxy Gateway | | | | INVITE F1 | | |--------------->| | |(100 Trying) F2 | | |<---------------| | | (181 Call Is Being Forwarded) F3 |<---------------| INVITE F4 | | |------------->| | |180 Ringing F5| | 180 Ringing F6 |<-------------| |<---------------| 200 OK F7 | | 200 OK F8 |<-------------| |<---------------| | | ACK F9 | | |--------------->| ACK F10 | | |------------->| | Both way RTP Established | |<=============================>| | BYE F11 | | |--------------->| BYE F12 | | |------------->| | | 200 OK F13 | | 200 OK F14 |<-------------| |<---------------| | | | |
Bob wants all calls forwarded to the Public Switched Telephone Network (PSTN) (which is just another URI to the proxy server). Alice calls Bob. The proxy server rewrites the Request URI, and forwards the INVITE to a Gateway. Details of messaging behind the Gateway are not shown.
Note that the 181 Call is Being Forwarded response is shown as sent by the proxy. Strictly speaking, the proxy is behaving as a user agent in this case as a proxy cannot generate non-100 provisional responses.
Note also that forwarding could be accomplished using a redirect (302 Moved Temporarily response).
Johnston, et al. Best Current Practice [Page 77]
RFC 5359 SIP Service Examples October 2008
Message Details
F1 INVITE Alice -> Proxy 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:alice@client.atlanta.example.com> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY Content-Type: application/sdp Content-Length: ...
SIP/2.0 100 Trying 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> Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE Content-Length: 0
F3 (181 Call is Being Forwarded) Proxy -> Alice
SIP/2.0 181 Call is Being Forwarded 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=9214d
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159 Call-ID: 12345600@atlanta.example.com CSeq: 1 ACK Content-Length: 0
F11 BYE Alice -> Proxy
BYE sips:+19727293660@gw1.example.com;user=phone SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bfJe Route: <sips:ss1.example.com;lr> Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
F12 BYE Proxy -> Gateway
BYE sips:+19727293660@gw1.example.com;user=phone SIP/2.0 Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749G1 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bfJe ;received=192.0.2.103 Max-Forwards: 69 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
F13 200 OK Gateway -> Proxy
SIP/2.0 200 OK Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749G1 ;received=192.0.2.54 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bfJe ;received=192.0.2.103 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159
Bob wants calls to B1 forwarded to B2 if B1 is busy (this information is known to the proxy). Alice calls B1, B1 is busy, the proxy server places call to B2.
SIP/2.0 100 Trying 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> Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE Content-Length: 0
F4 486 Busy Here B1 -> Proxy
SIP/2.0 486 Busy Here Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749.1 ;received=192.0.2.54 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=765432 Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE Content-Length: 0
F5 ACK Proxy -> B1
ACK sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS ss1.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=765432 Call-ID: 12345600@atlanta.example.com CSeq: 1 ACK Content-Length: 0
F6 (181 Call is Being Forwarded) Proxy -> Alice
SIP/2.0 181 Call is Being Forwarded Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bf9 ;received=192.0.2.103
Johnston, et al. Best Current Practice [Page 86]
RFC 5359 SIP Service Examples October 2008
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=9214d Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE Content-Length: 0
From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=7654321 Call-ID: 12345600@atlanta.example.com CSeq: 1 ACK Content-Length: 0
/* RTP streams are established between Alice and B2. */
/* Alice eventually hangs up with User B2. */
F14 BYE Alice -> Proxy
BYE sips:bob@client2.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bW4 Route: <sips:ss1.example.com;lr> Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=7654321 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
F15 BYE Proxy -> B2
BYE sips:bob@client2.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK837493 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bW4 ;received=192.0.2.103 Max-Forwards: 69 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=7654321 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
;branch=z9hG4bK74bW4 ;received=192.0.2.103 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=7654321 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
F17 200 OK Proxy -> Alice
SIP/2.0 200 OK Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bK74bW4 ;received=192.0.2.103 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=7654321 Call-ID: 12345600@atlanta.example.com CSeq: 2 BYE Content-Length: 0
Bob wants calls to B1 forwarded to B2 if B1 is not answered (information is known to the proxy server). Alice calls B1 and no one answers. The proxy server then places the call to B2.
/* B1 rings until a configurable timer expires in the proxy. The proxy sends Cancel and proceeds down the list of routes. */
F6 CANCEL Proxy -> B1
CANCEL sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS ss1.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> Call-ID: 12345600@atlanta.example.com CSeq: 1 CANCEL Content-Length: 0
F7 200 OK B1 -> Proxy
SIP/2.0 200 OK Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749.1 ;received=192.0.2.54 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=329d823 Call-ID: 12345600@atlanta.example.com CSeq: 1 CANCEL Content-Length: 0
F8 487 Request Terminated B1 -> Proxy
SIP/2.0 487 Request Terminated Via: SIP/2.0/TLS ss1.example.com:5061 ;branch=z9hG4bK83749.1 ;received=192.0.2.54 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
Johnston, et al. Best Current Practice [Page 95]
RFC 5359 SIP Service Examples October 2008
F9 ACK Proxy -> B1
ACK sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS ss1.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
F10 (181 Call is Being Forwarded) Proxy -> Alice
SIP/2.0 181 Call is Being Forwarded 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=9214d Call-ID: 12345600@atlanta.example.com CSeq: 1 INVITE Content-Length: 0
In this scenario, Alice and Bob are in a 2-party call (session) when Bob wishes to add Carol into the conversation. Bob is capable of media mixing in a 3-party call. Bob first sends a re-INVITE to Alice, changing Contact URIs to one that indicates Bob's mixer and acts like a focus. As a result, Bob includes the "isfocus" feature tag [RFC3840] as described in [RFC4579]. Bob then INVITEs Carol using the same Contact URI. Note that Bob could wait to re-INVITE Alice until after Carol has answered. Bob could also put Alice on hold before calling Carol.
In this scenario, Alice and Bob are in a 2-party call and Carol wishes to join, resulting in a 3-party call. Carol could have learned Bob's dialog identifier using some non-SIP means, or possibly from a NOTIFY with the dialog package sent by Bob. Carol sends an INVITE to Bob containing a Join header identifying the dialog between Alice and Bob. Bob re-INVITEs Alice to switch to focus mode and includes the "isfocus" feature tag [RFC3840] as described in [RFC4579]. Bob then accepts the INVITE from Carol, resulting in the 3-way call.
Alice's call to Bob will result in an attempt to locate Bob by calling locations from a list of contacts. The location to answer the call becomes the active set; no other sets may join the call.
While this flow shows a sequential search, the search could be accomplished using parallel forking.
Message Details
F1 INVITE Alice -> Proxy
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:alice@client.atlanta.example.com> Content-Type: application/sdp Content-Length: ...
Bob has an incoming call screening list; Alice is included on the list of addresses from which Bob will not accept calls. Alice attempts to call Bob. Messages F1, F2, and F3 are included to show that Bob does not accept INVITEs that have not been screened by the proxy.
Note that call screening cannot be done using the From header -- instead some form of authentication credentials must be used.
Johnston, et al. Best Current Practice [Page 125]
RFC 5359 SIP Service Examples October 2008
The screening proxy inserts an announcement URI in an Error-Info header field, which Alice accesses by sending an INVITE to listen to the Announcement. The Announcement Server uses the automaton and rendering feature tags in F12 and F13 to indicate that it is a media server only capable of playing announcements.
Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=234934 Call-ID: 12345600@atlanta.example.com CSeq: 4 ACK Content-Length: 0
/* Announcement Server plays announcement then disconnects. */
F13 BYE Announcement Server -> Alice
BYE sips:alice@client.atlanta.example.com SIP/2.0 Via: SIP/2.0/TLS announcement.example.com:5061 ;branch=z9hG4bK74bKS Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=234934 To: Alice <sips:alice@atlanta.example.com>;tag=1234567 Call-ID: 12345600@atlanta.example.com CSeq: 2334 BYE Content-Length: 0
F14 200 OK Alice -> Announcement Server
SIP/2.0 200 OK Via: SIP/2.0/TLS announcement.example.com:5061 ;branch=z9hG4bK74bKS ;received=192.0.2.103 From: Bob <sips:bob@biloxi.example.com>;tag=234934 To: Alice <sips:alice@atlanta.example.com>;tag=1234567 Call-ID: 12345600@atlanta.example.com CSeq: 2334 BYE Content-Length: 0
Alice has an outgoing call screening list; Bob is included on the list of addresses to which Alice will not be able to place a call. Alice attempts to call Bob.
Alice could establish a session to listen to the announcement in the Error-Info header field.
Alice Bob Park Server Carol | | | | | INVITE F1 | | | |------------->| | | |180 Ringing F2| | | |<-------------| | | | 200 OK F3 | | | |<-------------| | | | ACK F4 | | | |------------->| | | | RTP Media | | | |<============>| | | | Bob Parks Call | | | | REFER Refer-To: A F5 | | |------------->| | | | 202 F6 | | | |<-------------| | | | NOTIFY F7 | | | |<-------------| | | | 200 F8 | | | |------------->| | | INVITE F9 Replaces: B | | |<----------------------------| | | 200 OK F10 | | |---------------------------->| | | ACK F11 | | |<----------------------------| | | RTP Music | | |<===========================>| | | BYE F12 | | | |------------->| NOTIFY F14 | | | 200 OK F13 |<-------------| | |<-------------| 200 OK F15 | | | |------------->| | | | Carol picks up the call | | | | | | | | SUBSCRIBE F16| | | |<-------------| | | | 200 OK F17 | | | |------------->| | | | NOTIFY F18 | | | |------------->| | | | 200 OK F19 | | | |<-------------| | INVITE Replaces: Park Server F20 | |<-------------------------------------------|
Johnston, et al. Best Current Practice [Page 135]
RFC 5359 SIP Service Examples October 2008
| | | 200 F21 | |------------------------------------------->| | | | ACK F22 | |<-------------------------------------------| | RTP Media | |<==========================================>| | BYE F23 | | |---------------------------->| | | 200 OK F24 | | |<----------------------------| | | No more RTP Music | |
In this example, Alice calls Bob. Bob then parks the call at the Park Server by sending a REFER to the Park Server. The server sends an INVITE to Alice, which replaces the session between Alice and Bob. The Park Server utilizes the automaton, rendering, and byeless feature tags in F9 to indicate its capabilities to Alice. The call is accepted by Alice and causes Alice to send a BYE to Bob. Bob receives notification of the successful park, and also receives the dialog identifiers in the application/sip body of the NOTIFY response.
Carol wishes to retrieve the call, so she sends an INVITE containing the dialog identifiers to Alice, which replaces the session with the Park Server. Alice accepts the call and sends a BYE to the Park Server. Carol obtains the dialog identifiers from a NOTIFY from the Park Server.
Note that this call flow is a special case of call transfer.
Note also that this flow could also be used for Music on Hold.
/* Bob REFERs Park Server to establish session with Alice, which replaces the established session between Alice and Bob. Note that there is no session established between Bob and the Park Server. */
F5 REFER Bob -> Park Server
REFER sips:park@server.example.com SIP/2.0 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds9 Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=02134 To: Park Server <sips:park@server.example.com> Call-ID: 4802029847@biloxi.example.com CSeq: 1 REFER <allOneLine> Refer-To: <sips:a8342043f@atlanta.example.com;gr?Replaces= 12345601%40atlanta.example.com%3Bfrom-tag%3D314159 %3Bto-tag%3D1234567&Require=replaces> </allOneLine> Referred-By: <sips:bob@biloxi.example.com> Contact: <sips:bob@client.biloxi.example.com> Content-Length: 0
F6 202 Accepted Park Server -> Bob
SIP/2.0 202 Accepted Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashds9 ;received=192.0.2.105 From: Bob <sips:bob@biloxi.example.com>;tag=02134 To: Park Server <sips:park@server.example.com>;tag=56323
NOTIFY sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bT6 To: Bob <sips:bob@biloxi.example.com>;tag=02134 Max-Forwards: 70 From: Park Server <sips:park@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 1 NOTIFY Event: refer Contact: <sips:park@server.example.com> Subscription-State: active;expires=60 Content-Type: message/sipfrag Content-Length: ...
SIP/2.0 100 Trying
F8 200 OK Bob -> Park Server
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bT6 ;received=192.0.2.103 To: Bob <sips:bob@biloxi.example.com>;tag=02134 From: Park Server <sips:park@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 1 NOTIFY Content-Length: 0
/* Park Server places call to Alice to replace session between Alice and Bob. */
BYE sips:bob@client.biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bKnashds7 Max-Forwards: 70 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159 Call-ID: 12345601@atlanta.example.com CSeq: 2 BYE Content-Length: 0
F13 200 OK Bob -> Alice
SIP/2.0 200 OK Via: SIP/2.0/TLS client.atlanta.example.com:5061 ;branch=z9hG4bKnashds7 ;received=192.0.2.105 From: Alice <sips:alice@atlanta.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>;tag=314159 Call-ID: 12345601@atlanta.example.com CSeq: 2 BYE Content-Length: 0
/* Park Server reports success back to Bob by returning a 200 OK response. Bob obtains the dialog identifiers from the headers included in the response. */
To: Bob <sips:bob@biloxi.example.com>;tag=02134 Max-Forwards: 70 From: Park Server <sips:park@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 2 NOTIFY Event: refer Subscription-State: terminated;reason=noresource Contact: <sips:park@server.example.com>;automaton ;+sip.byeless;+sip.rendering="no" Content-Type: message/sipfrag Content-Length: ...
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74rf ;received=192.0.2.103 From: <sips:park@server.example.com>;tag=0111 To: <sips:a8342043f@atlanta.example.com;gr>;tag=098594 Call-ID: a5-75-34-12-76@server.example.com CSeq: 1 INVITE Contact: <sips:a8342043f@atlanta.example.com;gr>
F15 200 OK Bob -> Park Server
SIP/2.0 200 OK Via: SIP/2.0/TLS server.example.com:5061 ;branch=z9hG4bK74bf9 ;received=192.0.2.103 To: Bob <sips:bob@biloxi.example.com>;tag=02134 From: Park Server <sips:park@server.example.com>;tag=56323 Call-ID: 4802029847@biloxi.example.com CSeq: 2 NOTIFY Content-Length: 0
/* Alice is now parked at the Park Server. */
/* Carol picks up the call by sending an INVITE to A, which replaces the existing session with the Park Server. Carol needs to know the dialog information to construct the Replaces header. */
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.
Johnston, et al. Best Current Practice [Page 147]
RFC 5359 SIP Service Examples October 2008
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.
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>
/* Alice stops Bob's phone from ringing by sending a CANCEL. */
Johnston, et al. Best Current Practice [Page 151]
RFC 5359 SIP Service Examples October 2008
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
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
Johnston, et al. Best Current Practice [Page 153]
RFC 5359 SIP Service Examples October 2008
2.17. Automatic Redial Alice Bob | | | INVITE F1 | |--------------->| |486 Busy Here F2| |<---------------| Bob is busy | ACK F3 | |--------------->| | SUBSCRIBE F4 | |--------------->| | 200 OK F5 | |<---------------| | NOTIFY F6 | |<---------------| | 200 OK F7 | |--------------->| | | | NOTIFY F8 | Bob is now available |<---------------| | 200 OK F9 | |--------------->| | | | INVITE F10 | |--------------->| Session setup successful | 180 Ringing F11| |<---------------| | 200 OK F12 | |<---------------| | ACK F13 | |--------------->| | Media Session | |<==============>| | | | NOTIFY F14 | |<---------------| | 200 OK F15 | |--------------->| | | | SUBSCRIBE F16 | Alice terminates subscription |--------------->| | 200 OK F17 | |<---------------| | NOTIFY F18 | |<---------------| | 200 OK F19 | |--------------->| | |
Johnston, et al. Best Current Practice [Page 154]
RFC 5359 SIP Service Examples October 2008
Bob is initially busy when Alice calls. Alice subscribes to Bob's call state using a SUBSCRIBE F4. Bob sends a NOTIFY F8 when Bob is available. Alice is alerted, then Alice sends an INVITE to Bob to establish the session. The subscription is terminated using SUBSCRIBE F16.
SIP/2.0 200 OK Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bK4bnd2 ;received=192.0.2.105 From: Bob <sips:bob@biloxi.example.com>;tag=341123 To: Alice <sips:alice@atlanta.example.com>;tag=837348234
In this example, while browsing the web on his PC, Bob clicks on Carol's SIP URI, intending to establish a session with Carol. Bob's web browser passes the SIP URI to the SIP client on Bob's PC. The PC client is configured with the URI of Bob's SIP phone. A REFER is sent to the SIP phone, which results in the establishment of the session between Bob and Carol.
Note that Bob's PC requests that no REFER dialog be established by the use of the Refer-Sub: false header field [RFC4488].
This flow is preferable to the 3pcc flow because the end-to-end SIP signaling is not interrupted by the 3pcc controller, and because Bob's experience of the call will not be marred by the lack of ringback tone or possible clipping. Suitable authorization of the REFER and explicit authorization of the triggered INVITE by Bob are necessary.
Message Details
/* Bob's PC SIP client sends a REFER to Bob's SIP phone. */
F1 REFER PC -> Bob
REFER sips:bob@biloxi.example.com SIP/2.0 Via: SIP/2.0/TLS pc.biloxi.example.com:5061 ;branch=z9hG4bKnashds7 Max-Forwards: 70 From: <sips:pc.biloxi.example.com>;tag=1234567 To: Bob <sips:bob@biloxi.example.com>
ACK sips:carol@client.chicago.example.com SIP/2.0 Via: SIP/2.0/TLS client.biloxi.example.com:5061 ;branch=z9hG4bKnashd43 Max-Forwards: 70 From: Bob <sips:bob@biloxi.example.com>;tag=8675309 To: Carol <sips:carol@chicago.example.com>;tag=928287
Since many of the examples in this document involve SIP call control, either peer-to-peer or 3pcc, the security considerations in the Multiparty Framework document [FRAMEWORK] apply.
Many of the services shown in this document rely on a particular user agent being part of a group. Members of a group could be, for example, employees within a particular department, a set of home phone extensions, members of a call center, etc. As such, user agents that are part of the group permit other group members special privileges and features. For example, while a user agent may not in general allow another user agent to learn detailed dialog information, this information might be shared with another group member in order to facilitate a service such as call pickup. Group members must be authenticated using normal SIP means such as certificates or shared secrets.
The service examples in this document make extensive use of the SIP call control primitives REFER, Replaces, Join, and the dialog package. The security considerations associated with each of these extensions [RFC3515], [RFC3891], [RFC3911], [RFC4235] apply to the scenarios in this document.
The authors would like to thank the following reviewers of the document for their detailed comments and corrections: Vijay Gurbani, John Elwell, Joel Repiquet, Nagesh Kumar, Chandra Ravipati, Eric Burger, Jeroen Bemmel, Miguel Garcia, and Dale Worley.
The Transfer - Instant Messaging call flow is based on the "IM-a- call" call flow by Jonathan Rosenberg and Henning Schulzrinne. The Automatic Redial call flow is based on a call flow by Adam Roach. The authors wish to thank the following individuals for their assistance and review of this call flows document: Joel Repiquet, Aki Neimi, Rohan Mahy, Jonathan Rosenberg, Hemant Agrawal, Henry Sinnreich, Dean Willis, David Devanatham, Joe Pizzimenti, Matt Cannon, John Hearty, the whole MCI WorldCom IPOP Design team, Scott
Johnston, et al. Best Current Practice [Page 166]
RFC 5359 SIP Service Examples October 2008
Orton, Greg Osterhout, Pat Sollee, Doug Weisenberg, Danny Mistry, Steve McKinnon, and Denise Ingram, Denise Caballero, Tom Redman, Ilya Slain, Pat Sollee, John Truetken, and others from MCI WorldCom, 3Com, Cisco, Lucent, and Nortel.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
[RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with Session Description Protocol (SDP)", RFC 3264, June 2002.
[RFC3265] Roach, A., "Session Initiation Protocol (SIP)-Specific Event Notification", RFC 3265, June 2002.
[RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., and D. Gurle, "Session Initiation Protocol (SIP) Extension for Instant Messaging", RFC 3428, December 2002.
[RFC3515] Sparks, R., "The Session Initiation Protocol (SIP) Refer Method", RFC 3515, April 2003.
[RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Indicating User Agent Capabilities in the Session Initiation Protocol (SIP)", RFC 3840, August 2004.
[RFC3891] Mahy, R., Biggs, B., and R. Dean, "The Session Initiation Protocol (SIP) "Replaces" Header", RFC 3891, September 2004.
[RFC3911] Mahy, R. and D. Petrie, "The Session Initiation Protocol (SIP) "Join" Header", RFC 3911, October 2004.
[RFC4235] Rosenberg, J., Schulzrinne, H., and R. Mahy, "An INVITE- Initiated Dialog Event Package for the Session Initiation Protocol (SIP)", RFC 4235, November 2005.
[RFC4488] Levin, O., "Suppression of Session Initiation Protocol (SIP) REFER Method Implicit Subscription", RFC 4488, May 2006.
Johnston, et al. Best Current Practice [Page 167]
RFC 5359 SIP Service Examples October 2008
[RFC4579] Johnston, A. and O. Levin, "Session Initiation Protocol (SIP) Call Control - Conferencing for User Agents", BCP 119, RFC 4579, August 2006.
[FRAMEWORK] Mahy, R., Sparks, R., Rosenberg, J., Petrie, D., and A. Johnston, "A Call Control and Multi-party usage framework for the Session Initiation Protocol (SIP)", Work in Progress, April 2008.
[GRUU] Rosenberg, J., "Obtaining and Using Globally Routable User Agent (UA) URIs (GRUU) in the Session Initiation Protocol (SIP)", Work in Progress, October 2007.
[RFC3665] Johnston, A., Donovan, S., Sparks, R., Cunningham, C., and K. Summers, "Session Initiation Protocol (SIP) Basic Call Flow Examples", BCP 75, RFC 3665, December 2003.
[RFC3725] Rosenberg, J., Peterson, J., Schulzrinne, H., and G. Camarillo, "Best Current Practices for Third Party Call Control (3pcc) in the Session Initiation Protocol (SIP)", BCP 85, RFC 3725, April 2004.
[RFC4317] Johnston, A. and R. Sparks, "Session Description Protocol (SDP) Offer/Answer Examples", RFC 4317, December 2005.
[RFC4475] Sparks, R., Hawrylyshen, A., Johnston, A., Rosenberg, J., and H. Schulzrinne, "Session Initiation Protocol (SIP) Torture Test Messages", RFC 4475, May 2006.
[TRANSFER] Sparks, R. and A. Johnston, "Session Initiation Protocol Call Control - Transfer", Work in Progress, September 2008.
Johnston, et al. Best Current Practice [Page 168]
RFC 5359 SIP Service Examples October 2008
Authors' Addresses
Alan Johnston (editor) Avaya St. Louis, MO 63124
EMail: alan@sipstation.com
Robert J. Sparks Tekelec
EMail: RjS@nostrum.com
Chris Cunningham Cisco Systems
EMail: chrcunni@cisco.com
Steve Donovan Cisco Systems
EMail: srd@cisco.com
Kevin Summers Sonus Plano, TX 75093
EMail: ksummers@sonusnet.com
Johnston, et al. Best Current Practice [Page 169]
RFC 5359 SIP Service Examples October 2008
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.