SIP WG R. Mahy Internet-Draft Cisco Systems, Inc. Expires: September 30, 2002 B. Biggs R. Dean April 2002 The Session Inititation Protocol (SIP) "Replaces" Header draft-ietf-sip-replaces-02.txt Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http:// www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on September 30, 2002. Copyright Notice Copyright (C) The Internet Society (2002). All Rights Reserved. Abstract This document defines a new header for use with SIP multi-party applications and call control. The Replaces header is used to logically replace an existing SIP dialog with a new SIP dialog. This primitive can be used to enable a variety of features, for example: "Attended Transfer" and "Retrieve from Call Park". Note that definition of these example features is non-normative. Mahy, et al. Expires September 30, 2002 [Page 1] Internet-Draft Replaces April 2002 Table of Contents 1. Conventions . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. User Agent Server Behavior: Receiving a Replaces Header . . 5 4. User Agent Client Behavior: Sending a Replaces header . . . 6 5. Proxy behavior . . . . . . . . . . . . . . . . . . . . . . . 6 6. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6.1 The Replaces Header . . . . . . . . . . . . . . . . . . . . 7 6.2 New option tag for Require and Supported headers . . . . . . 8 6.3 687 Response Code: "Dialog Terminated" . . . . . . . . . . . 8 7. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . 8 7.1 Replacing an Early Dialog at the receiver . . . . . . . . . 8 7.2 Replacing an Early Dialog at the originator . . . . . . . . 10 8. Security Considerations . . . . . . . . . . . . . . . . . . 12 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . 13 9.1 Registration of "Replaces" SIP header . . . . . . . . . . . 13 9.2 Registration of "replaces" SIP Option-tag . . . . . . . . . 13 9.3 Registration of "687" SIP Response code . . . . . . . . . . 13 10. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 13 10.1 Changes Since -01 . . . . . . . . . . . . . . . . . . . . . 13 10.2 Changes Since -00 . . . . . . . . . . . . . . . . . . . . . 14 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 14 Normative References . . . . . . . . . . . . . . . . . . . . 14 Informational References . . . . . . . . . . . . . . . . . . 15 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 15 Full Copyright Statement . . . . . . . . . . . . . . . . . . 17 Mahy, et al. Expires September 30, 2002 [Page 2] Internet-Draft Replaces April 2002 1. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC-2119 [2]. This document refers frequently to the terms "confirmed dialog" and "early dialog". These are defined in Section 12 of SIP [1]. 2. Overview This document describes a SIP [1] extension header field as part of the SIP multiparty applications architecture framework [6]. The Replaces header is used to logically replace an existing SIP dialog with a new SIP dialog. This is especially useful in peer-to-peer call control environments. One use of the "Replaces" header is to replace one participant with another in a multimedia conversation. While this functionality is already available using 3rd party call control [8] style call control, the 3pcc model requires a central point of control which may not be desirable in many environments. As such, a method of performing these same call control primitives in a distributed, peer- to-peer fashion is very desirable. Use of a new INVITE with a new header for dialog matching was chosen over making implicit associations in an incoming INVITE based on call-id or other fields for the following reasons: o An INVITE already has the correct semantics for a new call o Using an explicit Replaces header in a new request makes the intent of the request obvious. o A unique call-id may be given to the replacement call. This avoids call-leg matching problems in any of the clients. o There are no adverse effects if the header is unsupported. The Replaces header enables services such as attended call transfer, retrieve from park, and transition from locally mixed conferences to two party calls in a distributed peer-to-peer way. This list of services is not exhaustive. Although the Replaces header is frequently used in combination with the REFER [4] method as used in cc-transfer [7], they may be used independently. For example, Alice is talking to Bob from phone1. She transfers Bob to a Parking Place while she goes to the lab. When she gets there Mahy, et al. Expires September 30, 2002 [Page 3] Internet-Draft Replaces April 2002 she retrieves the "parked" call from phone2 by sending an INVITE with a Replaces header field to Bob with the dialog information Bob shared with the Parking Place. Alice got this information using some out of band mechansim. Perhaps she subscribed to this information from the Parking Place, or went to a website and clicked on a URI. A short call flow for this example follows. (Via and Max-Forwards headers are omitted for clarity.) Alice Alice Parking phone1 phone2 Bob Place | | | | |<===============================>| | | | | | | Alice transfers Bob to Parking Place | | | | | |------------REFER/200----------->| *1 *2 | | | |--INVITE/200/ACK-->| |<-----------NOTIFY/200-----------|<=================>| |------------BYE/200------------->| | | | | | | | | | | Alice later retrieves call from another phone | | | | | | *3 |-INV w/Replaces->| | | |<--200-----------| | | |---ACK---------->|----BYE/200------->| | |<===============>| | | | | | Message *1: Bob-> Parking Place INVITE sip:parkingplace@sip.org SIP/2.0 To: From: ;tag=7743 Call-ID: 425928@bobster.sip.org CSeq: 1 INVITE Contact: Referred-By: Message *2: Parking Place -> Bob SIP/2.0 200 OK To: ;tag=6472 From: ;tag=7743 Call-ID: 425928@bobster.sip.org CSeq: 1 INVITE Contact: Mahy, et al. Expires September 30, 2002 [Page 4] Internet-Draft Replaces April 2002 Message *3: Alice@phone2 -> Bob INVITE sip:bob@bobster.sip.org To: From: ;tag=8983 Call-ID: 09870@phone2.sip.org CSeq: 1 INVITE Contact: Require: replaces Replaces: 425928@bobster.sip.org;to-tag=7743;from-tag=6472 3. User Agent Server Behavior: Receiving a Replaces Header The Replaces header contains information used to match an existing SIP dialog (call-id, to-tag, and from-tag). Upon receiving an INVITE with a Replaces header, the UA attempts to match this information with a confirmed or early dialog. The to-tag and from-tag are matched as if they were present in an incoming request. In other words the to-tag is compared to the local tag, and the from-tag is compared to the remote tag. If more than one Replaces header field is present in an INVITE, or if a Replaces header field is present in a request other than INVITE, the UAS MUST reject the request with a 400 Bad Request response. The Replaces header has specific call control semantics. If both a Replaces header field and another header field with contradictory semantics are present in a request, the request MUST be rejected with a 400 "Bad Request" response. If the Replaces header field matches more than one dialog, the UA MUST act as if no match is found. If no match is found, the UAS rejects the INVITE and returns a 481 Call/Transaction Does Not Exist response. Likewise, if the Replaces header field matches a dialog which was not created with an INVITE, the UAS MUST reject the request with an appropriate response (ex: 400, 481, or 501). If the Replaces header field matches a dialog which has already terminated, the UA SHOULD decline the request with a 603 Declined response. If the Replaces header field matches a active dialog, the UA SHOULD verify that the initiator of the new INVITE is authorized to replace the matched dialog. If the initiator of the new INVITE has authenticated successfully as equivalent to the user who is being Mahy, et al. Expires September 30, 2002 [Page 5] Internet-Draft Replaces April 2002 replaced, then the replacement is authorized. In addition, the UA MAY use other authorization mechanisms defined for this purpose in standards track extensions. For example, an extension could define a mechanism for transitively asserting authorization of a replacement. If authorization is successful, the UA attempts to accept the new INVITE, reassign the user interface and other resources of the matched dialog to the new INVITE, and shut down the replaced dialog. If the UA cannot accept the new INVITE (for example: it cannot establish required QoS or keying, or it has incompatible media), the UA MUST return an appropriate error response and MUST leave the matched dialog unchanged. If the Replaces header field matches a confirmed dialog, it accepts the new INVITE by sending a 200-class response, and shuts down the replaced dialog by sending a BYE. If the Replaces header field matches an early dialog that was initiated by the UA, it accepts the new INVITE by sending a 200-class response, and shuts down the replaced dialog by sending a CANCEL. If the Replaces header field matches an early dialog that was not initiated by the UA, the UA returns a provisional or final response to the new INVITE which is suitable for the state of the resources used by the matched dialog, and responds to the replaced early dialog with a 687 "Transaction Terminated" response (defined earlier in this document). 4. User Agent Client Behavior: Sending a Replaces header A User Agent that wishes to replace a single existing early or confirmed dialog with a new dialog of its own, MAY send the target User Agent an INVITE request containing a Replaces header field. The UAC places the Call-ID, to-tag, and from-tag information for the target dialog in a single Replaces header field and sends the new INVITE to the target. Note that use of this mechanism does not provide a way to match multiple dialogs, nor does it provide a way to match an entire call, an entire transaction, or to follow a chain of proxy forking logic. For example, if Alice replaces Cathy in an early dialog with Bob, but he does not answer, Alice's replacement request will not match other dialogs to which Bob's UA redirects, nor other branches to which his proxy forwards. 5. Proxy behavior Proxy Servers do not require any new behavior to support this extension. They simply pass the Replaces header field transparently as described in the SIP specification. Mahy, et al. Expires September 30, 2002 [Page 6] Internet-Draft Replaces April 2002 Note that it is possible for a proxy (especially when forking based on some application layer logic, such as caller screening or time-of- day routing) to forward an INVITE request containing a Replaces header field to a completely orthogonal set of Contacts than the original request it was intended to replace. In this case, the INVITE request with the Replaces header field will fail. 6. Syntax 6.1 The Replaces Header The Replaces header field indicates that a single dialog identified by the header field is to be shut down and logically replaced by the incoming INVITE in which it is contained. It is a request header only, and defined only for INVITE requests. The Replaces header field MAY be encrypted as part of end-to-end encryption. Only a single Replaces header field value may be present in a SIP request This document adds the following entry to Table 3 of [1]. Additions to this table are also provided for extension methods defined at the time of publication of this document. This is provided as a courtesy to the reader and is not normative in any way. SUBSCRIBE and NOTIFY, REFER, INFO, UPDATE, and PRACK are defined respectively in [10], [4], [11], [12], and [13]. Header field where proxy ACK BYE CAN INV OPT REG ------------ ----- ----- --- --- --- --- --- --- Replaces R - - - o - - SUB NOT REF INF UPD PRA --- --- --- --- --- --- Replaces R - - - - - - The following syntax specification uses the augmented Backus-Naur Form (BNF) as described in RFC-2234 [3]. Replaces = "Replaces" HCOLON callid *(SEMI replaces-param) replaces-param = to-tag / from-tag / generic-param to-tag = "to-tag" EQUAL token from-tag = "from-tag" EQUAL token A Replaces header MUST contain exactly one to-tag and exactly one from-tag, as they are required for unique dialog matching. For compatibility with dialogs initiated by RFC2543 [5] compliant UAs, a tag of zero matches both tags of zero and null tags. Mahy, et al. Expires September 30, 2002 [Page 7] Internet-Draft Replaces April 2002 Examples: Replaces: 98732@sip.billybiggs.com ;from-tag=r33th4x0r ;to-tag=ff87ff Replaces: 12adf2f34456gs5;to-tag=12345;from-tag=54321 Replaces: 87134@171.161.34.23;to-tag=24796;from-tag=0 6.2 New option tag for Require and Supported headers This specification defines a new Require/Supported header option tag "replaces". UAs which support the Replaces header MUST include the "replaces" option tag in a Supported header field. UAs that want explicit failure notification if Replaces is not supported MAY include the "replaces" option in a Require header field. Example: Require: replaces, 100rel 6.3 687 Response Code: "Dialog Terminated" This specification defines a new SIP response code. The 687 "Dialog Terminated" response code indicates that an early dialog has been completely replaced by a new dialog. A new response code was chosen from the 6xx class to prevent intervening proxies from attempting to fork additional branches of the replaced dialog. 7. Usage Examples The following non-normative examples are not intended to enumerate all the possibilities for the usage of this extension, but rather to provide examples or ideas only. For more examples, please see service-examples [9]. Via and Max-Forwards headers are omitted for clarity and brevity. 7.1 Replacing an Early Dialog at the receiver In this example, a Customer tries calling a call center and for some reason cannot get through properly. The customer calls an Operator and asks for help. The operator calls the contact center, and upon receiving a provisional response, assumes that everything is OK and transfers the Customer to the Call Center, replacing the operator's Mahy, et al. Expires September 30, 2002 [Page 8] Internet-Draft Replaces April 2002 place in the queue. Call Operator Customer Center | | | |<--INVITE/180/200/ACK--| | |<=====================>| "Hello, I'm having | | | trouble calling ..." | |"OK, I'll try it and | | | transfer you if it | | | works for me" | | | | | *1 |-----INVITE ----------------------------------->| *2 |<----182: You are caller number 7---------------| | | | | completes transfer | | | | | |---REFER/200---------->| | | |--INVITE with Replaces->| *3 | |<----182: caller #7-----| *4 |<----687 Dialog Terminated----------------------| *5 |-----ACK--------------------------------------->| |<--NOTIFY/200----------| | |---BYE/200------------>| | | | ...time passes.. | | | | | | | | | | | |<---200 OK--------------| |<--NOTIFY/200----------|----ACK---------------->| | | | | | | Message *1: Operator -> Call Center INVITE sip:helpdesk@clueless.org SIP/2.0 To: From: ;tag=7743 Call-ID: 425928@dhcp23311.acme.com CSeq: 1 INVITE Contact: Accept-Language: en Message *2: Call Center -> Operator SIP/2.0 182 You are 7th in Queue To: ;tag=6472 From: ;tag=7743 Mahy, et al. Expires September 30, 2002 [Page 9] Internet-Draft Replaces April 2002 Call-ID: 425928@dhcp23311.acme.com CSeq: 1 INVITE Contact: Message *3: Customer -> Call Center INVITE sip:helpdesk@frontline.clueless.org To: From: ;tag=8983 Call-ID: 09870@lobby12.acme.com CSeq: 1 INVITE Contact: Replaces: 425928@dhcp23311.acme.com;to-tag=7743;from-tag=6472 Accept-Language: en Referred-By: Message *4: Call Center -> Customer SIP/2.0 182 You are 7th in Queue To: From: ;tag=8983 Call-ID: 09870@lobby12.acme.com CSeq: 1 INVITE Contact: Message *5: Call Center -> Operator SIP/2.0 687 Dialog Terminated To: ;tag=6472 From: ;tag=7743 Call-ID: 425928@dhcp23311.acme.com CSeq: 1 INVITE Contact: 7.2 Replacing an Early Dialog at the originator In this example, Bob just arrived in the lab and hasn't registered there yet. He hears his desk phone ring. He quickly logs into a software UA on a nearby computer. Among other things, the software UA has access to the dialog state of his desk phone. When it notices that his phone is ringing it offers him the choice to take the call there. The software UA sends an INVITE with Replaces to Alice. When Alice's UA receives this new INVITE, it CANCELs her original INVITE and connects Alice to Bob. Bob Bob Alice desk lab Mahy, et al. Expires September 30, 2002 [Page 10] Internet-Draft Replaces April 2002 | | | *1 |-----INVITE----------->| | *2 |<----180---------------| Bob hears desk phone | | | ringing from lab but | | | isn't REGISTERed yet | | | | | |<--fetch dialog state --| | |---response ----------->| *3/4 |<-----INVITE with Replaces/200/ACK--------------| *5/6 |------CANCEL/200------>| | *7 |<-----487--------------| | |------ACK------------->| | | | | | | | Message *1: Alice -> Bob's desk phone INVITE sip:bob@sip.org SIP/2.0 To: From: ;tag=7743 Call-ID: 425928@phone.sip.org CSeq: 1 INVITE Contact: Message *2: Bob's desk phone -> Alice SIP/2.0 180 Ringing To: ;tag=6472 From: ;tag=7743 Call-ID: 425928@phone.sip.org CSeq: 1 INVITE Contact: Message *3: Bob in lab -> Alice INVITE sip:alice@phone.sip.org To: From: ;tag=8983 Call-ID: 09870@labpc.sip.org CSeq: 1 INVITE Contact: Replaces: 425928@phone.sip.org;to-tag=7743;from-tag=6472 Message *4: Alice -> Bob in lab SIP/2.0 200 OK To: ;tag=9232 From: ;tag=8983 Mahy, et al. Expires September 30, 2002 [Page 11] Internet-Draft Replaces April 2002 Call-ID: 09870@labpc.sip.org CSeq: 1 INVITE Contact: Message *5: Alice -> Bob's desk CANCEL sip:bob@sip.org SIP/2.0 To: From: ;tag=7743 Call-ID: 425928@phone.sip.org CSeq: 1 CANCEL Contact: Message *6: Bob's desk -> Alice SIP/2.0 200 OK To: From: ;tag=7743 Call-ID: 425928@phone.sip.org CSeq: 1 CANCEL Contact: Message *7: Bob's desk -> Alice SIP/2.0 487 Request Terminated To: ;tag=6472 From: ;tag=7743 Call-ID: 425928@phone.sip.org CSeq: 1 INVITE Contact: 8. Security Considerations The extension specified in this document significantly changes the relative security of SIP devices. Currently in SIP, even if an eavesdropper learns the Call-ID, To, and From headers of a dialog, they cannot easily modify or destroy that dialog if Digest authentication or end-to-end message integrity are used. This extension can be used to disconnect participants or replace participants in a multimedia conversation. As such, invitations with the Replaces header SHOULD only be accepted if the peer requesting replacement has been properly authenticated using a standard SIP mechanism, and authorized to request a replacement of the target dialog. Some mechanisms for obtaining the dialog information needed by the Mahy, et al. Expires September 30, 2002 [Page 12] Internet-Draft Replaces April 2002 Replaces header (Call-ID, to-tag, and from-tag) include URIs on a web page, subscriptions to an appropriate event package, and notifcations after a REFER request. Use of end-to-end security mechanisms to encrypt this information is also RECOMMENDED. This extension was designed to take advantage of future signature or authorization schemes defined by the SIP Working Group. In general, call control features would benefit considerably from such work. 9. IANA Considerations 9.1 Registration of "Replaces" SIP header Name of Header: Replaces Short form: none Normative description: section 6.1 of this document 9.2 Registration of "replaces" SIP Option-tag Name of option: replaces Description: Support for the SIP Replaces header SIP headers defined: Replaces Normative description: This document 9.3 Registration of "687" SIP Response code Number of response code: 687 Default reason phrase: Dialog Terminated Normative description: section 6.3 of this document 10. Changes 10.1 Changes Since -01 o Removed the to-tag=* matching mechanism, and related proxy requirements and examples based on WG consensus at interim meeting and on the mailing list. Mahy, et al. Expires September 30, 2002 [Page 13] Internet-Draft Replaces April 2002 o Reorganized motivational overview material o Moved extra examples to service-flows o Added authorization language in UAS behavior section o Removed allowance to match on one of multiple matching dialogs with no tags o Updated references 10.2 Changes Since -00 o When no dialog matches the Call-ID and tags in a Replaces header, the UAS now returns a 481 instead of silently accepting the INVITE. o Changed the BNF to match the explicit whitespace BNF now used by SIP. o Added the to-tag=* matching mechanism. o Added requirements for forking proxies and a discussion of the consequences if forking proxies do not support Replaces. o Added last two examples. o Split normative and non-normative references 11. Acknowledgments Thanks to Robert Sparks, Alan Johnston, and Ben Campbell and many other members of the SIP WG for their continued support of the cause of distributed call control in SIP. Normative References [1] Rosenberg, J. and H. Schulzrinne, "SIP: Session Initiation Protocol", draft-ietf-sip-rfc2543bis-09 (work in progress), February 2002. [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [3] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. Mahy, et al. Expires September 30, 2002 [Page 14] Internet-Draft Replaces April 2002 Informational References [4] Sparks, R., "The Refer Method", draft-ietf-sip-refer-04 (work in progress), May 2002. [5] Handley, M., Schulzrinne, H., Schooler, E. and J. Rosenberg, "SIP: Session Initiation Protocol", RFC 2543, March 1999. [6] Mahy, R., "A Multi-party Application Framework for SIP", draft- ietf-sipping-cc-framework-00 (work in progress), March 2002. [7] Sparks, R., "SIP Call Control - Transfer", draft-ietf-sip-cc- transfer-05.txt (work in progress), July 2001. [8] Rosenberg, J., Schulzrinne, H., Camarillo, G. and J. Peterson, "Best Current Practices for Third Party Call Control in the Session Initiation Protocol", draft-ietf-sipping-3pcc-00 (work in progress), May 2002. [9] Johnston, A., "SIP Service Examples", draft-ietf-sipping- service-examples-01 (work in progress), April 2002. [10] Roach, A., "SIP-Specific Event Notification", draft-ietf-sip- events-05 (work in progress), March 2002. [11] Donovan, S., "The SIP INFO Method", RFC 2976, October 2000. [12] Rosenberg, J., "The Session Initiation Protocol UPDATE Method", draft-ietf-sip-update-02 (work in progress), May 2002. [13] Rosenberg, J. and H. Schulzrinne, "Reliability of Provisional Responses in SIP", draft-ietf-sip-100rel-06 (work in progress), February 2002. Authors' Addresses Rohan Mahy Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134 USA EMail: rohan@cisco.com Mahy, et al. Expires September 30, 2002 [Page 15] Internet-Draft Replaces April 2002 Billy Biggs EMail: bbiggs@dumbterm.net Rick Dean EMail: rfc@fdd.com Mahy, et al. Expires September 30, 2002 [Page 16] Internet-Draft Replaces April 2002 Full Copyright Statement Copyright (C) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS 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. Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society. Mahy, et al. Expires September 30, 2002 [Page 17]