idnits 2.17.1 draft-ietf-sip-replaces-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There is 1 instance of lines with control characters in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 156 has weird spacing: '...r field whe...' == Line 803 has weird spacing: '... desk lab ...' == Line 882 has weird spacing: '... desk lab ...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 29, 2002) is 8030 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-07) exists of draft-ietf-sip-refer-02 ** Obsolete normative reference: RFC 2234 (ref. '4') (Obsoleted by RFC 4234) -- Obsolete informational reference (is this intentional?): RFC 2543 (ref. '5') (Obsoleted by RFC 3261, RFC 3262, RFC 3263, RFC 3264, RFC 3265) == Outdated reference: A later version (-12) exists of draft-ietf-sipping-cc-framework-00 == Outdated reference: A later version (-15) exists of draft-ietf-sipping-service-examples-01 Summary: 3 errors (**), 0 flaws (~~), 8 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SIP WG R. Mahy 3 Internet-Draft Cisco Systems, Inc. 4 Expires: October 28, 2002 B. Biggs 5 R. Dean 6 April 29, 2002 8 The SIP Replaces Header 9 draft-ietf-sip-replaces-01.txt 11 Status of this Memo 13 This document is an Internet-Draft and is in full conformance with 14 all provisions of Section 10 of RFC2026. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that 18 other groups may also distribute working documents as Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at http:// 27 www.ietf.org/ietf/1id-abstracts.txt. 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This Internet-Draft will expire on October 28, 2002. 34 Copyright Notice 36 Copyright (C) The Internet Society (2002). All Rights Reserved. 38 Abstract 40 This document proposes a new header for use with the SIP call control 41 architecture. The Replaces header is used in peer-to-peer call 42 control to logically replace an existing SIP dialog with a new SIP 43 dialog. This primitive can be used to enable a variety of features, 44 for example: "Attended Transfer" and "Retrieve from Call Park". Note 45 that definition of these example features is non-normative. 47 Table of Contents 49 1. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 50 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 3. Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 52 3.1 The Replaces Header . . . . . . . . . . . . . . . . . . . . . 4 53 3.2 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 4 54 3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 55 3.4 New option tag for Require and Supported headers . . . . . . . 5 56 3.5 687 Response Code: "Dialog Terminated" . . . . . . . . . . . . 5 57 4. User Agent Behavior: Receiving a Replaces Header . . . . . . . 5 58 4.1 Matching Dialogs . . . . . . . . . . . . . . . . . . . . . . . 5 59 4.2 Matching with Explicit Local Tags . . . . . . . . . . . . . . 6 60 4.3 Matching with the * to-tag . . . . . . . . . . . . . . . . . . 6 61 4.4 Replaces Semantics . . . . . . . . . . . . . . . . . . . . . . 7 62 4.5 Proxy behavior . . . . . . . . . . . . . . . . . . . . . . . . 7 63 4.6 Consequences of a forking proxy not supporting this extension 8 64 5. Usage Examples . . . . . . . . . . . . . . . . . . . . . . . . 9 65 5.1 Replacing an Active Dialog . . . . . . . . . . . . . . . . . . 9 66 5.2 Replacing an Early Dialog initiated by someone else . . . . . 10 67 5.3 Replacing an Early Dialog you initiated . . . . . . . . . . . 12 68 5.4 Handling Replaces for a Terminated Dialog . . . . . . . . . . 14 69 5.5 An Error Case . . . . . . . . . . . . . . . . . . . . . . . . 15 70 5.6 Backwards compatibility with RFC2543 User Agents . . . . . . . 16 71 5.7 Replacing with to-tag set to '*' . . . . . . . . . . . . . . . 18 72 5.8 A non-compliant forking proxy . . . . . . . . . . . . . . . . 19 73 6. Security Considerations . . . . . . . . . . . . . . . . . . . 21 74 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 75 7.1 Registration of "Replaces" SIP header . . . . . . . . . . . . 21 76 7.2 Registration of "replaces" SIP Option-tag . . . . . . . . . . 22 77 7.3 Registration of "687" SIP Response code . . . . . . . . . . . 22 78 8. To Do and Open Issues . . . . . . . . . . . . . . . . . . . . 22 79 8.1 Open Issues: . . . . . . . . . . . . . . . . . . . . . . . . . 22 80 8.2 To Do: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 81 8.3 Changes Since -00 . . . . . . . . . . . . . . . . . . . . . . 22 82 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 83 Normative References . . . . . . . . . . . . . . . . . . . . . 23 84 Informational References . . . . . . . . . . . . . . . . . . . 23 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 24 86 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 25 88 1. Conventions 90 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 91 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 92 document are to be interpreted as described in RFC-2119 [3]. 94 Throughout this document, an "established dialog" means an active SIP 95 dialog in which the request that created the dialog has received a 96 successful (2xx-class) final response (ex: 200 OK). An "early 97 dialog" means transaction and dialog state that exists after a 98 request is sent which would create a new dialog, but before a final 99 response is received for the initial request. 101 2. Overview 103 This document describes a SIP [1] extension for distributed call 104 control as part of the SIP multiparty applications architecture 105 framework [6]. The Replaces header is used in peer-to-peer call 106 control to logically replace an existing SIP dialog with a new SIP 107 dialog. 109 INVITEs are requests which can be accepted, rejected or declined. A 110 User Agent that accepts a request with call-control semantics agrees 111 to take responsibility for setting up the appropriate requested media 112 relationships. 114 In the parlance of the SIP multiparty architecture, the "Replaces" 115 header is used to replace one participant with another in a 116 conversation space. This functionality is already available using 117 3rd party call control [8] style call control. The 3pcc model 118 requires a central point of control which may not be desirable in 119 many environments. As such, a method of performing these same call 120 control primitives in a distributed, peer-to-peer fashion is very 121 desirable. 123 Use of a new INVITE with a new header for dialog matching was chosen 124 over making implicit associations in an incoming INVITE based on 125 call-id or other fields for the following reasons: 127 o An INVITE already has the correct semantics for a new call 129 o Using an explicit Replaces header in a new request makes the 130 intent of the request obvious. 132 o A unique call-id may be given to the replacement call. This 133 avoids call-leg matching problems in any of the clients. 135 o There are no adverse effects if the header is unsupported. 137 The Replaces header enables services such as attended call transfer, 138 retrieve from park, and transition from locally mixed conferences to 139 two party calls in a distributed peer-to-peer way. This list of 140 services is not exhaustive. Although the Replaces header is 141 frequently used in combination with the REFER [2] method as used in 142 cc-transfer [7], they may be used independently. 144 3. Syntax 146 3.1 The Replaces Header 148 The Replaces header indicates that the dialog identified by the 149 header is to be shut down and logically replaced by the incoming 150 INVITE in which it is contained. It is a request header only, and 151 defined here only for INVITE requests. The Replaces header MAY be 152 encrypted as part of end-to-end encryption. 154 This document adds the following entry to Table 3 of [1]: 156 Header field where proxy ACK BYE CAN INV OPT REG 157 ------------ ----- ----- --- --- --- --- --- --- 158 Replaces R - - - o - - 160 SUB NOT REF INF UPD PRA 161 --- --- --- --- --- --- 162 Replaces R - - - - - - 164 Note that the Replaces header has specific call control semantics. 165 If both a Replaces header and another header with contradictory 166 semantics are present in a request, the request MUST be rejected with 167 a 400 "Bad Request" response. 169 3.2 Formal Syntax 171 The following syntax specification uses the augmented Backus-Naur 172 Form (BNF) as described in RFC-2234 [4]. 174 Replaces = "Replaces" HCOLON replaces-values 175 *(COMMA replaces-values) 177 replaces-values = callid *( SEMI replaces-param ) 178 callid = token [ "@" token ] 179 replaces-param = to-tag | from-tag | extension-param 180 to-tag = "to-tag" EQUAL ( UUID | "*" ) 181 from-tag = "from-tag" EQUAL UUID 182 extension-param = token [ EQUAL ( token | quoted-string ) ] 184 A Replaces header MUST contain exactly one to-tag and exactly one 185 from-tag, as they are required for unique dialog matching. Since we 186 rely on the tags for matching purposes, implementations which support 187 Replaces MUST support the SIP specification, which requires tags. 188 For compatibility with early dialogs and dialogs initiated by RFC2543 189 [5] compliant UAs, a tag of zero must match both tags of zero and 190 null tags. 192 3.3 Examples 194 Replaces: 98732@sip.billybiggs.com 195 ;from-tag=r33th4x0r 196 ;to-tag=ff87ff 198 Replaces: 12345@149.112.118.3;to-tag=12345;from-tag=54321 200 Replaces: 87134@171.161.34.23;to-tag=24796;from-tag=0 202 Replaces: 12345@149.112.118.3;to-tag=*;from-tag=24583 204 3.4 New option tag for Require and Supported headers 206 This specification defines a new Require/Supported header option tag 207 "replaces". UAs which support the Replaces header MUST include the 208 "replaces" option in the Supported header. UAs that want explicit 209 failure notification if Replaces is not supported MAY include the 210 "replaces" option in the Require header. 212 Example: 214 Require: replaces, 100rel 216 3.5 687 Response Code: "Dialog Terminated" 218 This specification defines a new SIP response code. The 687 "Dialog 219 Terminated" response code indicates that an early dialog has been 220 completely replaced by a new dialog. A new response code was chosen 221 from the 6xx class to prevent intervening proxies from attempting to 222 fork additional branches of the replaced dialog. 224 4. User Agent Behavior: Receiving a Replaces Header 226 4.1 Matching Dialogs 228 The Replaces header contains information used to match an existing 229 SIP dialog (call-id, to-tag, and from-tag). Upon receiving an INVITE 230 with the Replaces header, the UA MUST attempt to match this 231 information with an established or early dialog. The to-tag and 232 from-tag are matched as if they were present in an incoming request. 233 In other words the to-tag is compared to the local tag, and the from- 234 tag is compared to the remote tag. The to-tag of "*" is a special 235 token which matches all local tags. When this special "*" token is 236 present, the matching semantics are slightly different. 238 4.2 Matching with Explicit Local Tags 240 If the Replaces header matches more than one dialog, the UA MAY use 241 other headers if present (ex: the Referred-By header) to attempt to 242 match a single dialog. If a single matching dialog is not found, the 243 UA MUST act as if no match is found. 245 If no match is found, the UAS rejects the INVITE and returns a 481 246 Call/Transaction Does Not Exist response. 248 If the Replaces header matches a dialog which was not created with an 249 INVITE, the UAS MUST reject the request with an appropriate response. 251 If the Replaces header matches a dialog which has already terminated, 252 the UA SHOULD decline the request with a 603 Declined response. This 253 prevents phantom ringing in cases like example 6.4. 255 Once a matching call-leg is found, the UAS MAY authenticate the 256 INVITE request. If the request is successfully authenticated or 257 already preauthorized, the UAS SHOULD proceed with processing. The 258 UAS MAY prompt the user to accept or reject unauthenticated requests. 259 The UAS MAY reject the request with any appropriate response (for 260 example: 603 "Decline", 403 "Forbidden", or 488 "Not Acceptable 261 Here") 263 4.3 Matching with the * to-tag 265 If the Replaces header matches more than one dialog, the UA MAY use 266 other headers if present (ex: the Referred-By header) to attempt to 267 match a single dialog. If a single matching dialog is not found, the 268 UA MUST act as if no match is found. 270 If the Replaces header matches a dialog which was not created with an 271 INVITE, the UAS MUST reject the request with an appropriate response. 273 If the Replaces header matches a dialog which has already been 274 terminated with a CANCEL or BYE, the UAS MUST reject the INVITE and 275 return a 481 Call/Transaction Does Not Exist response. 277 If no match is found, the UAS MUST ignore the Replaces header and 278 continue processing the INVITE as if it was not present. 280 Once a matching call-leg is found, the UAS MAY authenticate the 281 INVITE request. If the request is successfully authenticated or 282 already preauthorized, the UAS SHOULD proceed with processing. The 283 UAS MAY prompt the user to accept or reject unauthenticated requests. 284 The UAS MAY reject the request with any appropriate response (for 285 example: 603 "Decline", 403 "Forbidden", or 488 "Not Acceptable 286 Here") 288 4.4 Replaces Semantics 290 If the Replaces header matches an established active dialog, the UA 291 SHOULD attempt to accept the new INVITE, reassign the user interface 292 and other resources of the matched dialog to the new INVITE, and shut 293 down the replaced dialog by sending a BYE. If the UA cannot accept 294 the new INVITE (for example: it cannot establish required QoS or 295 keying, or it has incompatible media), the UA MUST return an 296 appropriate response and leave the matched dialog unchanged. 298 If the Replaces header matches an early dialog that was initiated by 299 the UA, the UA SHOULD attempt to accept the new INVITE. If the UA 300 cannot accept the new INVITE, the UA MUST return an appropriate 301 response and leave the matched dialog unchanged. If the UA 302 successfully accepts the new INVITE, the UA MUST reassign the 303 resources of the early dialog to the new INVITE, and CANCEL the 304 replaced early dialog. 306 If the Replaces header matches an early dialog that was not initiated 307 by the UA, the UA SHOULD attempt to provisionally accept the new 308 INVITE. In other words, the UA should attempt whatever steps are 309 necessary to return a provisional or final response suitable for the 310 state of the resources used by the matched dialog. 312 If this is successful, the UA MUST reassign the resources of the 313 early dialog to the new INVITE, and respond to the replaced early 314 dialog with a 687 "Transaction Terminated" response (defined earlier 315 in this document). 317 4.5 Proxy behavior 319 A proxy which does not fork merely needs to pass the Replaces header 320 transparently as described in SIP. 322 A forking proxy which supports this specification that would normally 323 fork a request for the Request-URI in the request MUST examine that 324 INVITE request for a Replaces header. 326 The proxy MUST attempt to match the Call-ID, to-tag, and from-tag 327 with a transaction that that proxy (or cluster of proxies) previously 328 forked. If the Replaces header includes a "*" in the to-tag, then 329 the request will match all branches that match the Call-ID, and from- 330 tag. 332 If the proxy cannot locate a matching transaction, it continues 333 processing the request as if the Replaces header did not exist. 335 If the proxy locates a matching transaction, if SHOULD treat the new 336 request exactly as if it were the matching request. In other words, 337 all the branching logic and state (including timers such as call 338 forward timers) of the matched request should be copied and used for 339 the new request. The proxy will skip contacts which have already 340 failed and forward the new INVITE request to all the Contacts for 341 which the replaced request has active matching branches. The proxy 342 MUST NOT forward the original INVITE on to new branches. 343 Furthermore, if the proxy forwards the new request to more than one 344 active branch, it MUST wait until it receives a non-"100 Trying" 345 response from all active branches of the new request, before sending 346 CANCEL requests to any of the replaced branches. This prevents a 347 race condition which is described in Section 7.8. 349 If necessary, the proxy MUST continue to forward the new INVITE 350 request to new branches as if it were the replaced INVITE. 352 OPEN ISSE: This is a lot of work. Do we really want to do 353 this or just punt on early attended transfer? 355 4.6 Consequences of a forking proxy not supporting this extension 357 Forking proxies which do not support this extension may inadvertently 358 forward an INVITE request with a Replaces header to a different set 359 of Contacts than the original request it was intended to replace. 360 This may occur as a result of many policy-based Contact selection 361 algorithms, including time-of-day, load-sharing, presence-based, or 362 caller-based policies. 364 A parallel forking proxy may cause a race condition whereby only one 365 branch of many caused by the initial INVITE is replaced. This race 366 condition is illustrated in the example in Section 7.8. 368 Call forwarding timers may be reset for active branches. For 369 example, take a forking proxy which implements a call forwarding 370 service after 12 seconds of inactivity. The original INVITE may have 371 been tried already for 10 seconds. The replacement INVITE is likely 372 to begin this timer again at 12 seconds. 374 5. Usage Examples 376 The following non-normative examples are not intended to enumerate 377 all the possibilities for the usage of these extensions, but rather 378 to provide examples or ideas only. For more examples, please see 379 service-examples [9]. 381 5.1 Replacing an Active Dialog 383 In this example, Alice is talking to Bob from phone1. She transfers 384 Bob to a Parking Place while she goes to the lab. When she gets 385 there she retrieves the "parked" call from phone2 by sending an 386 INVITE with Replaces to Bob with the dialog information Bob shared 387 with the Parking Place. How did Alice get this information? Maybe 388 she subscribed to this information from the Parking Place, or went to 389 a website and clicked on a URL. 391 Alice Alice Parking 392 phone1 phone2 Bob Place 393 | | | | 394 |<===============================>| | 395 | | | | 396 | Alice transfers Bob to Parking Place | 397 | | | | 398 |------------REFER/200----------->| *1 *2 | 399 | | |--INVITE/200/ACK-->| 400 |<-----------NOTIFY/200-----------|<=================>| 401 |------------BYE/200------------->| | 402 | | | | 403 | | | | 404 | Alice later retrieves call from another phone | 405 | | | | 406 | *3 |-INV w/Replaces->| | 407 | *4 |<--200-----------| *5 | 408 | |---ACK---------->|----BYE/200------->| 409 | |<===============>| | 410 | | | | 412 Message *1: Bob-> Parking Place 414 INVITE sip:parkingplace@sip.org SIP/2.0 415 To: 416 From: ;tag=7743 417 Call-ID: 425928@bobster.sip.org 418 CSeq: 1 INVITE 419 Contact: 420 Referred-By: 421 Message *2: Parking Place -> Bob 423 SIP/2.0 200 OK 424 To: ;tag=6472 425 From: ;tag=7743 426 Call-ID: 425928@bobster.sip.org 427 CSeq: 1 INVITE 428 Contact: 430 Message *3: Alice@phone2 -> Bob 432 INVITE sip:bob@bobster.sip.org 433 To: 434 From: ;tag=8983 435 Call-ID: 09870@phone2.sip.org 436 CSeq: 1 INVITE 437 Contact: 438 Require: replaces 439 Replaces: 425928@bobster.sip.org;to-tag=7743;from-tag=6472 441 Message *4: Bob -> Alice@phone2 443 SIP/2.0 200 OK 444 To: ;tag=9343 445 From: ;tag=8983 446 Call-ID: 09870@phone2.sip.org 447 CSeq: 1 INVITE 448 Contact: 450 Message *5: Bob -> Parking Place 452 BYE sip:parkingplace@sip.org SIP/2.0 453 To: ;tag=6472 454 From: ;tag=7743 455 Call-ID: 425928@bobster.sip.org 456 CSeq: 2 BYE 457 Contact: 459 5.2 Replacing an Early Dialog initiated by someone else 461 In this example, a Customer tries calling a call center and for some 462 reason cannot get through properly. The customer calls an Operator 463 and asks for help. The operator calls the contact center, and upon 464 receiving a provisional response, assumes that everything is OK and 465 transfers the Customer to the Call Center, replacing the operator's 466 place in the queue. 468 Call 469 Operator Customer Center 470 | | | 471 |<--INVITE/180/200/ACK--| | 472 |<=====================>| "Hello, I'm having | 473 | | trouble calling ..." | 474 |"OK, I'll try it and | | 475 | transfer you if it | | 476 | works for me" | | 477 | | | 478 *1 |-----INVITE ----------------------------------->| 479 *2 |<----182: You are caller number 7---------------| 480 | | | 481 | completes transfer | | 482 | | | 483 |---REFER/200---------->| | 484 | |--INVITE with Replaces->| *3 485 | |<----182: caller #7-----| *4 486 |<----687 Dialog Terminated----------------------| *5 487 |-----ACK--------------------------------------->| 488 |<--NOTIFY/200----------| | 489 |---BYE/200------------>| | 490 | | ...time passes.. | 491 | | | 492 | | | 493 | | | 494 | |<---200 OK--------------| 495 |<--NOTIFY/200----------|----ACK---------------->| 496 | | | 497 | | | 499 Message *1: Operator -> Call Center 501 INVITE sip:helpdesk@clueless.org SIP/2.0 502 To: 503 From: ;tag=7743 504 Call-ID: 425928@dhcp23311.acme.com 505 CSeq: 1 INVITE 506 Contact: 507 Accept-Language: en 509 Message *2: Call Center -> Operator 511 SIP/2.0 182 You are 7th in Queue 512 To: ;tag=6472 513 From: ;tag=7743 514 Call-ID: 425928@dhcp23311.acme.com 515 CSeq: 1 INVITE 516 Contact: 518 Message *3: Customer -> Call Center 520 INVITE sip:helpdesk@frontline.clueless.org 521 To: 522 From: ;tag=8983 523 Call-ID: 09870@lobby12.acme.com 524 CSeq: 1 INVITE 525 Contact: 526 Replaces: 425928@dhcp23311.acme.com;to-tag=7743;from-tag=6472 527 Accept-Language: en 528 Referred-By: 530 Message *4: Call Center -> Customer 532 SIP/2.0 182 You are 7th in Queue 533 To: 534 From: ;tag=8983 535 Call-ID: 09870@lobby12.acme.com 536 CSeq: 1 INVITE 537 Contact: 539 Message *5: Call Center -> Operator 541 SIP/2.0 687 Dialog Terminated 542 To: ;tag=6472 543 From: ;tag=7743 544 Call-ID: 425928@dhcp23311.acme.com 545 CSeq: 1 INVITE 546 Contact: 548 5.3 Replacing an Early Dialog you initiated 550 In this example, Bob just arrived in the lab and hasn't registered 551 there yet. He hears his desk phone ring. He quickly logs into a 552 software UA on a nearby computer. Among other things, the software 553 UA subscribes to the call-state of his desk phone. When it notices 554 that his phone is ringing it offers him the choice to take the call 555 there. The software UA sends an INVITE with Replaces to Alice. When 556 Alice's UA receives this new INVITE, it CANCELs her original INVITE 557 and connects Alice to Bob. 559 Bob Bob 560 Alice desk lab 561 | | | 562 *1 |-----INVITE----------->| | 563 *2 |<----180---------------| Bob hears desk phone | 564 | | ringing from lab but | 565 | | isn't REGISTERed yet | 566 | | | 567 | |<--SUB callpackage/200--| 568 | |---NOTIFY/200---------->| 569 *3/4 |<-----INVITE with Replaces/200/ACK--------------| 570 *5/6 |------CANCEL/200------>| | 571 *7 |<-----487--------------| | 572 |------ACK------------->| | 573 | | | 574 | | | 576 Message *1: Alice -> Bob's desk phone 578 INVITE sip:bob@sip.org SIP/2.0 579 To: 580 From: ;tag=7743 581 Call-ID: 425928@phone.sip.org 582 CSeq: 1 INVITE 583 Contact: 585 Message *2: Bob's desk phone -> Alice 587 SIP/2.0 180 Ringing 588 To: ;tag=6472 589 From: ;tag=7743 590 Call-ID: 425928@phone.sip.org 591 CSeq: 1 INVITE 592 Contact: 594 Message *3: Bob in lab -> Alice 596 INVITE sip:alice@phone.sip.org 597 To: 598 From: ;tag=8983 599 Call-ID: 09870@labpc.sip.org 600 CSeq: 1 INVITE 601 Contact: 602 Replaces: 425928@phone.sip.org;to-tag=7743;from-tag=6472 604 Message *4: Alice -> Bob in lab 606 SIP/2.0 200 OK 607 To: ;tag=9232 608 From: ;tag=8983 609 Call-ID: 09870@labpc.sip.org 610 CSeq: 1 INVITE 611 Contact: 613 Message *5: Alice -> Bob's desk 615 CANCEL sip:bob@sip.org SIP/2.0 616 To: 617 From: ;tag=7743 618 Call-ID: 425928@phone.sip.org 619 CSeq: 1 CANCEL 620 Contact: 622 Message *6: Bob's desk -> Alice 624 SIP/2.0 200 OK 625 To: 626 From: ;tag=7743 627 Call-ID: 425928@phone.sip.org 628 CSeq: 1 CANCEL 629 Contact: 631 Message *7: Bob's desk -> Alice 633 SIP/2.0 487 Request Terminated 634 To: ;tag=6472 635 From: ;tag=7743 636 Call-ID: 425928@phone.sip.org 637 CSeq: 1 INVITE 638 Contact: 640 5.4 Handling Replaces for a Terminated Dialog 642 In this example, Alice, Bob, and Cathy participate in a 3-way call 643 mixed locally by Bob's UA. Bob's UA is programmed to revert to a 644 simple 2-party call when any party hangs up (including Bob). 645 Ordinarily this would be a very polite feature--Cathy and Alice could 646 continue to talk after Bob hangsup. If all three hang up at about 647 the same time, but Bob hangs up first (this will happen about one- 648 third of the time), an INVITE with Replaces header can arrive at 649 Cathy's UA shortly after she has hung up. Because Cathy's UA needs 650 to keep transaction state around for a while anyway (typically 32 651 seconds), the dialog information in the Replaces header should match 652 a terminated dialog. Cathy declines the INVITE, and cleanup proceeds 653 normally. 655 Alice Bob Cathy 656 | | 657 | Alice, Bob, and Cathy are participants in | 658 | a 3-way call mixed by Bob | 659 | | 660 |<=====================>#<======================>| 661 | | | 662 | All three hang up at | | 663 | about the same time | | 664 | | | 665 | Bob's UA tries to | | 666 | setup a 2-way call | | 667 | btwn Alice and Cathy | | 668 | | | 669 |<---REFER--------------| | 670 |----INVITE with Replaces--->XX (lost or late) | 671 | | | 672 | |<-----BYE/200-----------| the dialog is 673 | | | already dead 674 |----INVITE with Replaces----------------------->| so 675 |<---603 Declined--------------------------------| Cathy Declines 676 |----ACK---------------------------------------->| 677 |----NOTIFY/200-------->| | 678 | | | 679 |<-----BYE/200--------->| | 680 | (either side sends) | | 681 | | | 682 | | | 684 5.5 An Error Case 686 The following example illustrates one reason an INVITE with Replaces 687 may fail. In this example, both Bob and Cathy have a common audio 688 codec with Alice, but Bob and Cathy do not share a common codec. 689 When Cathy receives an INVITE from Bob with the Replaces header, 690 Cathy determines she cannot communicate, sends a 488 response to Bob, 691 and maintains her session with Alice. 693 Alice Bob Cathy 694 | | | 695 |--INVITE/200/ACK------>| | 696 | | | 697 |<=audio w/GSM codec===>| | 698 | | | 699 |----INVITE/200/ACK-------------------------------->| 700 | | | 701 |<===audio with G.729 codec========================>| 702 | | | 703 | | | 704 |--REFER/200----------->| | 705 | |--INVITE w/Replaces------->| 706 | | | 707 | | no codec in common! | 708 | | | 709 | |<-488 Not Acceptable Here--| 710 |<--NOTIFY/200----------|--ACK--------------------->| 711 | | | 712 |<=====================>| | 713 |<=================================================>| 714 | | | 716 5.6 Backwards compatibility with RFC2543 User Agents 718 In this example, both Alice and Bob use tags, but Alice wishes to 719 replace a dialog at Bob that was initiated by a User Agent that does 720 not support tags. 722 RFC2543 723 User Agent 724 Alice Bob (no tags) 725 | | | 726 | |<---------INVITE-----------| *1 727 | |----------200--------------| *2 728 | |<---------ACK--------------| 729 | | | 730 | |<=========================>| 731 | | | 732 | | | 733 *3 |--INVITE w/Replaces--->| | 734 *4 |<----200 OK------------|----------BYE------------->| *5 735 |-----ACK-------------->|<---------200--------------| 736 | | | 737 |<=====================>| | 738 | | | 740 Message *1: Oldtimer (RFC 2543 User Agent)-> Bob 742 INVITE sip:bob@sip.org SIP/2.0 743 To: 744 From: 745 Call-ID: 425928@test-ua.sip.org 746 CSeq: 1 INVITE 747 Contact: 749 Message *2: Bob -> Oldtimer 751 SIP/2.0 200 OK 752 To: ;tag=3245 753 From: 754 Call-ID: 425928@test-ua.sip.org 755 CSeq: 1 INVITE 756 Contact: 758 Message *3: Alice -> Bob 760 INVITE sip:bob@bobster.sip.org 761 To: 762 From: ;tag=8983 763 Call-ID: 09870@phone2.sip.org 764 CSeq: 1 INVITE 765 Contact: 766 Replaces: 425928@test-ua.sip.org;to-tag=3245;from-tag=0 768 Message *4: Bob -> Alice 770 SIP/2.0 200 OK 771 To: ;tag=9343 772 From: ;tag=8983 773 Call-ID: 09870@phone2.sip.org 774 CSeq: 1 INVITE 775 Contact: 777 Message *5: Bob -> Oldtimer 779 BYE sip:oldtimer@test-ua.sip.org SIP/2.0 780 To: 781 From: ;tag=3245 782 Call-ID: 425928@test-ua.sip.org 783 CSeq: 2 BYE 784 Contact: 786 5.7 Replacing with to-tag set to '*' 788 In this example, Alice and Bob have a stable call. Bob call Cathy, 789 who is available at a multiplicity of Contacts. Cathy's proxy first 790 forwards INVITEs to her desk and lab for 6 seconds, and then tries 791 here home and car for 6 seconds, finally arriving at her voicemail 792 server if none of these contacts answer. Bob intends to talk with 793 Cathy, and then transfer Alice to Cathy, but for whatever reason, 794 becomes impatient and transfers Alice's call before an established 795 dialog is created. Bob's intent is for Alice to reach Cathy at any 796 of her contacts as opposed to at a single contact, so he asks her to 797 send an INVITE replacing his entire call with the wildcard to-tag 798 parameter. Cathy's proxy replaces Bob's entire chain of proxy 799 forwarding logic and call forwarding timers with the new INVITE from 800 Alice. 802 Cathy's Contacts 803 desk lab home car VM 804 Alice Bob Proxy C1 C2 C3 C4 C5 805 | | | | | | | | 806 | stable call | | | | | | | 807 |<============>| | | | | | | 808 | |--INVITE-(1)-->| | | | | | 809 | | |-INVITE-(1a)->| | | | | 810 | | |-INVITE-(1b)------>| | | | 811 | | |<---18x-(1a)--| | | | | 812 | |<----18x-(1a)--|<---18x-(1b)-------| | | | 813 | |<----18x-(1b)--| | | | | | 814 | | | proxy waits | | | | | 815 | | | 6 seconds | | | | | 816 | | | | | | | | 817 | | |-CANCEL/200-->| | | | | 818 | | |-CANCEL/200------->| | | | 819 | | |<-487/ACK (1a)| | | | | 820 | | |<-487/ACK (1b)-----| | | | 821 | | |-INVITE-(1c)----------->| | | 822 | | |-INVITE-(1d)---------------->| | 823 | | |<---18x-(1c)------------| | | 824 | |<----18x-(1c)--|<---18x-(1d)-----------------| | 825 | |<----18x-(1d)--| | | | | | 826 | | | proxy sets | | | | | 827 | | Bob gets | timer for | | | | | 828 | | impatient | 6 more secs | | | | | 829 |<-REFER/202---| | | | | | | 830 |--INVITE w/Replace to-tag=* ->| | | | | | 831 | | |-INVITE w/Replaces(2c)->| | | 832 | | |-INVITE w/Replaces(2d)------>| | 833 | | |<---18x-(2c)------------| | | 834 |<---18x (2c)------------------|<-687/ACK (1c)----------| | | 835 | | |<---18x-(2d)-----------------| | 836 |<---18x (2d)------------------|<-687/ACK (1d)---------------| | 837 | |<----687 (1)---| | | | | | 838 | |-----ACK (1)-->| | | | | | 839 |<---BYE/200---| | call forward | | | | | 840 | | | timer expires| | | | | 841 | | | | | | | | 842 | | |-CANCEL/200------------>| | | 843 | | |-CANCEL/200----------------->| | 844 | | |<-487/ACK (2c)----------| | | 845 | | |<-487/ACK (2d)----------| | | 846 | | |-INVITE-(2e)--------------------->| 847 | | |<---200-(2e)----------------------| 848 |<---200 (2e)------------------| | | | | | 849 |----ACK--------------------------------------------------------->| 850 |--NOTIFY/200->| | | | | | | 852 5.8 A non-compliant forking proxy 854 The following example illustrates two of the consequences of a 855 forking proxy not supporting the Replaces extension. An annoying but 856 less serious consequence is that the proxy is likely to start call 857 forwarding timers from scratch (see the "#" sign in the call flow), 858 resulting in longer delays than in the example in Section 5.7. A 859 more serious consequence is that if an INVITE with a Replaces header 860 is lost, as in INVITE 2d, a race condition can arise whereby a 861 parallel branch (2c) of the same INVITE with Replaces (2) request 862 will trigger a 687 to be sent to terminate the replaced branch (1c). 863 Since the proxy does not understand the linkage between the matching 864 INVITE and the replacement INVITE, the proxy will CANCEL remaining 865 branches (1d) for INVITE 1. When the proxy later retransmits INVITE 866 2d, the request will fail, because the matching dialog was previously 867 cancelled. 869 Note however that despite these two problems (the race condition 870 being unlikely, and the timing problem being merely annoying), the 871 proxy will still work well enough that Alice's INVITE will continue 872 to follow the proxy's chain of contact logic past the set of contacts 873 originally visited by Bob. This is the intent of an INVITE request 874 with a Replaces header with the wildcard to-tag parameter. 876 The most serious consequence of a forking proxy not supporting 877 Replaces is that it may decide to fork the replacement INVITE request 878 to a completely orthogonal set of Contacts. In this case, neither a 879 specific-dialog replacement, nor a wildcard replacement will work. 881 Cathy's Contacts 882 desk lab home car VM 883 Alice Bob Proxy C1 C2 C3 C4 C5 884 | | | | | | | | 885 | stable call | | | | | | | 886 |<============>| | | | | | | 887 | |--INVITE-(1)-->| | | | | | 888 | | |-INVITE-(1a)->| | | | | 889 | | |-INVITE-(1b)------>| | | | 890 | | |<---18x-(1a)--| | | | | 891 | |<----18x-(1a)--|<---18x-(1b)-------| | | | 892 | |<----18x-(1b)--| | | | | | 893 | | | proxy waits | | | | | 894 | | | 6 seconds | | | | | 895 | | | | | | | | 896 | | |-CANCEL/200-->| | | | | 897 | | |-CANCEL/200------->| | | | 898 | | |<-487/ACK (1a)| | | | | 899 | | |<-487/ACK (1b)-----| | | | 900 | | |-INVITE-(1c)----------->| | | 901 | | |-INVITE-(1d)---------------->| | 902 | | |<---18x-(1c)------------| | | 903 | |<----18x-(1c)--|<---18x-(1d)---------------->| | 904 | |<----18x-(1d)--| | | | | | 905 | | | | | | | | 906 | | Bob gets | | | | | | 907 | | impatient | | | | | | 908 |<-REFER/202---| | | | | | | 909 |--INVITE w/Replace to-tag=* ->| | | | | | 910 | | |-INVITE (2a)->| | | | | 911 | | | Replaces * | | | | | 912 | | |-INVITE (2b)->| | | | | 913 | | | Replaces * | | | | | 914 | | |<---481-(2a)--| | | | | 915 | | |<---420-(2b)--| | | | | 916 | | # proxy sets | | | | | | 917 | | timer for |-INVITE w/Replaces(2c)->| | | 918 | | 6 more secs|-INVITE w/Replaces(2d)-LOST..|* | 919 | | |<---18x-(2c)------------| | | 920 |<---18x (2c)------------------|<-687/ACK (1c)----------| |* | 921 | |<----687 (1)---|-CANCEL/200-(1d)------------>|* | 922 | |-----ACK (1)-->|<-487/ACK (1d)---------------| | 923 |<---BYE/200---| | | | | | | 924 | | |-INVITE (2d) retransmitted-->|* | 925 | | |<-481/ACK (2d)---------------|* | 926 | | | | | | | | 927 | | | call forward | | | | | 928 | | | timer expires| | | | | 929 | | | | | | | | 930 | | |-CANCEL/200------------>| | | 931 | | |<-487/ACK (2c)----------| | | 932 | | |-INVITE-(2e)--------------------->| 933 | | |<---200-(2e)----------------------| 934 |<---200 (2e)------------------| | | | | | 935 |----ACK--------------------------------------------------------->| 936 |--NOTIFY/200->| | | | | | | 938 6. Security Considerations 940 This extension can be used to disconnect or replace participants of a 941 multimedia conversation with an attacker. As such, invitations with 942 the Replaces header SHOULD only be accepted in a dialog in which the 943 peer has been properly authenticated using a standard SIP mechanism, 944 and for which message integrity is checked so that the header cannot 945 be added or modified in transit. 947 The extensions proposed in this document do not significantly change 948 the relative security of SIP devices. Currently in SIP, an 949 eavesdropper who learns the Call-ID, To, and From headers can easily 950 modify or destroy a dialog using a reINVITE. In practice, dialog 951 information (Call-ID, to-tag, and from-tag) for most uses of Replaces 952 is obtained via subscription to a "call-package" event package or via 953 transitivity using the REFER method. Encryption of SIP signaling to 954 insure confidentiality of this information is RECOMMENDED. 956 This extension was designed to take advantage of future signature or 957 authorization schemes defined by the SIP Working Group. In general, 958 call control features would benefit considerably from such work. 960 7. IANA Considerations 962 7.1 Registration of "Replaces" SIP header 964 Name of Header: Replaces 966 Short form: none 968 Registrant: Rohan Mahy 969 rohan@cisco.com 971 Normative description: section 4.1 of this document 973 7.2 Registration of "replaces" SIP Option-tag 975 Name of option: replaces 977 Description: Support for the SIP Replaces header 979 SIP headers defined: Replaces 981 Normative description: This document 983 Registrant: Rohan Mahy 984 rohan@cisco.com 986 7.3 Registration of "687" SIP Response code 988 Number of response code: 687 990 Default reason phrase: Dialog Terminated 992 Registrant: Rohan Mahy 993 rohan@cisco.com 995 Normative description: section 4.3 of this document 997 8. To Do and Open Issues 999 8.1 Open Issues: 1001 - Are the proposals for early dialog and terminated dialog matching 1002 acceptable? - Is the proposed tag matching scheme for pre-bis UAs 1003 acceptable? 1005 8.2 To Do: 1007 - Update references 1009 8.3 Changes Since -00 1011 o When no dialog matches the Call-ID and tags in a Replaces header, 1012 the UAS now returns a 481 instead of silently accepting the 1013 INVITE. 1015 o Changed the BNF to match the explicit whitespace BNF now used by 1016 SIP. 1018 o Added the to-tag=* matching mechanism. 1020 o Added requirements for forking proxies and a discussion of the 1021 consequences if forking proxies do not support Replaces. 1023 o Added last two examples. 1025 o Split normative and non-normative references 1027 9. Acknowledgments 1029 Thanks to Robert Sparks, Alan Johnston, and Ben Campbell and many 1030 other members of the SIP WG for their continued support of the cause 1031 of distributed call control in SIP. 1033 Normative References 1035 [1] Rosenberg, J. and H. Schulzrinne, "SIP: Session Initiation 1036 Protocol", draft-ietf-sip-rfc2543bis-09 (work in progress), 1037 February 2002. 1039 [2] Sparks, R., "The Refer Method", draft-ietf-sip-refer-02 (work in 1040 progress), October 2001. 1042 [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement 1043 Levels", BCP 14, RFC 2119, March 1997. 1045 [4] Crocker, D. and P. Overell, "Augmented BNF for Syntax 1046 Specifications: ABNF", RFC 2234, November 1997. 1048 Informational References 1050 [5] Handley, M., Schulzrinne, H., Schooler, E. and J. Rosenberg, 1051 "SIP: Session Initiation Protocol", RFC 2543, March 1999. 1053 [6] Mahy, R., "A Multi-party Application Framework for SIP", draft- 1054 ietf-sipping-cc-framework-00 (work in progress), March 2002. 1056 [7] Sparks, R., "SIP Call Control - Transfer", draft-ietf-sip-cc- 1057 transfer-05.txt (work in progress), July 2001. 1059 [8] Rosenberg, J., Schulzrinne, H., Camarillo, G. and J. Peterson, 1060 "Third Party Call Control in SIP", draft-rosenberg-sip-3pcc-03 1061 (work in progress), November 2001. 1063 [9] Johnston, A., "SIP Service Examples", draft-ietf-sipping- 1064 service-examples-01 (work in progress), April 2002. 1066 Authors' Addresses 1068 Rohan Mahy 1069 Cisco Systems, Inc. 1070 170 West Tasman Drive 1071 San Jose, CA 95134 1072 USA 1074 EMail: rohan@cisco.com 1076 Billy Biggs 1078 EMail: bbiggs@dumbterm.net 1080 Rick Dean 1082 EMail: rfc@fdd.com 1084 Full Copyright Statement 1086 Copyright (C) The Internet Society (2002). All Rights Reserved. 1088 This document and translations of it may be copied and furnished to 1089 others, and derivative works that comment on or otherwise explain it 1090 or assist in its implementation may be prepared, copied, published 1091 and distributed, in whole or in part, without restriction of any 1092 kind, provided that the above copyright notice and this paragraph are 1093 included on all such copies and derivative works. However, this 1094 document itself may not be modified in any way, such as by removing 1095 the copyright notice or references to the Internet Society or other 1096 Internet organizations, except as needed for the purpose of 1097 developing Internet standards in which case the procedures for 1098 copyrights defined in the Internet Standards process must be 1099 followed, or as required to translate it into languages other than 1100 English. 1102 The limited permissions granted above are perpetual and will not be 1103 revoked by the Internet Society or its successors or assigns. 1105 This document and the information contained herein is provided on an 1106 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1107 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1108 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1109 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1110 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1112 Acknowledgement 1114 Funding for the RFC Editor function is currently provided by the 1115 Internet Society.