idnits 2.17.1 draft-ietf-sipping-sip-offeranswer-03.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 945. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 956. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 963. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 969. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 1) being 59 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 305 instances of too long lines in the document, the longest one being 5 characters in excess of 72. ** 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 409: '... "It MUST NOT generate a new ...' RFC 2119 keyword, line 410: '...ed or rejected. It MUST NOT generate a...' RFC 2119 keyword, line 655: '... line) MUST NOT change for th...' RFC 2119 keyword, line 850: '...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 (August 28, 2007) is 6086 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 (-16) exists of draft-ietf-sipping-media-policy-dataset-04 Summary: 5 errors (**), 0 flaws (~~), 4 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 Expires: February 2008 P. Kyzivat 5 Cisco Systems, Inc. 6 August 28, 2007 8 SIP (Session Initiation Protocol) Usage of Offer/Answer Model 9 draft-ietf-sipping-sip-offeranswer-03.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 Internet-Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress." 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html 34 This Internet-Draft will expire on November 28, 2007. 36 Abstract 38 SIP utilizes offer/answer model to establish and update multimedia 39 sessions. The descriptions on how to use offer/answer in SIP are 40 dispersed in the multiple RFCs. This document summarizes all the 41 current usage of offer/answer model in SIP communication. 43 Table of Contents 45 1. Summary of SIP usage of Offer/Answer Model...................2 46 1.1. Offer/Answer Exchange Pairs in SIP Messages.............3 47 1.2. Rejection against an Offer..............................4 48 1.3. Session Description which is not Offer nor Answer.......5 49 2. Detailed Discussion on Offer/Answer Model for SIP............5 50 2.1. Offer/Answer for INVITE method with 100rel extension....5 51 2.1.1. INVITE Request with SDP............................6 52 2.1.2. INVITE request without SDP.........................8 53 2.2. Offer/Answer Exchange in Early Dialog...................9 54 2.3. Offer/Answer Exchange in Established Dialog.............9 55 3. Exceptional Case Handling...................................10 56 3.1. Message Crossing Case Handling.........................10 57 3.2. Glare Case Handling....................................11 58 4. Content of Offers and Answers...............................12 59 4.1. General Principle for Constructing Offers and Answers..12 60 4.2. Choice of Media Types and Formats to Include and Exclude13 61 4.2.1. Sending Initial INVITE with Offer.................13 62 4.2.2. Responding with Offer when Initial INVITE has no 63 Offer....................................................13 64 4.2.3. Answering Initial INVITE with Offer...............14 65 4.2.4. Answering when Initial INVITE had no Offer........14 66 4.2.5. Subsequent Offers and Answers.....................14 67 4.3. Hold and Resume of media...............................15 68 5. Remaining Issues or Best Practices on Offer/Answer..........16 69 5.1. Rejecting PRACK Offer..................................17 70 5.2. Commit/Rollback of Offer/Answer on Unsuccessful re-INVITE 71 Transaction.................................................17 72 5.3. Offer in a Reliable Response...........................19 73 6. Add New Offer/Answer Usage in SIP...........................19 74 6.1. Explicit Usage.........................................19 75 6.2. Rejection of an Offer..................................19 76 6.3. Backward Compatibility.................................20 77 6.4. Exceptional Case Handling..............................20 78 7. Security Considerations.....................................20 79 8. References..................................................20 80 8.1. Normative References...................................20 81 8.2. Informative References.................................20 82 Author's Addresses.............................................21 83 Full Copyright Statement.......................................21 84 Intellectual Property Statement................................21 85 Acknowledgment.................................................22 87 1. Summary of SIP usage of Offer/Answer Model 89 The offer/answer model itself is independent from the higher layer 90 application protocols which utilize it. SIP is one of the 91 applications using offer/answer model. RFC 3264 [3] defines the 92 offer/answer model, but does not specify which SIP message should 93 convey an offer or an answer. This should be defined in the SIP core 94 and extensions RFCs. 96 In theory, any SIP message can include a session description in its 97 body. But a session description in a SIP message is not necessarily 98 an offer or an answer. Only the session description that conforms to 99 the rules described in the standards-track RFCs can be interpreted as 100 an offer or an answer. The rules for how to handle the offer/answer 101 model are currently defined in several RFCs. 103 The offer/answer model defines the update of sessions. In SIP, dialog 104 is used to match the offer/answer exchange to the session which is to 105 be updated with it. In other words, only the offer/answer exchange in 106 the SIP dialog can update the session which is managed with it. 108 1.1. Offer/Answer Exchange Pairs in SIP Messages 110 Currently, the rules on offer/answer model are defined in RFC 3261 111 [1], RFC 3262 [2] and RFC 3311 [4]. In these RFCs, only the six 112 patterns shown in Table 1 are defined for exchanging an offer and an 113 answer with SIP messages. 115 Note that an offer/answer exchange initiated by an INVITE request 116 must follow exactly one of the patterns 1, 2, 3, 4. When an initial 117 INVITE causes multiple dialogs due to forking, an offer/answer 118 exchange is carried out independently in each distinct dialog. 119 Pattern 2 and pattern 4 can occur only when the INVITE request does 120 not include an offer. 'The first reliable non-failure message' must 121 have an offer if there is no offer in the INVITE request. This means 122 that UA which receives the INVITE request without an offer must 123 include an offer in the first reliable response with 100rel extension. 124 If no reliable provisional response has been sent, the UAS must 125 include an offer when sending 2xx response. 127 In pattern 3, the first reliable provisional response may or may not 128 have an answer. When a reliable provisional response contains a 129 session description, and is the first to do so, then that session 130 description is the answer to the offer in the INVITE request. The 131 answer can not be updated, and a new offer can not be sent, in a 132 subsequent reliable response for the same INVITE transaction. 134 In pattern 5, a PRACK request can contain an offer only if the 135 reliable response which it acknowledges contains an answer in the 136 previous offer/answer exchange. 138 Offer Answer RFC Ini Est Early 139 ------------------------------------------------------------------- 140 1. INVITE Req. 2xx INVITE Resp. RFC 3261 O O X 141 2. 2xx INVITE Resp. ACK Req. RFC 3261 O O X 142 3. INVITE Req. 1xx-rel INVITE Resp. RFC 3262 O O X 143 4. 1xx-rel INVITE Resp. PRACK Req. RFC 3262 O O X 144 5. PRACK Req. 200 PRACK Resp. RFC 3262 X O O 145 6. UPDATE Req. 2xx UPDATE Resp. RFC 3311 X O O 147 Table 1. Summary of SIP Usage of Offer/Answer Model 149 In Table 1, '1xx-rel' corresponds to the reliable provisional 150 response which contains the 100rel option defined in RFC 3262 [2]. 152 The 'Ini' column shows the ability to exchange the offer/answer to 153 initiate the session. 'O' indicates that the pattern can be used in 154 the initial offer/answer exchange, while 'X' indicates that it can 155 not. Only the initial INVITE transaction can be used to exchange the 156 offer/answer to establish multimedia session. 158 The 'Est' column shows the ability to update the established session. 160 The 'Early' column indicates which patterns may be used to modify the 161 established session in an early dialog. There are two ways to 162 exchange a subsequent offer/answer in an early dialog. 164 1.2. Rejection against an Offer 166 How to reject an offer when it can not be accepted is not so clear 167 and some methods can not allow explicit rejection against an offer. 168 Corresponding to the patterns in Table 1, how to reject an offer is 169 shown in Table 2. 171 When a UA receives an INVITE request with an unacceptable offer, it 172 should respond with a 488 response, preferably with Warning header 173 field indicating the reason of the rejection, unless another response 174 code is more appropriate to reject it. (Pattern 1 and Pattern 3) 176 When a UA receives an UPDATE request with an offer which it can not 177 accept, it should respond with a 488 response preferably with Warning 178 header field indicating the reason of the rejection, unless another 179 response code is more appropriate to reject it. (Pattern 6) 181 When a UA receives a PRACK request with an offer which it can not 182 accept, it may respond with a 200 response with a syntactically 183 correct session description followed by an UPDATE request possibly to 184 rearrange the session parameters if both ends support UPDATE method, 185 or alternatively terminate the dialog and send an error response to 186 the INVITE request. (Pattern 5) 188 When a UA receives a response with an offer which it can not accept, 189 a UA does not have a way to reject it explicitly. Therefore, a UA 190 should respond to the offer with the correct session description and 191 rearrange the session parameters by initiating a new offer/answer 192 exchange, or alternatively terminate the session. (Pattern 2 and 193 Pattern 4) When initiating a new offer/answer, a UA should take care 194 not to cause a never-ending offer/answer loop. 196 Offer Rejection 197 ----------------------------------------------------- 198 1. INVITE Req. 488 INVITE Response 199 2. 2xx INVITE Resp. Answer in ACK Req. followed by new offer 200 OR termination of dialog 201 3. INVITE Req. 488 INVITE Response (same as Pattern 1.) 202 4. 1xx-rel INVITE Resp. Answer in PRACK Req. followed by new offer 203 5. PRACK Req. (*) 200 PRACK Resp. followed by new offer 204 OR termination of dialog 205 6. UPDATE Req. 488 UPDATE Response 207 Table 2. Rejection against an Offer 209 (*) UA should only use PRACK to send an offer when it has strong 210 reasons to assume the receiver will accept. 212 1.3. Session Description which is not Offer nor Answer 214 As previously stated, a session description in a SIP message is not 215 necessarily an offer or an answer. For example, SIP can use a session 216 description to describe capabilities apart from offer/answer exchange. 217 Examples of this are 200 OK responses for OPTIONS and 488 responses 218 for INVITE. 220 2. Detailed Discussion on Offer/Answer Model for SIP 222 2.1. Offer/Answer for INVITE method with 100rel extension 224 The INVITE method provides the basic procedure for offer/answer 225 exchange in SIP. Without the 100rel option, the rules are simple as 226 described in RFC 3261 [1]. If an INVITE request includes a session 227 description, pattern 1 is applied and if an INVITE request does not 228 include a session description, pattern 2 is applied. 230 With 100rel, pattern 3 and pattern 4 are added and this makes the 231 rules complicated. An INVITE request may cause multiple responses. 232 Note that even if both UAs support the 100rel extension, not all the 233 provisional responses may be sent reliably. Note also that a reliable 234 provisional response is allowed without a session description if the 235 UAS does not wish to send the answer yet. An unreliable provisional 236 response may include a session description in the body if the UAS has 237 not sent a reliable response, but its session description is neither 238 an offer nor an answer. All the session descriptions in the 239 unreliable responses to the INVITE request must be identical to the 240 answer which is included in the reliable response. Session 241 descriptions in an unreliable response that precedes a reliable 242 response can be considered a "preview" of the session description 243 that will be coming, and hence may be treated like an offer or an 244 answer until the actual one arrives. 246 NOTE: This "preview" session description rule applies to a 247 single offer/answer exchange. In parallel offer/answer exchanges 248 (caused by forking) a UA may obviously receive the different 249 "preview" of answer in each dialog. UAs are expected to deal 250 with this. 252 2.1.1. INVITE Request with SDP 254 When a UAC includes an SDP body in the INVITE request as an offer, it 255 expects the answer to be received with one of the reliable responses. 256 Other than that, no offer/answer exchanges can occur in the INVITE 3- 257 way handshake process. 259 UAC UAS 260 | F1 INVITE (SDP) | <- The offer in offer/answer model 261 |-------------------->| 262 | F2 1xx (SDP) | <- The SDP is not an official answer but 263 |<--------------------| UAC acts as if it receives the answer. 264 | | ^ 265 | F3 1xx-rel (no SDP) | |<- a 1xx-rel may be sent without answer 266 |<--------------------| | SDP. 267 | F4 PRACK (no SDP) | | 268 |-------------------->| | UAC must not send a new offer. 269 | F5 2xx PRA (no SDP) | | 270 |<--------------------| v 271 | | 272 | F6 1xx-rel (SDP) | <- The answer in offer/ answer model 273 |<--------------------| - 274 | F7 PRACK | | UAC can send a new offer in a PRACK 275 |-------------------->| | request to acknowledge F6. 276 | F8 2xx PRA | | After F7 UAC and UAS can send a new offer 277 |<--------------------| v in an UPDATE request. 278 | | 279 | F9 1xx-rel | <- SDP should not be included in the 280 |<--------------------| subsequent 1xx-rel once offer/answer 281 | F10 PRACK | has been completed. 282 |-------------------->| 283 | F11 2xx PRA | 284 |<--------------------| 285 | | 286 | F12 2xx INV | <- SDP should not be included in the final 287 |<--------------------| response once offer/answer has been 288 | F13 ACK | completed. 289 |-------------------->| 291 Figure 1 Example of Offer/Answer with 100rel Extension (1) 293 For example, in Figure 1, only the SDP in F6 is the answer. The SDP 294 in the non-reliable response (F2) is the preview of the answer and 295 must be the same as the answer in F6, but is not officially the 296 answer. Receiving F2, UAC should act as if it receives the answer. 297 However, offer/answer exchange is not completed yet and UAC must not 298 send a new offer until it receives the same SDP in the first reliable 299 response, which is the real answer. After sending the SDP in F6, UAS 300 must prepare to receive new offer from UAC with an UPDATE request or 301 a PRACK request. 303 UAS does not include an SDP in the responses F9 and F12. However, UAC 304 should prepare to receive SDP bodies in F9 and/or F12, and just 305 ignore them for the case that the peer does not conform to the 306 recommended implementation. 308 2.1.2. INVITE request without SDP 310 When UAC does not include an SDP body in the INVITE request, it 311 expects the offer to be received with the first reliable response. 312 UAC will send the answer in the request to acknowledge the response, 313 i.e. PRACK or ACK request for the reliable response. Other than that, 314 no offer/answer exchanges can occur in the INVITE 3-way handshake 315 process. 317 For example, in Figure 2, only the SDP in F3 is the offer. The SDP in 318 the non-reliable response (F2) is the preview of the offer and must 319 be the same as the offer in F3, but is not officially the offer. 320 Receiving F2, UAC can act as if it receives the offer. However, the 321 official offer is not received until it receives the first reliable 322 response. The first reliable response (F3) must include an SDP as an 323 offer. 325 UAS should not include SDP in the responses F6 and F9. However, UAC 326 should prepare to receive SDP bodies in F6 and/or F9, and just ignore 327 them for the case that the peer does not conform to the recommended 328 implementation. 330 UAC UAS 331 | F1 INVITE (no SDP) | 332 |-------------------->| 333 | F2 1xx (SDP) | <- SDP may be included but it is not the 334 |<--------------------| offer. UAC may act as if it receives 335 | | the offer. 336 | F3 1xx-rel (SDP) | <- The first 1xx-rel must contain an SDP 337 |<--------------------| as the offer. 338 | F4 PRACK (SDP) | <- A PRACK request to the first 1xx-rel 339 |-------------------->| must contain an SDP as the answer. 340 | F5 2xx PRA (no SDP) | - 341 |<--------------------| | 342 | | | 343 | F6 1xx-rel (no SDP) | <- The subsequent 1xx-rel should not 344 |<--------------------| | contain an SDP. 345 | F7 PRACK | | 346 |-------------------->| | UAC can send a new offer in an UPDATE 347 | F8 2xx PRA | | request after F4. 348 |<--------------------| v 349 | | 350 | F9 2xx INV (no SDP) | <- The final response should not 351 |<--------------------| contain an SDP. 352 | F10 ACK | 353 |-------------------->| 355 Figure 2 Example of Offer/Answer with 100rel Extension (2) 357 2.2. Offer/Answer Exchange in Early Dialog 359 When both UAs support the 100rel extension, they can update the 360 session in the early dialog once the first offer/answer exchange has 361 been completed. 363 From UA sending an INVITE request: 365 UA can send an UPDATE request with a new offer if both ends support 366 the UPDATE method. Support for the UPDATE method must be declared in 367 an Allow header in some prior messages in the dialog. 369 UA can send a PRACK request with a new offer only when acknowledging 370 the reliable provisional response with the answer to the offer in the 371 INVITE request. Compared to using the UPDATE method, using PRACK can 372 save messages to be exchanged between the UAs. However, as a PRACK 373 request should not be rejected, UA is recommended to send a PRACK 374 request only when it has strong reasons to assume the receiver will 375 accept it. For example, the procedure used in precondition extension 376 [5] is a case where a PRACK request should be used for updating the 377 session status in the early dialog. 379 From UA receiving an INVITE request: 381 UA can send an UPDATE request with a new offer if both ends support 382 UPDATE method. UAS can not send a new offer in the reliable 383 provisional response. So the UPDATE method is the only method for UAS 384 to update the early session. 386 2.3. Offer/Answer Exchange in Established Dialog 388 The re-INVITE and UPDATE methods can be used in the established 389 dialog to update the session. 391 The UPDATE method is simpler and can save at least one message 392 compared with INVITE method. But both ends must support the UPDATE 393 method for it to be used. 395 The INVITE method needs at least three messages to complete but no 396 extensions are needed. Additionally, the INVITE method allows the 397 peer to take time to decide whether it will accept a session update 398 or not by sending provisional responses. That is, re-INVITE allows 399 the UAS to interact with the user at the peer, while UPDATE needs to 400 be answered automatically by the UAS. It is noted that re-INVITE 401 should be answered immediately unless such a user interaction is 402 needed. Otherwise, some 3pcc flows will break. 404 3. Exceptional Case Handling 406 In RFC 3264 [3], the following restrictions are defined with regard 407 to sending a new offer. 409 "It MUST NOT generate a new offer if it has received an offer 410 which it has not yet answered or rejected. It MUST NOT generate a 411 new offer if it has generated a prior offer for which it has not 412 yet received an answer or a rejection." 414 Assuming that the above rules are guaranteed, there seems to be two 415 possible 'exceptional' cases to be considered in SIP offer/answer 416 usage, which are the 'message crossing' case and the 'glare' case. 417 One of the reasons why the usage of a SIP method to exchange 418 offer/answer needs to be carefully restricted in the RFCs is to make 419 sure that UA can detect and handle appropriately the 'exceptional' 420 cases to avoid the confusion. 422 3.1. Message Crossing Case Handling 424 When message packets are crossed in the transport network, an offer 425 may be received before the answer for the previous offer/answer 426 exchange as described in Figure 3. In such a case, UA A must detect 427 the session description of the offer2 is not the answer to the offer1. 429 A B 430 |offer1 | 431 |----------------->| 432 | answer1| 433 |<------\ /-------| 434 | \/ | 435 | /\ offer2| 436 |<------/ \-------| 438 Figure 3 Message Crossing Case 440 When offer2 is in an UPDATE request or a re-INVITE request, a session 441 description can never be the answer. Then UA A must reject the 442 message including offer2 with a 491 response with Retry-After header 443 field. 445 When offer2 is in a PRACK request, that is, when a PRACK request to 446 acknowledge the reliable provisional response with an answer to the 447 offer in the INVITE request contains a session description, UA A 448 knows it is an offer. As a PRACK request should not be rejected, UA A 449 is recommended to wait for the answer1 before sending a PRACK 450 response with the answer to the offer2. Note that if UA A does not 451 send a new offer until the reliable provisional response with an 452 answer to the offer in the INVITE request is acknowledged with a 453 PRACK request, this case never happens. Therefore, to make 454 implementations simple, a UA acting as a UAS for an INVITE 455 transaction is recommended not to send an UPDATE request with an 456 offer until the reliable response with an answer to the offer in the 457 INVITE request is acknowledged with a PRACK request. 459 When offer2 is in a reliable provisional response or a successful 460 final response, UA A knows it is not the answer to the offer1. For a 461 reliable response to an initial INVITE request, this case never 462 happens. For a reliable response to a re-INVITE request, UA A can 463 detect the offer2 is not the answer1. In this case, UA A can not 464 reject offer2 in a reliable response, it is recommended to wait for 465 answer1 before sending a PRACK request with the answer to offer2. 466 Note that this case only occurs when UA A, while waiting for an 467 answer, sends an INVITE request without session description. 469 3.2. Glare Case Handling 471 When both ends in a dialog send a new offer at nearly the same time, 472 UA may receive a new offer before it receives the answer to the offer 473 it sent as described in Figure 4. This case is called a 'glare' case 474 in general. 476 A B 477 |offer1 offer2| 478 |-------\ /-------| 479 | \/ | 480 | /\ | 481 |<------/ \------>| 483 Figure 4 Glare Case 485 When offer2 is in an UPDATE request or (re-)INVITE request, it must 486 be rejected with a 491 response. 488 When offer2 is in a PRACK request (within the current rules, only 489 possible if offer1 is in an UPDATE request), the PRACK may be 490 accepted with 200 or may be rejected with a 491 response. A 491 491 response is valid to satisfy the offer/answer model but it may delay 492 the completion of the reliable response transfer mechanism or, in 493 worst case, may result in the failure to complete the SIP transaction 494 because there is no clear retry rule when a PRACK request is rejected 495 with a 491 response. To avoid this glare condition, UA A should not 496 send an offer if it has already sent a reliable provisional response 497 containing an answer to a previous offer and has not received the 498 corresponding PRACK request. 500 To avoid a glare condition involving an offer in a response, when UA 501 A has sent a (re)INVITE request without session description, it 502 should not send an offer until it has received an offer in a reliable 503 response to the (re)INVITE, and sent an answer to that offer. 505 4. Content of Offers and Answers 507 While RFCs 3264[3] and 3312[5] give some guidance, questions remain 508 about exactly what should be included in an offer or answer. This is 509 especially a problem when the common "hold" feature has been 510 activated, and when there is the potential for a multimedia call. 512 Details of behavior depend on the capabilities and state of the User 513 Agent. The kinds of recommendations that can be made are limited by 514 the model of device capabilities and state that is presumed to exist. 516 This section focuses on a few key aspects of offers and answers that 517 have been identified as troublesome, and will consider other aspects 518 to be out of scope. This section considers: 520 - choice of supported media types and formats to include and exclude 522 - hold and resume of media 524 The following are out of scope for this document: 526 - NAT traversal and ICE 528 - specific codecs and their parameters 530 - the negotiation of secure media streams 532 - grouping of media streams 534 - preconditions 536 4.1. General Principle for Constructing Offers and Answers 538 A UA should send an offer that indicates what it, and its user, are 539 interested in using/doing at that time, without regard for what the 540 other party in the call may have indicated previously. This is the 541 case even when the offer is sent in response to an INVITE or re- 542 INVITE that contains no offer. (However in the case of re-INVITE the 543 constraints of RFCs 3261 and 3264 must be observed.) 545 A UA should send an answer that includes as close an approximation to 546 what the UA and its user are interested in doing at that time, while 547 remaining consistent with the offer/answer rules of RFC 3264[3] and 548 other RFCs. 550 NOTE: "at that time" is important. The device may permit the 551 user to configure which supported media are to be used by 552 default. 554 In some cases a UA may not have direct knowledge of what it is 555 interested in doing at a particular time. If it is an intermediary it 556 may be able to delegate the decision. In the worst case it may apply 557 a default, such as assuming it wants to use all of its capabilities. 559 4.2. Choice of Media Types and Formats to Include and Exclude 561 4.2.1. Sending Initial INVITE with Offer 563 When a UAC sends an initial INVITE with an offer, it has complete 564 freedom to choose which media type(s) and media format(s) (payload 565 types in the case of RTP) it should include in the offer. 567 The media types may be all or a subset of the media the UAC is 568 capable of supporting, with the particular subset being determined by 569 the design and configuration [6] of the UAC combined with input from 570 the user interface of the UAC. 572 The media formats may be all or a subset of the media formats the UAC 573 is capable of supporting for the corresponding media type, with the 574 particular subset being determined by the design and configuration 575 [6] of the UAC combined with input from the user interface of the UAC. 577 Including all supported media formats will maximize the possibility 578 that the other party will have a supported format in common. But 579 including many can result in an unacceptably large SDP body. 581 4.2.2. Responding with Offer when Initial INVITE has no Offer 583 When a UAS has received an initial INVITE without an offer, it must 584 include an offer in the first reliable response to the INVITE. It has 585 largely the same options as when sending an initial INVITE with an 586 offer, but there are some differences. The choice may be governed by 587 both static (default) selections of media types as well as dynamic 588 selections made by a user via interaction with the device while it is 589 alerting. 591 NOTE: The offer may be sent in a provisional response, before 592 the user of the device has been alerted and had an opportunity 593 to select media options for the call. In this case the UAS 594 cannot include any call-specific options from the user of the 595 device. If there is a possibility that the user of the device 596 will wish to change what is offered before answering the call, 597 then special care should be taken. If PRACK and UPDATE are 598 supported by caller and callee then an initial offer can be sent 599 reliably, and changed with an UPDATE if the user desires a 600 change. If PRACK and UPDATE are not supported then the initial 601 offer cannot be changed until the call is fully established. In 602 that case either the offer should be delayed until the 200 is 603 sent, or else the offer should include the minimum set of media 604 the user is able to select. 606 4.2.3. Answering Initial INVITE with Offer 608 When a UAS receives an initial INVITE with an offer, what media lines 609 the answer may contain is constrained by RFC 3264.[3] The answer must 610 contain the same number of m-lines as the offer, and they must 611 contain the same media types. Each media line may be accepted, by 612 including a non-zero port number, or rejected by including a zero 613 port number in the answer. The media lines that are accepted should 614 typically be those that would have been offered had the INVITE not 615 contained an offer, but with those not offered removed. 617 The media formats the answer may contain are constrained by RFC 3264 618 [3]. For each accepted m-line in the answer, there must be at least 619 one media format in common with the corresponding m-line of the offer. 620 The UAS may also include other media formats it is able to support at 621 this time. However there is little benefit to including added types. 623 If the UAS does not wish to indicate support for any of the media 624 types in a particular media line of the offer it must reject the 625 corresponding media line, by setting the port number to zero. 627 4.2.4. Answering when Initial INVITE had no Offer 629 When a UAC has sent an initial INVITE without an offer, and then 630 receives a response with the first offer, it should answer in the 631 same way as a UAS receiving an initial INVITE with an offer. 633 4.2.5. Subsequent Offers and Answers 635 The guidelines above (sections 4.1. and 4.2.1. through 4.2.4. ) apply, 636 but constraints in RFC 3264 [3] must also be followed. The following 637 are of particular note because they have proven troublesome: 639 o The number of m-lines may not be reduced in a subsequent offer. 640 Previously rejected media streams must remain, or be reused to 641 offer the same or a different stream. 643 o In the o-line, only the version number may change, and if it 644 changes it must increment by one from the one previously sent as 645 an offer or answer. If it doesn't change then the entire SDP body 646 must be identical to what was previously sent as an offer or 647 answer. Changing the o-line, except version number value, during 648 the session is an error case. The behavior when receiving such a 649 non-compliant offer/answer SDP is implementation dependent. If a 650 UA needs to negotiate a 'new' SDP session, it should use the 651 INVITE/Replaces method. 653 o In the case of RTP, the mapping from a particular dynamic payload 654 type number to a particular codec within that media stream (m- 655 line) MUST NOT change for the duration of the session. 657 NOTE: This may be impossible for a B2BUA to follow in some cases 658 (e.g. 3pcc transfer) if it does not terminate media. 660 4.3. Hold and Resume of media 662 RFC 3264 [3] specifies (non-normatively) that "hold" should be 663 indicated in an established session by sending a new offer containing 664 "a=sendonly" for each media stream to be held. An answerer is then to 665 respond with "a=recvonly" to acknowledge that the hold request has 666 been understood. 668 Note that the use of sendonly/recvonly is not limited to hold. These 669 may be used for other reasons, such as devices that are only capable 670 of sending or receiving. So receiving an offer with "a=sendonly" must 671 not be treated as a certain indication that the offerer has placed 672 the media stream on hold. 674 This model is based on an assumption that the UA initiating the hold 675 will want to play Music on Hold, which is not always the case. A UA 676 may, if desired, initiate hold by offering "a=inactive" if it does 677 not intend to transmit any media while in hold status. 679 The rules of RFC 3264 [3] constrain what may be in an answer when the 680 offer contains "sendonly", "recvonly", or "inactive" in an a= line. 681 But they do not constrain what must be in a subsequent offer. The 682 General Principle for Constructing Offers and Answers (section 4.1. ) 683 is important here. The initiation of "hold" is a local action. It 684 should affect the desired state of the UA. It then affects what the 685 UA includes in offers and answers until the local state is reset. 687 The receipt of an offer containing "a=sendonly" or "a=inactive" and 688 the sending of a compatible answer should not change the desired 689 state of the recipient. However, a UA that has been "placed on hold" 690 may itself desire to initiate its own hold status, based on local 691 input. 693 If UA2 has previously been "placed on hold" by UA1, via receipt of 694 "a=sendonly", then it may initiate its own hold by sending a new 695 offer containing "a=sendonly" to UA1. Upon receipt of that, UA1 will 696 answer with "a=inactive" because that is the only valid answer that 697 reflects its desire not to receive media. 699 Once in this state, to resume a two way exchange of media each side 700 must reset its local hold status. If UA1 is first to go off hold it 701 will then send an offer with "a=sendrecv". The UA2 will respond with 702 its desired state of "a=sendonly" because that is a permitted 703 response. When UA2 desires to also resume, it will send an offer with 704 "a=sendrecv". In this case, because UA1 has the same desire it will 705 respond "a=sendrecv". 707 If UA2 has been "placed on hold" by UA1 via receipt of "a=inactive", 708 and subsequently wants to initiate its own hold, also using 709 "a=inactive", it need not send a new offer, since the only valid 710 response is "a=inactive" and that is already in effect. However, its 711 local desired state will now be either "inactive". This affects what 712 it will send in future offers and answers. 714 If a UA has occasion to send another offer in the session, without 715 any desire to change the hold status (e.g. in response to a re-INVITE 716 without an offer, or when sending a re-INVITE to refresh the session 717 timer) it should follow the General Principle for Constructing Offers 718 and Answers (section 4.1. ) If it previously initiated a "hold" by 719 sending "a=sendonly" or "a=inactive" then it should offer that again. 720 If it had not previously initiated "hold" then it should offer 721 "a=sendrecv", even if it had previously been forced to answer 722 something else. Without this behavior it is possible to get "stuck on 723 hold" in some cases, especially when a third-party call controller is 724 involved. 726 5. Remaining Issues or Best Practices on Offer/Answer 728 This document clarifies the offer/answer usage in SIP and summarizes 729 the correct or recommended behaviors along with the existing RFCs. To 730 create any new normative behaviors beyond these RFCs is not the 731 intent of this document. 733 However, through the scrutiny of the offer/answer model in SIP, some 734 issues are found to be unresolved within the current set of RFCs. 735 Those remaining issues are described in this section mainly for 736 further study. 738 5.1. Rejecting PRACK Offer 740 As stated in section 1.2. and 2.2. , it is recommended not to send an 741 offer in a PRACK request unless UAC has strong reasons to assume the 742 receiver will accept it. Even so, there may be the cases when the UAS 743 has to reject the offer for some reason. The current RFCs do not 744 provide the way to reject the offer and at the same time to 745 acknowledge the reliable response. 747 Several ideas were presented to resolve this issue, such as sending 748 2xx PRACK response without SDP to reject the offer, or sending an SDP 749 with decreased o-line version value. Some of the candidates may also 750 be adapted as a way to reject an unacceptable offer in a response. 751 Anyway, those candidates violate the current rules and lose backward 752 compatibility to some extent (e.g. section 5 of RFC 3262). It is 753 beyond the scope of this document and remains for further study. 755 NOTE: Deprecation of the usage of offer in PRACK may be another 756 solution. As the precondition mechanism specification [2] 757 explicitly shows a usage of sending offer in PRACK, its 758 deprecation could cause backward compatibility issues. 760 5.2. Commit/Rollback of Offer/Answer on Unsuccessful re-INVITE 761 Transaction 763 When a re-INVITE transaction fails, often the dialog remains with the 764 session bound to it. The issue here is what the session status is if 765 offer/answer exchange has been completed (if a session description 766 has been sent in a reliable provisional response to the re-INVITE 767 request), or if subsequent offer/answer exchanges have taken place 768 (using UPDATE or PRACK transactions), before the re-INVITE 769 transaction is terminated with a final error response (Figure 5). One 770 option is to take those offer/answer exchanges not committed yet and 771 to make the session status rollback to the one before re-INVITE 772 transaction was initiated. Another option is to take those exchanges 773 committed and to keep the session status as it is even after re- 774 INVITE fails. There is no clear consensus on which one is the correct 775 behavior. 777 There are some cases where it is useful to exchange 778 offer(s)/answer(s) even before re-INVITE completes. The case of 779 adding a new media (like adding video to audio only session) which 780 requires permission from the peer through some user interaction is 781 one example. Precondition procedures can be another case which may 782 require several offer/answer exchanges in one re-INVITE transaction. 784 UAC UAS 785 | session established | 786 |<===================>| 787 | | 788 | F1 re-INVITE (SDP) | 789 |-------------------->| 790 | F2 1xx-rel (SDP) | 791 |<--------------------| 792 | F3 PRACK | <- PRACK request may include new offer and 793 |-------------------->| can complete the offer/answer with 794 | F4 2xx PRA | the answer in 2xx PRACK response. 795 |<--------------------| 796 | | <- UPDATE method can update the session 797 | | status before receiving the final 798 | F5 4xx/5xx/6xx INV | response to re-INVITE request (F1). 799 |<--------------------| 800 | F6 ACK | 801 |-------------------->| Issue: What is the correct session status 802 | | after re-INVITE transaction. 804 Figure 5 Commit/Rollback Issue with re-INVITE transaction 806 To make bad things worse, if a new offer from UAC and the final 807 response to re-INVITE are sent at nearly the same time, the UAS can 808 not know whether this new offer was sent before or after UAC received 809 the final failure response (Figure 6). Note that the ACK request to 810 the failure response is sent hop-by-hop basis, therefore even after 811 receiving the ACK request, UAS can not make sure that UPDATE request 812 was sent after the final response had been reached to the other end. 814 Sending a new UPDATE request from UAC to synchronize the status 815 anytime after the re-INVITE fails may be a good option. This solution, 816 however, requires that the UPDATE method be supported by both ends 817 and needs care to avoid flapping when each end tries to advertise 818 their different views of the session status. 820 The proper handling of this issue is undefined by existing standards. 821 Resolution is beyond the scope of this document, and will require a 822 new normative document. Such a document is the responsibility of the 823 SIP working group, and is for further study. 825 UAC UAS 826 | session established | 827 |<===================>| 828 | | 829 | F1 re-INVITE (SDP) | 830 |-------------------->| 831 | F2 1xx-rel (SDP) | 832 |<--------------------| 833 | F3 PRACK | 834 |-------------------->| 835 | F4 2xx PRA | 836 |<--------------------| 837 | | 838 |UPDATE(SDP) 4xx INV | 839 |---------\ /--------| 840 | \/ | 841 | /\ | 842 |<--------/ \------->| 843 | | 845 Figure 6 Commit/Rollback Issue with Race Condition 847 5.3. Offer in a Reliable Response 849 In RFC 3261, it is stated that when an INVITE is sent without an 850 offer, the first reliable response MUST contain an offer. There was 851 discussion on whether this rule can be loosened up. There is no clear 852 explanation why this restriction is defined. However, this rule will 853 be left as it is, unless the strong necessity to loose it up will 854 come up in the future. 856 6. Add New Offer/Answer Usage in SIP 858 It is not recommended to add new SIP methods for the offer/answer 859 exchange beyond the ways described in this document. However, it may 860 be requested to have new offer/answer exchange methods as SIP 861 extensions evolve. In this clause, what should be taken into 862 considerations is noted. 864 6.1. Explicit Usage 866 New method definitions should define offer/answer usage explicitly 867 without any ambiguity. 869 6.2. Rejection of an Offer 871 New method definitions should define how to reject an offer where 872 possible. 874 6.3. Backward Compatibility 876 New methods must keep backward compatibility. 878 6.4. Exceptional Case Handling 880 New methods should take care of how to handle exceptional cases, 881 message crossing case and glare case. 883 7. Security Considerations 885 There are not any security issues beyond the referenced RFCs. 887 8. References 889 8.1. Normative References 891 [1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., 892 Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: 893 Session Initiation Protocol", RFC 3261, June 2002. 895 [2] Rosenberg, J. and H. Schulzrinne, "Reliability of Provisional 896 Responses in the Session Initiation Protocol (SIP)", RFC 3262, 897 June 2002. 899 [3] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with 900 SDP", RFC 3264, June 2002. 902 [4] Rosenberg, J., "The Session Initiation Protocol (SIP) UPDATE 903 Method", RFC 3311, September 2002. 905 [5] Camarillo, G., Marshall, W., and J. Rosenberg, "Integration of 906 Resource Management and Session Initiation Protocol (SIP)", RFC 907 3312, October 2002. 909 8.2. Informative References 911 [6] Hilt, V., Camarillo, G., and J. Rosenberg, "A User Agent 912 Profile Data Set for Media Policy", draft-ietf-sipping-media- 913 policy-dataset-04 (work in progress), May 2007. 915 Author's Addresses 917 Takuya Sawada 918 KDDI Corporation 919 3-10-10, Iidabashi, Chiyoda-ku, Tokyo, Japan 921 Email: tu-sawada@kddi.com 923 Paul H. Kyzivat 924 Cisco Systems, Inc. 925 1414 Massachusetts Avenue 926 Boxborough, MA 01719 927 USA 929 Email: pkyzivat@cisco.com 931 Full Copyright Statement 933 Copyright (C) The IETF Trust (2007). 935 This document is subject to the rights, licenses and restrictions 936 contained in BCP 78, and except as set forth therein, the authors 937 retain all their rights. 939 This document and the information contained herein are provided on an 940 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 941 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 942 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 943 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 944 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 945 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 947 Intellectual Property Statement 949 The IETF takes no position regarding the validity or scope of any 950 Intellectual Property Rights or other rights that might be claimed to 951 pertain to the implementation or use of the technology described in 952 this document or the extent to which any license under such rights 953 might or might not be available; nor does it represent that it has 954 made any independent effort to identify any such rights. Information 955 on the procedures with respect to rights in RFC documents can be 956 found in BCP 78 and BCP 79. 958 Copies of IPR disclosures made to the IETF Secretariat and any 959 assurances of licenses to be made available, or the result of an 960 attempt made to obtain a general license or permission for the use of 961 such proprietary rights by implementers or users of this 962 specification can be obtained from the IETF on-line IPR repository at 963 http://www.ietf.org/ipr. 965 The IETF invites any interested party to bring to its attention any 966 copyrights, patents or patent applications, or other proprietary 967 rights that may cover technology that may be required to implement 968 this standard. Please address the information to the IETF at 969 ietf-ipr@ietf.org. 971 Acknowledgment 973 Funding for the RFC Editor function is provided by the IETF 974 Administrative Support Activity (IASA).