idnits 2.17.1 draft-ietf-sipping-sip-offeranswer-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 17. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 1092. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1103. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1110. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1116. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 452: '... "It MUST NOT generate a new offe...' RFC 2119 keyword, line 453: '...ed or rejected. It MUST NOT generate a...' RFC 2119 keyword, line 849: '... RFC 3264[3] specifies that An agent MUST be capable of receiving SDP...' RFC 2119 keyword, line 984: '...eliable response MUST contain an offer...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year -- 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 (October 24, 2007) is 6029 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Unused Reference: '7' is defined on line 1058, but no explicit reference was found in the text == Outdated reference: A later version (-16) exists of draft-ietf-sipping-media-policy-dataset-04 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SIPPING Working Group T. Sawada 3 Internet Draft KDDI Corporation 4 Intended status: Informational P. Kyzivat 5 Expires: April 2008 Cisco Systems, Inc. 6 October 24, 2007 8 SIP (Session Initiation Protocol) Usage of the Offer/Answer Model 9 draft-ietf-sipping-sip-offeranswer-04.txt 11 Status of this Memo 13 By submitting this Internet-Draft, each author represents that 14 any applicable patent or other IPR claims of which he or she is 15 aware have been or will be disclosed, and any of which he or she 16 becomes aware will be disclosed, in accordance with Section 6 of 17 BCP 79. 19 Internet-Drafts are working documents of the Internet Engineering 20 Task Force (IETF), its areas, and its working groups. Note that 21 other groups may also distribute working documents as 22 Internet-Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six months 25 and may be updated, replaced, or obsoleted by other documents at any 26 time. It is inappropriate to use Internet-Drafts as reference 27 material or to cite them other than as "work in progress." 29 The list of current Internet-Drafts can be accessed at 30 http://www.ietf.org/ietf/1id-abstracts.txt 32 The list of Internet-Draft Shadow Directories can be accessed at 33 http://www.ietf.org/shadow.html 35 This Internet-Draft will expire on November 24, 2007. 37 Abstract 39 SIP utilizes the offer/answer model to establish and update 40 multimedia sessions. The descriptions on how to use offer/answer in 41 SIP are dispersed in the multiple RFCs. This document summarizes all 42 the current usage of the offer/answer model in SIP communication. 44 Table of Contents 45 1. Introduction...................................................3 46 2. Summary of SIP usage of the Offer/Answer Model.................3 47 2.1. Offer/Answer Exchange Pairs in SIP Messages...............3 48 2.2. Rejection against an Offer................................5 49 2.3. Session Description which is not Offer nor Answer.........6 50 3. Detailed Discussion on the Offer/Answer Model for SIP..........6 51 3.1. Offer/Answer for INVITE method with 100rel extension......6 52 3.1.1. INVITE Request with SDP..............................7 53 3.1.2. INVITE request without SDP...........................9 54 3.2. Offer/Answer Exchange in Early Dialog....................10 55 3.3. Offer/Answer Exchange in Established Dialog..............10 56 4. Exceptional Case Handling.....................................11 57 4.1. Message Crossing Case Handling...........................11 58 4.2. Glare Case Handling......................................13 59 5. Content of Offers and Answers.................................14 60 5.1. General Principle for Constructing Offers and Answers....15 61 5.2. Choice of Media Types and Formats to Include and Exclude.15 62 5.2.1. Sending Initial INVITE with Offer...................15 63 5.2.2. Responding with Offer when Initial INVITE has no Offer16 64 5.2.3. Answering Initial INVITE with Offer.................16 65 5.2.4. Answering when Initial INVITE had no Offer..........17 66 5.2.5. Subsequent Offers and Answers.......................17 67 5.3. Hold and Resume of media.................................18 68 5.4. Behavior on receiving SDP with c=IN IP4 0.0.0.0..........19 69 6. Remaining Issues or Best Practices on Offer/Answer............20 70 6.1. Rejecting PRACK Offer....................................20 71 6.2. Commit/Rollback of Offer/Answer on Unsuccessful re-INVITE 72 Transaction...................................................20 73 6.3. Offer in a Reliable Response.............................22 74 7. Add New Offer/Answer Usage in SIP.............................22 75 7.1. Explicit Usage...........................................22 76 7.2. Rejection of an Offer....................................23 77 7.3. Backward Compatibility...................................23 78 7.4. Exceptional Case Handling................................23 79 8. IANA Considerations...........................................23 80 9. Security Considerations.......................................23 81 10. Acknowledgement..............................................23 82 11. References...................................................23 83 11.1. Normative References....................................23 84 11.2. Informative References..................................24 85 Author's Addresses...............................................24 86 Full Copyright Statement.........................................24 87 Intellectual Property Statement..................................25 88 Acknowledgment...................................................25 90 1. Introduction 92 SIP utilizes the offer/answer model to establish and update the 93 session. The rules to govern the offer/answer behaviors in SIP are 94 described in the several RFCs. 96 The primary purpose of this document is to describe the whole set of 97 SIP usage of the offer/answer model in one document to help the 98 readers to fully understand it. Also, this document tries to 99 incorporate the results of the discussions on the controversial 100 issues to avoid repeating the same discussions later. 102 This document is not intended to create any new normative methods. 103 Rather, it makes the remaining issues clear and leaves them for 104 further study. 106 2. Summary of SIP usage of the Offer/Answer Model 108 The offer/answer model itself is independent from the higher layer 109 application protocols which utilize it. SIP is one of the 110 applications using the offer/answer model. RFC 3264 [3] defines the 111 offer/answer model, but does not specify which SIP message should 112 convey an offer or an answer. This should be defined in the SIP core 113 and extensions RFCs. 115 In theory, any SIP message can include a session description in its 116 body. But a session description in a SIP message is not necessarily 117 an offer or an answer. Only the session description that conforms to 118 the rules described in the standards-track RFCs can be interpreted as 119 an offer or an answer. The rules for how to handle the offer/answer 120 model are currently defined in several RFCs. 122 The offer/answer model defines the update of sessions. In SIP, dialog 123 is used to match the offer/answer exchange to the session which is to 124 be updated with it. In other words, only the offer/answer exchange in 125 the SIP dialog can update the session which is managed with it. 127 2.1. Offer/Answer Exchange Pairs in SIP Messages 129 Currently, the rules on the offer/answer model are defined in RFC 130 3261 [1], RFC 3262 [2] and RFC 3311 [4]. In these RFCs, only the six 131 patterns shown in Table 1 are defined for exchanging an offer and an 132 answer with SIP messages. 134 Note that an offer/answer exchange initiated by an INVITE request 135 must follow exactly one of the patterns 1, 2, 3, 4. When an initial 136 INVITE causes multiple dialogs due to forking, an offer/answer 137 exchange is carried out independently in each distinct dialog. 138 Pattern 2 and pattern 4 can occur only when the INVITE request does 139 not include an offer. 'The first reliable non-failure message' must 140 have an offer if there is no offer in the INVITE request. This means 141 that UA which receives the INVITE request without an offer must 142 include an offer in the first reliable response with 100rel 143 extension. If no reliable provisional response has been sent, the UAS 144 must include an offer when sending 2xx response. 146 In pattern 3, the first reliable provisional response may or may not 147 have an answer. When a reliable provisional response contains a 148 session description, and is the first to do so, then that session 149 description is the answer to the offer in the INVITE request. The 150 answer can not be updated, and a new offer can not be sent, in a 151 subsequent reliable response for the same INVITE transaction. 153 In pattern 5, a PRACK request can contain an offer only if the 154 reliable response which it acknowledges contains an answer in the 155 previous offer/answer exchange. 157 NOTE: It is legal to have UPDATE/2xx exchanges without 158 offer/answer exchanges (pattern 6). As opposed to that, when re- 159 INVITEs are sent without a desire for an offer/answer exchange, 160 an offer/answer exchange cannot be avoided. In that case it is 161 often possible to use the current SDP. (See section 5. for 162 details.) 164 There may be ONLY ONE offer/answer negotiation in progress for a 165 single dialog at any point in time. Section 4 explains how to ensure 166 this. When an INVITE results in multiple dialogs each has a separate 167 offer/answer negotiation. 169 NOTE: This is when using a Content-Disposition of "session". 170 There may be a second offer/answer negotiation in progress using 171 a Content-Disposition of "early-session" [6]. That is not 172 addressed by this draft. 174 Offer Answer RFC Ini Est Early 175 ------------------------------------------------------------------- 176 1. INVITE Req. 2xx INVITE Resp. RFC 3261 Y Y N 177 2. 2xx INVITE Resp. ACK Req. RFC 3261 Y Y N 178 3. INVITE Req. 1xx-rel INVITE Resp. RFC 3262 Y Y N 179 4. 1xx-rel INVITE Resp. PRACK Req. RFC 3262 Y Y N 180 5. PRACK Req. 200 PRACK Resp. RFC 3262 N Y Y 181 6. UPDATE Req. 2xx UPDATE Resp. RFC 3311 N Y Y 183 Table 1. Summary of SIP Usage of the Offer/Answer Model 184 In Table 1, '1xx-rel' corresponds to the reliable provisional 185 response which contains the 100rel option defined in RFC 3262 [2]. 187 The 'Ini' column shows the ability to exchange the offer/answer to 188 initiate the session. 'Y' indicates that the pattern can be used in 189 the initial offer/answer exchange, while 'N' indicates that it can 190 not. Only the initial INVITE transaction can be used to exchange the 191 offer/answer to establish multimedia session. 193 The 'Est' column shows the ability to update the established session. 195 The 'Early' column indicates which patterns may be used to modify the 196 established session in an early dialog. There are two ways to 197 exchange a subsequent offer/answer in an early dialog. 199 2.2. Rejection against an Offer 201 How to reject an offer when it can not be accepted is not so clear 202 and some methods can not allow explicit rejection against an offer. 203 Corresponding to the patterns in Table 1, how to reject an offer is 204 shown in Table 2. 206 When a UA receives an INVITE request with an unacceptable offer, it 207 should respond with a 488 response, preferably with Warning header 208 field indicating the reason of the rejection, unless another response 209 code is more appropriate to reject it. (Pattern 1 and Pattern 3) 211 When a UA receives an UPDATE request with an offer which it can not 212 accept, it should respond with a 488 response preferably with Warning 213 header field indicating the reason of the rejection, unless another 214 response code is more appropriate to reject it. (Pattern 6) 216 When a UA receives a PRACK request with an offer which it can not 217 accept, it may respond with a 200 response with a syntactically 218 correct session description followed by an UPDATE request possibly to 219 rearrange the session parameters if both ends support UPDATE method, 220 or alternatively terminate the dialog and send an error response to 221 the INVITE request. (Pattern 5) 223 When a UA receives a response with an offer which it can not accept, 224 a UA does not have a way to reject it explicitly. Therefore, a UA 225 should respond to the offer with the correct session description and 226 rearrange the session parameters by initiating a new offer/answer 227 exchange, or alternatively terminate the session. (Pattern 2 and 228 Pattern 4) When initiating a new offer/answer, a UA should take care 229 not to cause a never-ending offer/answer loop. 231 Offer Rejection 232 ----------------------------------------------------- 233 1. INVITE Req. 488 INVITE Response 234 2. 2xx INVITE Resp. Answer in ACK Req. followed by new offer 235 OR termination of dialog 236 3. INVITE Req. 488 INVITE Response (same as Pattern 1.) 237 4. 1xx-rel INVITE Resp. Answer in PRACK Req. followed by new offer 238 5. PRACK Req. (*) 200 PRACK Resp. followed by new offer 239 OR termination of dialog 240 6. UPDATE Req. 488 UPDATE Response 242 Table 2. Rejection against an Offer 244 (*) UA should only use PRACK to send an offer when it has strong 245 reasons to assume the receiver will accept. 247 2.3. Session Description which is not Offer nor Answer 249 As previously stated, a session description in a SIP message is not 250 necessarily an offer or an answer. For example, SIP can use a session 251 description to describe capabilities apart from offer/answer 252 exchange. Examples of this are 200 OK responses for OPTIONS and 488 253 responses for INVITE. 255 3. Detailed Discussion on the Offer/Answer Model for SIP 257 3.1. Offer/Answer for INVITE method with 100rel extension 259 The INVITE method provides the basic procedure for offer/answer 260 exchange in SIP. Without the 100rel option, the rules are simple as 261 described in RFC 3261 [1]. If an INVITE request includes a session 262 description, pattern 1 is applied and if an INVITE request does not 263 include a session description, pattern 2 is applied. 265 With 100rel, pattern 3 and pattern 4 are added and this makes the 266 rules complicated. An INVITE request may cause multiple responses. 267 Note that even if both UAs support the 100rel extension, not all the 268 provisional responses may be sent reliably. Note also that a reliable 269 provisional response is allowed without a session description if the 270 UAS does not wish to send the answer yet. An unreliable provisional 271 response may include a session description in the body if the UAS has 272 not sent a reliable response, but its session description is neither 273 an offer nor an answer. All the session descriptions in the 274 unreliable responses to the INVITE request must be identical to the 275 answer which is included in the reliable response. Session 276 descriptions in an unreliable response that precedes a reliable 277 response can be considered a "preview" of the answer that will be 278 coming, and hence may be treated like an answer until the actual one 279 arrives. 281 NOTE: This "preview" session description rule applies to a 282 single offer/answer exchange. In parallel offer/answer exchanges 283 (caused by forking) a UA may obviously receive the different 284 "preview" of answer in each dialog. UAs are expected to deal 285 with this. 287 Although RFC 3261 says a UA should accept media once the INVITE has 288 been sent, in many cases, an answer (or, at least a preview of it) is 289 required in order for media to be accepted. Therefore, a UAS should 290 send an SDP answer reliably (if possible) before it starts sending 291 media. And, if either the UAC or the UAS does not support 100rel, it 292 should still send a preview of the answer before it starts sending 293 media. 295 3.1.1. INVITE Request with SDP 297 When a UAC includes an SDP body in the INVITE request as an offer, it 298 expects the answer to be received with one of the reliable responses. 299 Other than that, no offer/answer exchanges can occur in the messages 300 within the INVITE transaction. 302 UAC UAS 303 | F1 INVITE (SDP) | <- The offer in the offer/answer model 304 |-------------------->| 305 | F2 1xx (SDP) | <- The offer/answer exchange is not closed 306 |<--------------------| yet, but UAC acts as if it receives the 307 | | ^ answer. 308 | F3 1xx-rel (no SDP) | |<- a 1xx-rel may be sent without answer 309 |<--------------------| | SDP. 310 | F4 PRACK (no SDP) | | 311 |-------------------->| | UAC must not send a new offer. 312 | F5 2xx PRA (no SDP) | | 313 |<--------------------| v 314 | | 315 | F6 1xx-rel (SDP) | <- The answer in the offer/ answer model 316 |<--------------------| - 317 | F7 PRACK | | UAC can send a new offer in a PRACK 318 |-------------------->| | request to acknowledge F6. 319 | F8 2xx PRA | | After F7 UAC and UAS can send a new offer 320 |<--------------------| v in an UPDATE request. 321 | | 322 | F9 1xx-rel | <- SDP should not be included in the 323 |<--------------------| subsequent 1xx-rel once offer/answer 324 | F10 PRACK | has been completed. 325 |-------------------->| 326 | F11 2xx PRA | 327 |<--------------------| 328 | | 329 | F12 2xx INV | <- SDP should not be included in the final 330 |<--------------------| response once offer/answer has been 331 | F13 ACK | completed. 332 |-------------------->| 334 Figure 1 Example of Offer/Answer with 100rel Extension (1) 336 For example, in Figure 1, only the SDP in F6 is the answer. The SDP 337 in the non-reliable response (F2) is the preview of the answer and 338 must be the same as the answer in F6. Receiving F2, UAC should act as 339 if it receives the answer. However, offer/answer exchange is not 340 completed yet and UAC must not send a new offer until it receives the 341 same SDP in the first reliable response, which is the real answer. 342 After sending the SDP in F6, UAS must prepare to receive new offer 343 from UAC with an UPDATE request or a PRACK request. 345 UAS does not include an SDP in the responses F9 and F12. However, UAC 346 should prepare to receive SDP bodies in F9 and/or F12, and just 347 ignore them for the case that the peer does not conform to the 348 recommended implementation. 350 3.1.2. INVITE request without SDP 352 When UAC does not include an SDP body in the INVITE request, it 353 expects the offer to be received with the first reliable response. 354 UAC will send the answer in the request to acknowledge the response, 355 i.e. PRACK or ACK request for the reliable response. Other than that, 356 no offer/answer exchanges can occur in the messages within the INVITE 357 transaction. 359 NOTE: UAS should not include SDP in the responses F6 and F9. 360 However, UAC should prepare to receive SDP bodies in F6 and/or 361 F9, and just ignore them for the case that the peer does not 362 conform to the recommended implementation. 364 UAC UAS 365 | F1 INVITE (no SDP) | 366 |-------------------->| 367 | F2 1xx | 368 |<--------------------| 369 | | 370 | F3 1xx-rel (SDP) | <- The first 1xx-rel must contain an SDP 371 |<--------------------| as the offer. 372 | F4 PRACK (SDP) | <- A PRACK request to the first 1xx-rel 373 |-------------------->| must contain an SDP as the answer. 374 | F5 2xx PRA (no SDP) | - 375 |<--------------------| | 376 | | | 377 | F6 1xx-rel (no SDP) | <- The subsequent 1xx-rel should not 378 |<--------------------| | contain an SDP. 379 | F7 PRACK | | 380 |-------------------->| | UAC can send a new offer in an UPDATE 381 | F8 2xx PRA | | request after F4. 382 |<--------------------| v 383 | | 384 | F9 2xx INV (no SDP) | <- The final response should not 385 |<--------------------| contain an SDP. 386 | F10 ACK | 387 |-------------------->| 389 Figure 2 Example of Offer/Answer with 100rel Extension (2) 391 Note that in the case that UAC needs to prompt the user to accept or 392 reject the offer, the reliable provisional response with an SDP as an 393 offer (pattern 4) can result in the retransmission until the PRACK 394 request can be sent. UAC should take care to avoid this situation 395 when it sends the INVITE request without an SDP. 397 3.2. Offer/Answer Exchange in Early Dialog 399 When both UAs support the 100rel extension, they can update the 400 session in the early dialog once the first offer/answer exchange has 401 been completed. 403 From UA sending an INVITE request: 405 UA can send an UPDATE request with a new offer if both ends support 406 the UPDATE method. Note that in the case that UAS needs to prompt the 407 user to accept or reject the offer, an UPDATE request may need to be 408 retransmitted. 410 UA can send a PRACK request with a new offer only when acknowledging 411 the reliable provisional response with the answer to the offer in the 412 INVITE request. Compared to using the UPDATE method, using PRACK can 413 save messages to be exchanged between the UAs. However, as a PRACK 414 request should not be rejected, UA is recommended to send a PRACK 415 request only when it has strong reasons to assume the receiver will 416 accept it. For example, the procedure used in precondition extension 417 [5] is a case where a PRACK request should be used for updating the 418 session status in the early dialog. Note also that in the case that 419 UAS needs to prompt the user to accept or reject the offer, a PRACK 420 request may need to be retransmitted. 422 From UA receiving an INVITE request: 424 UA can send an UPDATE request with a new offer if both ends support 425 UPDATE method. UAS can not send a new offer in the reliable 426 provisional response. So the UPDATE method is the only method for UAS 427 to update the early session. 429 3.3. Offer/Answer Exchange in Established Dialog 431 The re-INVITE and UPDATE methods can be used in the established 432 dialog to update the session. 434 The UPDATE method is simpler and can save at least one message 435 compared with INVITE method. But both ends must support the UPDATE 436 method for it to be used. 438 The INVITE method needs at least three messages to complete but no 439 extensions are needed. Additionally, the INVITE method allows the 440 peer to take time to decide whether it will accept a session update 441 or not by sending provisional responses. That is, re-INVITE allows 442 the UAS to interact with the user at the peer, while UPDATE needs to 443 be answered automatically by the UAS. It is noted that re-INVITE 444 should be answered immediately unless such a user interaction is 445 needed. Otherwise, some 3pcc flows will break. 447 4. Exceptional Case Handling 449 In RFC 3264 [3], the following restrictions are defined with regard 450 to sending a new offer. 452 "It MUST NOT generate a new offer if it has received an offer 453 which it has not yet answered or rejected. It MUST NOT generate a 454 new offer if it has generated a prior offer for which it has not 455 yet received an answer or a rejection." 457 Assuming that the above rules are guaranteed, there seems to be two 458 possible 'exceptional' cases to be considered in SIP offer/answer 459 usage, which are the 'message crossing' case and the 'glare' case. 460 One of the reasons why the usage of a SIP method to exchange 461 offer/answer needs to be carefully restricted in the RFCs is to make 462 sure that UA can detect and handle appropriately the 'exceptional' 463 cases to avoid the confusion. 465 4.1. Message Crossing Case Handling 467 When message packets are crossed in the transport network, an offer 468 may be received before the answer for the previous offer/answer 469 exchange as described in Figure 3. In such a case, UA A must detect 470 the session description of the offer2 is not the answer to the 471 offer1. 473 A B 474 |offer1 | 475 |----------------->| 476 | answer1| 477 |<------\ /-------| 478 | \/ | 479 | /\ offer2| 480 |<------/ \-------| 481 Figure 3 Message Crossing Case 483 When offer2 is in an UPDATE request or a re-INVITE request, a session 484 description can never be the answer. Then UA A must reject the 485 message including offer2 with a 491 response with Retry-After header 486 field. 488 When offer2 is in a PRACK request, that is, when a PRACK request to 489 acknowledge the reliable provisional response with an answer to the 490 offer in the INVITE request contains a session description, UA A 491 knows it is an offer. As a PRACK request should not be rejected, UA A 492 is recommended to wait for the answer1 before sending a PRACK 493 response with the answer to the offer2. Note that if UA A does not 494 send a new offer until the reliable provisional response with an 495 answer to the offer in the INVITE request is acknowledged with a 496 PRACK request, this case never happens. Therefore, to make 497 implementations simple, a UA acting as a UAS for an INVITE 498 transaction is recommended not to send an UPDATE request with an 499 offer until the reliable response with an answer to the offer in the 500 INVITE request is acknowledged with a PRACK request. 502 When offer2 is in a reliable provisional response or a successful 503 final response, UA A knows it is not the answer to the offer1. For a 504 reliable response to an initial INVITE request, this case never 505 happens. For a reliable response to a re-INVITE request, UA A can 506 detect the offer2 is not the answer1. In this case, UA A can not 507 reject offer2 in a reliable response, it is recommended to wait for 508 answer1 before sending a PRACK request with the answer to offer2. 509 Note that this case only occurs when UA A, while waiting for an 510 answer, sends an INVITE request without session description. 512 Table 3 summarizes the discussions above. 514 offer2 | How to know it's not answer1 | Actions to take 515 -------+------------------------------+-------------------------- 516 INVITE | Never be an answer | 491 response 517 UPDATE | Glare case for UA A | with Retry-After 518 -------+------------------------------+-------------------------- 519 PRACK | Not a pattern 4. in Table 1. | Wait sending response 520 | 1xx-rel must have an answer, | until answer1 is received 521 | not an offer. | 522 -------+------------------------------+-------------------------- 523 1xx-rel| Only one INVITE transaction | Wait sending acknowledge 524 2xx | at a time. Then UA can know | until answer1 is received 525 -------+------------------------------+-------------------------- 527 NOTE: PRACK and 1xx-rel/2xx case is extremely rare case and easily 528 avoidable. See Figure 4 and Figure 5. 530 Table 3. UA's action to the offer (offer2) overtaken the previous 531 answer (answer1) 532 A B 533 | | 534 | INV (offer0)| 535 |<------------------------------| 536 | 1xx-rel (answer0) | 537 |------------------------------>| --+ 538 |offer1(e.g. UPD) | | 539 |==============================>| | 540 | answer1 (2xx-UPD)| | Acknowledge 541 |<===========\ /===============| | 542 | \/ | | 543 | /\ offer2(PRA)| | 544 |<===========/ \===============| <-+ 545 | answer2 (2xx-PRA) | 546 |------------------------------>| Wait until answer1 547 | | 549 Figure 4 PRACK as a message with offer2 in message cross case 551 A B 552 | | 553 |offer1(e.g. UPD) | 554 |==============================>| 555 |re-INV (no offer) | 556 |------------------------------>| --+ 557 | answer1 (2xx-UPD)| | 558 |<===========\ /===============| | The first reliable response 559 | \/ offer2| | 560 | /\ (1xx-rel/2xx)| | 561 |<===========/ \===============| <-+ 562 | answer2 (PRACK/ACK) | 563 |------------------------------>| Wait until answer1 564 | | 566 Figure 5 Reliable response as a message with offer2 in message cross 567 case 569 4.2. Glare Case Handling 571 When both ends in a dialog send a new offer at nearly the same time, 572 UA may receive a new offer before it receives the answer to the offer 573 it sent as described in Figure 6. This case is called a 'glare' case 574 in general. 576 A B 577 |offer1 offer2| 578 |-------\ /-------| 579 | \/ | 580 | /\ | 581 |<------/ \------>| 583 Figure 6 Glare Case 585 When offer2 is in an UPDATE request or (re-)INVITE request, it must 586 be rejected with a 491 response. 588 When offer2 is in a PRACK request (within the current rules, only 589 possible if offer1 is in an UPDATE request), the PRACK may be 590 accepted with 200 or may be rejected with a 491 response. A 491 591 response is valid to satisfy the offer/answer model but it may delay 592 the completion of the reliable response transfer mechanism or, in 593 worst case, may result in the failure to complete the SIP transaction 594 because there is no clear retry rule when a PRACK request is rejected 595 with a 491 response. To avoid this glare condition, UA A should not 596 send an offer if it has already sent a reliable provisional response 597 containing an answer to a previous offer and has not received the 598 corresponding PRACK request. 600 To avoid a glare condition involving an offer in a response, when UA 601 A has sent a (re)INVITE request without session description, it 602 should not send an offer until it has received an offer in a reliable 603 response to the (re)INVITE, and sent an answer to that offer. 605 5. Content of Offers and Answers 607 While RFCs 3264[3] and 3312[5] give some guidance, questions remain 608 about exactly what should be included in an offer or answer. This is 609 especially a problem when the common "hold" feature has been 610 activated, and when there is the potential for a multimedia call. 612 Details of behavior depend on the capabilities and state of the User 613 Agent. The kinds of recommendations that can be made are limited by 614 the model of device capabilities and state that is presumed to exist. 616 This section focuses on a few key aspects of offers and answers that 617 have been identified as troublesome, and will consider other aspects 618 to be out of scope. This section considers: 620 - choice of supported media types and formats to include and exclude 622 - hold and resume of media 623 The following are out of scope for this document: 625 - NAT traversal and ICE 627 - specific codecs and their parameters 629 - the negotiation of secure media streams 631 - grouping of media streams 633 - preconditions 635 5.1. General Principle for Constructing Offers and Answers 637 A UA should send an offer that indicates what it, and its user, are 638 interested in using/doing at that time, without regard for what the 639 other party in the call may have indicated previously. This is the 640 case even when the offer is sent in response to an INVITE or re- 641 INVITE that contains no offer. (However in the case of re-INVITE the 642 constraints of RFCs 3261 and 3264 must be observed.) 644 A UA should send an answer that includes as close an approximation to 645 what the UA and its user are interested in doing at that time, while 646 remaining consistent with the offer/answer rules of RFC 3264[3] and 647 other RFCs. 649 NOTE: "at that time" is important. The device may permit the 650 user to configure which supported media are to be used by 651 default. 653 In some cases a UA may not have direct knowledge of what it is 654 interested in doing at a particular time. If it is an intermediary it 655 may be able to delegate the decision. In the worst case it may apply 656 a default, such as assuming it wants to use all of its capabilities. 658 5.2. Choice of Media Types and Formats to Include and Exclude 660 5.2.1. Sending Initial INVITE with Offer 662 When a UAC sends an initial INVITE with an offer, it has complete 663 freedom to choose which media type(s) and media format(s) (payload 664 types in the case of RTP) it should include in the offer. 666 The media types may be all or a subset of the media the UAC is 667 capable of supporting, with the particular subset being determined by 668 the design and configuration [6] of the UAC combined with input from 669 the user interface of the UAC. 671 The media formats may be all or a subset of the media formats the UAC 672 is capable of supporting for the corresponding media type, with the 673 particular subset being determined by the design and configuration 674 [6] of the UAC combined with input from the user interface of the 675 UAC. 677 Including all supported media formats will maximize the possibility 678 that the other party will have a supported format in common. But 679 including many can result in an unacceptably large SDP body. 681 5.2.2. Responding with Offer when Initial INVITE has no Offer 683 When a UAS has received an initial INVITE without an offer, it must 684 include an offer in the first reliable response to the INVITE. It has 685 largely the same options as when sending an initial INVITE with an 686 offer, but there are some differences. The choice may be governed by 687 both static (default) selections of media types as well as dynamic 688 selections made by a user via interaction with the device while it is 689 alerting. 691 NOTE: The offer may be sent in a provisional response, before 692 the user of the device has been alerted and had an opportunity 693 to select media options for the call. In this case the UAS 694 cannot include any call-specific options from the user of the 695 device. If there is a possibility that the user of the device 696 will wish to change what is offered before answering the call, 697 then special care should be taken. If PRACK and UPDATE are 698 supported by caller and callee then an initial offer can be sent 699 reliably, and changed with an UPDATE if the user desires a 700 change. If PRACK and UPDATE are not supported then the initial 701 offer cannot be changed until the call is fully established. In 702 that case either the offer should be delayed until the 200 is 703 sent, or else the offer should include the minimum set of media 704 the user is able to select. 706 5.2.3. Answering Initial INVITE with Offer 708 When a UAS receives an initial INVITE with an offer, what media lines 709 the answer may contain is constrained by RFC 3264.[3] The answer must 710 contain the same number of m-lines as the offer, and they must 711 contain the same media types. Each media line may be accepted, by 712 including a non-zero port number, or rejected by including a zero 713 port number in the answer. The media lines that are accepted should 714 typically be those that would have been offered had the INVITE not 715 contained an offer, but with those not offered removed. 717 The media formats the answer may contain are constrained by RFC 3264 718 [3]. For each accepted m-line in the answer, there must be at least 719 one media format in common with the corresponding m-line of the 720 offer. The UAS may also include other media formats it is able to 721 support at this time. However there is little benefit to including 722 added types. 724 If the UAS does not wish to indicate support for any of the media 725 types in a particular media line of the offer it must reject the 726 corresponding media line, by setting the port number to zero. 728 5.2.4. Answering when Initial INVITE had no Offer 730 When a UAC has sent an initial INVITE without an offer, and then 731 receives a response with the first offer, it should answer in the 732 same way as a UAS receiving an initial INVITE with an offer. 734 5.2.5. Subsequent Offers and Answers 736 The guidelines above (sections 5.1. and 5.2.1. through 5.2.4.) apply, 737 but constraints in RFC 3264 [3] must also be followed. The following 738 are of particular note because they have proven troublesome: 740 o The number of m-lines may not be reduced in a subsequent offer. 741 Previously rejected media streams must remain, or be reused to 742 offer the same or a different stream. 744 o In the o-line, only the version number may change, and if it 745 changes it must increment by one from the one previously sent as 746 an offer or answer. If it doesn't change then the entire SDP body 747 must be identical to what was previously sent as an offer or 748 answer. Changing the o-line, except version number value, during 749 the session is an error case. The behavior when receiving such a 750 non-compliant offer/answer SDP is implementation dependent. If a 751 UA needs to negotiate a 'new' SDP session, it should use the 752 INVITE/Replaces method. 754 o In the case of RTP, the mapping from a particular dynamic payload 755 type number to a particular codec within that media stream (m- 756 line) must not change for the duration of the session. 758 NOTE: This may be impossible for a B2BUA to follow in some cases 759 (e.g. 3pcc transfer) if it does not terminate media. 761 When the new offer is sent in response to an offerless (re)INVITE, 762 all codecs the UA wishes to use at this time are to be included, not 763 just the ones that were negotiated by previous offer/answer 764 exchanges. Same with media types - so if UA A initially offered audio 765 and video to UA B, and they end up with only audio, and UA B sends an 766 offerless (re)INVITE to UA A, A's resulting offer should re-attempt 767 video, by reusing the zeroed m-line used previously if it still 768 wishes to use video. 770 NOTE: The behavior above is recommended, but it is not always to 771 achieve - for example in some interworking scenarios. Or, the 772 offerer may simply not have enough resources to offer 773 "everything" at that point. Even if the UAS is not able to offer 774 any other SDP that the one currently using, it should not reject 775 the re-INVITE. Instead, it should generate an offer with the 776 currently used SDP with o- line unchanged. 778 5.3. Hold and Resume of media 780 RFC 3264 [3] specifies (non-normatively) that "hold" should be 781 indicated in an established session by sending a new offer containing 782 "a=sendonly" for each media stream to be held. An answerer is then to 783 respond with "a=recvonly" to acknowledge that the hold request has 784 been understood. 786 Note that the use of sendonly/recvonly is not limited to hold. These 787 may be used for other reasons, such as devices that are only capable 788 of sending or receiving. So receiving an offer with "a=sendonly" must 789 not be treated as a certain indication that the offerer has placed 790 the media stream on hold. 792 This model is based on an assumption that the UA initiating the hold 793 will want to play Music on Hold, which is not always the case. A UA 794 may, if desired, initiate hold by offering "a=inactive" if it does 795 not intend to transmit any media while in hold status. 797 The rules of RFC 3264 [3] constrain what may be in an answer when the 798 offer contains "sendonly", "recvonly", or "inactive" in an a= line. 799 But they do not constrain what must be in a subsequent offer. The 800 General Principle for Constructing Offers and Answers (section 5.1. ) 801 is important here. The initiation of "hold" is a local action. It 802 should affect the desired state of the UA. It then affects what the 803 UA includes in offers and answers until the local state is reset. 805 The receipt of an offer containing "a=sendonly" or "a=inactive" and 806 the sending of a compatible answer should not change the desired 807 state of the recipient. However, a UA that has been "placed on hold" 808 may itself desire to initiate its own hold status, based on local 809 input. 811 If UA2 has previously been "placed on hold" by UA1, via receipt of 812 "a=sendonly", then it may initiate its own hold by sending a new 813 offer containing "a=sendonly" to UA1. Upon receipt of that, UA1 will 814 answer with "a=inactive" because that is the only valid answer that 815 reflects its desire not to receive media. 817 Once in this state, to resume a two way exchange of media each side 818 must reset its local hold status. If UA1 is first to go off hold it 819 will then send an offer with "a=sendrecv". The UA2 will respond with 820 its desired state of "a=sendonly" because that is a permitted 821 response. When UA2 desires to also resume, it will send an offer with 822 "a=sendrecv". In this case, because UA1 has the same desire it will 823 respond with "a=sendrecv".In the same case, when UA2 receives the 824 offer with "a=sendrecv", if it has decided it wants to reset its 825 local hold but has not yet signaled the intent, it may send 826 "a=sendrecv" in the answer. 828 If UA2 has been "placed on hold" by UA1 via receipt of "a=inactive", 829 and subsequently wants to initiate its own hold, also using 830 "a=inactive", it need not send a new offer, since the only valid 831 response is "a=inactive" and that is already in effect. However, its 832 local desired state will now be either "inactive" or "a=sendonly". 833 This affects what it will send in future offers and answers. 835 If a UA has occasion to send another offer in the session, without 836 any desire to change the hold status (e.g. in response to a re-INVITE 837 without an offer, or when sending a re-INVITE to refresh the session 838 timer) it should follow the General Principle for Constructing Offers 839 and Answers (section 5.1. ). If it previously initiated a "hold" by 840 sending "a=sendonly" or "a=inactive" then it should offer that again. 841 If it had not previously initiated "hold" then it should offer 842 "a=sendrecv", even if it had previously been forced to answer 843 something else. Without this behavior it is possible to get "stuck on 844 hold" in some cases, especially when a third-party call controller is 845 involved. 847 5.4. Behavior on receiving SDP with c=IN IP4 0.0.0.0 849 RFC 3264[3] specifies that An agent MUST be capable of receiving SDP 850 with a connection address of 0.0.0.0, in which case it means that 851 neither RTP nor RTCP should be sent to the peer. 853 If a UA generates an answer to the offer received with a connection 854 address of 0.0.0.0, the direction attribute of the accepted media 855 stream in the answer must be based on direction attribute of the 856 offered stream and rules specified in RFC 3264 to form the a-line in 857 the answer. A connection address of 0.0.0.0 has no special meaning 858 for the direction attribute of the accepted stream in the answer. 860 6. Remaining Issues or Best Practices on Offer/Answer 862 This document clarifies the offer/answer usage in SIP and summarizes 863 the correct or recommended behaviors along with the existing RFCs. To 864 create any new normative behaviors beyond these RFCs is not the 865 intent of this document. 867 However, through the scrutiny of the offer/answer model in SIP, some 868 issues are found to be unresolved within the current set of RFCs. 869 Those remaining issues are described in this section mainly for 870 further study. 872 6.1. Rejecting PRACK Offer 874 As stated in section 2.2. and 3.2. , it is recommended not to send an 875 offer in a PRACK request unless UAC has strong reasons to assume the 876 receiver will accept it. Even so, there may be the cases when the UAS 877 has to reject the offer for some reason. The current RFCs do not 878 provide the way to reject the offer and at the same time to 879 acknowledge the reliable response. 881 Several ideas were presented to resolve this issue, such as sending 882 2xx PRACK response without SDP to reject the offer, or sending an SDP 883 with decreased o-line version value. Some of the candidates may also 884 be adapted as a way to reject an unacceptable offer in a response. 885 Anyway, those candidates violate the current rules and lose backward 886 compatibility to some extent (e.g. section 5 of RFC 3262). It is 887 beyond the scope of this document and remains for further study. 889 NOTE: Deprecation of the usage of offer in PRACK may be another 890 solution. As the precondition mechanism specification [2] 891 explicitly shows a usage of sending offer in PRACK, its 892 deprecation could cause backward compatibility issues. 894 6.2. Commit/Rollback of Offer/Answer on Unsuccessful re-INVITE 895 Transaction 897 When a re-INVITE transaction fails, often the dialog remains with the 898 session bound to it. The issue here is what the session status is if 899 offer/answer exchange has been completed (if a session description 900 has been sent in a reliable provisional response to the re-INVITE 901 request), or if subsequent offer/answer exchanges have taken place 902 (using UPDATE or PRACK transactions), before the re-INVITE 903 transaction is terminated with a final error response (Figure 7). One 904 option is to take those offer/answer exchanges not committed yet and 905 to make the session status rollback to the one before re-INVITE 906 transaction was initiated. Another option is to take those exchanges 907 committed and to keep the session status as it is even after re- 908 INVITE fails. There is no clear consensus on which one is the correct 909 behavior. 911 There are some cases where it is useful to exchange 912 offer(s)/answer(s) even before re-INVITE completes. The case of 913 adding a new media (like adding video to audio only session) which 914 requires permission from the peer through some user interaction is 915 one example. Precondition procedures can be another case which may 916 require several offer/answer exchanges in one re-INVITE transaction. 918 UAC UAS 919 | session established | 920 |<===================>| 921 | | 922 | F1 re-INVITE (SDP) | 923 |-------------------->| 924 | F2 1xx-rel (SDP) | 925 |<--------------------| 926 | F3 PRACK | <- PRACK request may include new offer and 927 |-------------------->| can complete the offer/answer with 928 | F4 2xx PRA | the answer in 2xx PRACK response. 929 |<--------------------| 930 | | <- UPDATE method can update the session 931 | | status before receiving the final 932 | F5 4xx/5xx/6xx INV | response to re-INVITE request (F1). 933 |<--------------------| 934 | F6 ACK | 935 |-------------------->| Issue: What is the correct session status 936 | | after re-INVITE transaction. 938 Figure 7 Commit/Rollback Issue with re-INVITE transaction 940 To make bad things worse, if a new offer from UAC and the final 941 response to re-INVITE are sent at nearly the same time, the UAS can 942 not know whether this new offer was sent before or after UAC received 943 the final failure response (Figure 8). Note that the ACK request to 944 the failure response is sent hop-by-hop basis, therefore even after 945 receiving the ACK request, UAS can not make sure that UPDATE request 946 was sent after the final response had been reached to the other end. 948 Sending a new UPDATE request from UAC to synchronize the status 949 anytime after the re-INVITE fails may be a good option. This 950 solution, however, requires that the UPDATE method be supported by 951 both ends and needs care to avoid flapping when each end tries to 952 advertise their different views of the session status. 954 The proper handling of this issue is undefined by existing standards. 955 Resolution is beyond the scope of this document, and will require a 956 new normative document. Such a document is the responsibility of the 957 SIP working group, and is for further study. 959 UAC UAS 960 | session established | 961 |<===================>| 962 | | 963 | F1 re-INVITE (SDP) | 964 |-------------------->| 965 | F2 1xx-rel (SDP) | 966 |<--------------------| 967 | F3 PRACK | 968 |-------------------->| 969 | F4 2xx PRA | 970 |<--------------------| 971 | | 972 |UPDATE(SDP) 4xx INV | 973 |---------\ /--------| 974 | \/ | 975 | /\ | 976 |<--------/ \------->| 977 | | 979 Figure 8 Commit/Rollback Issue with Race Condition 981 6.3. Offer in a Reliable Response 983 In RFC 3261, it is stated that when an INVITE is sent without an 984 offer, the first reliable response MUST contain an offer. There was 985 discussion on whether this rule can be loosened up. There is no clear 986 explanation why this restriction is defined. However, this rule will 987 be left as it is, unless the strong necessity to loose it up will 988 come up in the future. 990 7. Add New Offer/Answer Usage in SIP 992 This document recommends against the addition of new offer/answer 993 methods using SIP. However, it may be necessary to define new 994 offer/answer exchange methods as SIP extensions evolve. In this 995 section, what should be taken into considerations is noted. 997 7.1. Explicit Usage 999 New method definitions should define offer/answer usage explicitly 1000 without any ambiguity. 1002 7.2. Rejection of an Offer 1004 New method definitions should define how to reject an offer where 1005 possible. 1007 7.3. Backward Compatibility 1009 New methods must keep backward compatibility. 1011 7.4. Exceptional Case Handling 1013 New methods should take care of how to handle exceptional cases, 1014 message crossing case and glare case. 1016 8. IANA Considerations 1018 This document has no actions for IANA. 1020 9. Security Considerations 1022 There are not any security issues beyond the referenced RFCs. 1024 10. Acknowledgement 1026 The authors would like to thank Christer Holmberg, Rajeev Seth, 1027 Nataraju A B, Byron Campen and Jonathan Rosenberg for their thorough 1028 reviews and comments. Many of their suggestions and ideas are 1029 incorporated to complete this document. 1031 11. References 1033 11.1. Normative References 1035 [1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., 1036 Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: 1037 Session Initiation Protocol", RFC 3261, June 2002. 1039 [2] Rosenberg, J. and H. Schulzrinne, "Reliability of Provisional 1040 Responses in the Session Initiation Protocol (SIP)", RFC 3262, 1041 June 2002. 1043 [3] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with 1044 SDP", RFC 3264, June 2002. 1046 [4] Rosenberg, J., "The Session Initiation Protocol (SIP) UPDATE 1047 Method", RFC 3311, September 2002. 1049 [5] Camarillo, G., Marshall, W., and J. Rosenberg, "Integration of 1050 Resource Management and Session Initiation Protocol (SIP)", RFC 1051 3312, October 2002. 1053 11.2. Informative References 1055 [6] G. Camarillo, "The Early Session Disposition Type for the 1056 Session Initiation Protocol (SIP)", RFC 3959, December 2004. 1058 [7] Hilt, V., Camarillo, G., and J. Rosenberg, "A User Agent 1059 Profile Data Set for Media Policy", draft-ietf-sipping-media- 1060 policy-dataset-04 (work in progress), May 2007. 1062 Author's Addresses 1064 Takuya Sawada 1065 KDDI Corporation 1066 3-10-10, Iidabashi, Chiyoda-ku, Tokyo, Japan 1068 Email: tu-sawada@kddi.com 1070 Paul H. Kyzivat 1071 Cisco Systems, Inc. 1072 1414 Massachusetts Avenue 1073 Boxborough, MA 01719 1074 USA 1076 Email: pkyzivat@cisco.com 1078 Full Copyright Statement 1080 Copyright (C) The IETF Trust (2007). 1082 This document is subject to the rights, licenses and restrictions 1083 contained in BCP 78, and except as set forth therein, the authors 1084 retain all their rights. 1086 This document and the information contained herein are provided on an 1087 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1088 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1089 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1090 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1091 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1092 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1094 Intellectual Property Statement 1096 The IETF takes no position regarding the validity or scope of any 1097 Intellectual Property Rights or other rights that might be claimed to 1098 pertain to the implementation or use of the technology described in 1099 this document or the extent to which any license under such rights 1100 might or might not be available; nor does it represent that it has 1101 made any independent effort to identify any such rights. Information 1102 on the procedures with respect to rights in RFC documents can be 1103 found in BCP 78 and BCP 79. 1105 Copies of IPR disclosures made to the IETF Secretariat and any 1106 assurances of licenses to be made available, or the result of an 1107 attempt made to obtain a general license or permission for the use of 1108 such proprietary rights by implementers or users of this 1109 specification can be obtained from the IETF on-line IPR repository at 1110 http://www.ietf.org/ipr. 1112 The IETF invites any interested party to bring to its attention any 1113 copyrights, patents or patent applications, or other proprietary 1114 rights that may cover technology that may be required to implement 1115 this standard. Please address the information to the IETF at 1116 ietf-ipr@ietf.org. 1118 Acknowledgment 1120 Funding for the RFC Editor function is provided by the IETF 1121 Administrative Support Activity (IASA).