idnits 2.17.1 draft-ietf-sipcore-keep-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 6, 2010) is 4981 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) == Missing Reference: 'RFCXXXX' is mentioned on line 618, but not defined ** Obsolete normative reference: RFC 5389 (Obsoleted by RFC 8489) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SIPCORE Working Group C. Holmberg 3 Internet-Draft Ericsson 4 Intended status: Standards Track September 6, 2010 5 Expires: March 10, 2011 7 Indication of support for keep-alive 8 draft-ietf-sipcore-keep-06.txt 10 Abstract 12 This specification defines a new Session Initiation Protocol (SIP) 13 Via header field parameter, "keep", which allows adjacent SIP 14 entities to explicitly negotiate usage of the Network Address 15 Translation (NAT) keep-alive mechanisms defined in SIP Outbound, in 16 cases where SIP Outbound is not supported, cannot be applied, or 17 where usage of keep-alives is not implicitly negotiated as part of 18 the SIP Outbound negotiation. 20 Status of this Memo 22 This Internet-Draft is submitted to IETF in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on March 10, 2011. 37 Copyright Notice 39 Copyright (c) 2010 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.1. Use-case: Dialog from non-registered UAs . . . . . . . . . 3 56 1.2. Use-case: SIP Outbound not supported . . . . . . . . . . . 3 57 1.3. Use-case: SIP dialog initiated Outbound flows . . . . . . 3 58 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 3. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 4. User Agent and Proxy behavior . . . . . . . . . . . . . . . . 4 61 4.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 4 62 4.2. Lifetime of keep-alives . . . . . . . . . . . . . . . . . 5 63 4.2.1. General . . . . . . . . . . . . . . . . . . . . . . . 5 64 4.2.2. Keep-alives associated with registration . . . . . . . 5 65 4.2.3. Keep-alives associated with dialog . . . . . . . . . . 6 66 4.3. Behavior of a SIP entity willing to send keep-alives . . . 6 67 4.4. Behavior of a SIP entity willing to receive keep-alives . 7 68 5. Keep-alive frequency . . . . . . . . . . . . . . . . . . . . . 8 69 6. Connection reuse . . . . . . . . . . . . . . . . . . . . . . . 9 70 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 7.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 9 72 7.2. Keep-alive negotiation associated with registration: 73 UA-proxy . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 7.3. Keep-alive negotiation associated with dialog: UA-proxy . 11 75 7.4. Keep-alive negotiation associated with dialog: UA-UA . . . 12 76 8. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 77 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 78 9.1. keep . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 79 10. Security Considerations . . . . . . . . . . . . . . . . . . . 15 80 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 16 81 12. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . 16 82 13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16 83 13.1. Normative References . . . . . . . . . . . . . . . . . . . 16 84 13.2. Informative References . . . . . . . . . . . . . . . . . . 17 85 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 17 87 1. Introduction 89 Section 3.5 of SIP Outbound [RFC5626] defines two keep-alive 90 mechanisms. Even though the keep-alive mechanisms are separated from 91 the rest of the SIP Outbound mechanism, SIP Outbound does not define 92 a mechanism to explicitly negotiate usage of the keep-alive 93 mechanisms. In some cases usage of keep-alives can be implicitly 94 negotiated as part of the SIP Outbound negotiation. 96 However, there are SIP Outbound use-cases where usage of keep-alives 97 is not implicitly negotiated as part of the SIP Outbound negotiation. 98 In addition, there are cases where SIP Outbound is not supported, or 99 where it cannot be applied, but where there is still a need to be 100 able to negotiate usage of keep-alives. Last, [RFC5626] only allows 101 keep-alives to be negotiated between a UA and an edge proxy, and not 102 between other SIP entities. 104 This specification defines a new Session Initiation Protocol (SIP) 105 [RFC3261] Via header field parameter, "keep", which allows adjacent 106 SIP entities to explicitly negotiate usage of the NAT keep-alive 107 mechanisms defined in SIP Outbound. The "keep" parameter allows SIP 108 entities to indicate willingness to send keep-alives, to indicate 109 willingness to receive keep-alives, and for SIP entities willing to 110 receive keep-alives to provide a recommended keep-alive frequency. 112 The following sections describe use-cases where a mechanism to 113 explicitly negotiate usage of keep-alives is needed. 115 1.1. Use-case: Dialog from non-registered UAs 117 In some cases a User Agent Client (UAC) does not register itself 118 before it establishes a dialog, but in order to maintain NAT bindings 119 open during the lifetime of the dialog it still needs to be able to 120 negotiate sending of keep-alives towards its adjacent downstream SIP 121 entity. A typical example is an emergency call, where a registration 122 is not always required in order to make the call. 124 1.2. Use-case: SIP Outbound not supported 126 In some cases all SIP entities that need to be able to negotiate the 127 usage of keep-alives might not support SIP Outbound. However, they 128 might still support the keep-alive mechanisms defined in SIP 129 Outbound, and need to be able to negotiate usage of them. 131 1.3. Use-case: SIP dialog initiated Outbound flows 133 SIP Outbound allows the establishment of flows using the initial 134 request for a dialog. As specified in [RFC5626], usage of keep- 135 alives is not implicitly negotiated for such flows. 137 2. Conventions 139 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 140 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 141 document are to be interpreted as described in BCP 14, RFC 2119 142 [RFC2119]. 144 3. Definitions 146 Edge proxy: As defined in [RFC5626], a SIP proxy that is located 147 topologically between the registering User Agent (UA) and the 148 Authoritative Proxy. 150 NOTE: In some deployments the edge proxy might physically be located 151 in the same entity as the Authoritative Proxy. 153 Keep-alives: The keep-alive messages defined in SIP Outbound 154 [RFC5626]. 156 "keep" parameter: A SIP Via header field parameter that a SIP entity 157 can insert in its Via header field of a request to explicitly 158 indicate willingness to send keep-alives towards its adjacent 159 downstream SIP entity. A SIP entity can also insert the header field 160 in a response to explicitly indicate willingness to receive keep- 161 alives from its adjacent upstream SIP entity. 163 SIP entity: SIP User Agent (UA), or proxy, as defined in [RFC3261]. 165 Adjacent downstream SIP entity: The adjacent SIP entity in the 166 direction towards which a SIP request is sent. 168 Adjacent upstream SIP entity: The adjacent SIP entity in the 169 direction from which a SIP request is received. 171 4. User Agent and Proxy behavior 173 4.1. General 175 This section describes how SIP UAs and proxies negotiate usage of 176 keep-alives associated with a registration, or a dialog, which types 177 of SIP requests can be used in order to negotiate the usage, and the 178 lifetime of the negotiated keep-alives. 180 SIP entities indicate willingness to send keep-alives towards the 181 adjacent downstream SIP entity using SIP requests. The associated 182 responses are used by SIP entities to indicate willingness to receive 183 keep-alives. SIP entities that indicate willingness to receive keep- 184 alives can provide a recommended keep-alive frequency. 186 The procedures to negotiate usage of keep-alives are identical for 187 SIP UAs and proxies. 189 In general, it can be useful for SIP entities to indicate willingness 190 to send keep-alives, even if they are not aware of any necessity for 191 them to send keep-alives, since the adjacent downstream SIP entity 192 might have knowledge about the necessity. Similarly, it can be 193 useful for SIP entities to indicate willingness to receive keep- 194 alives, even if they are not aware of any necessity for the adjacent 195 upstream SIP entity to send them. 197 NOTE: Usage of keep-alives is negotiated per direction. If a SIP 198 entity has indicated willingness to receive keep-alives from an 199 adjacent SIP entity, sending of keep-alives towards the same SIP 200 entity needs to be separately negotiated. 202 NOTE: Since there are SIP entities that already use a combination of 203 Carriage Return and Line Feed (CRLF) as keep-alive messages, and SIP 204 entities are expected to be able to receive those, this specification 205 does not forbid the sending of double-CRLF keep-alive messages 206 towards an adjacent SIP entity even if usage of keep-alives with that 207 SIP entity has not been negotiated. However, the "keep" parameter is 208 still important in order for a SIP entity to indicate that it 209 supports sending of double-CRLF keep-alive messages, so that the 210 adjacent downstream SIP entity does not use other mechanisms (e.g. 211 short registration refresh intervals) in order to keep NAT bindings 212 open. 214 4.2. Lifetime of keep-alives 216 4.2.1. General 218 The lifetime of negotiated keep-alives depends on whether the keep- 219 alives are associated with a registration or a dialog. This section 220 describes the lifetime of negotiated keep-alives. 222 4.2.2. Keep-alives associated with registration 224 SIP entities use a registration request in order to negotiate usage 225 of keep-alives associated with a registration. Usage of keep-alives 226 can be negotiated when the registration is established, or later 227 during the registration. Once negotiated, keep-alives are sent until 228 the registration is terminated, or until a subsequent registration 229 refresh request is sent or forwarded. When a subsequent registration 230 refresh request is sent or forwarded, if a SIP entity is willing to 231 continue sending keep-alives associated with the registration, usage 232 of keep-alives MUST be re-negotiated. If usage is not successfully 233 re-negotiated, the SIP entity MUST cease sending of keep-alives 234 associated with the registration. 236 In case a SIP entity establishes multiple registration flows 237 [RFC5626], usage of keep-alives needs to be negotiated separately for 238 each individual registration flow. A SIP entity MUST NOT send keep- 239 alives associated with a registration flow for which usage of keep- 240 alives has not been negotiated. 242 4.2.3. Keep-alives associated with dialog 244 SIP entities use an initial request for a dialog, or a mid-dialog 245 target refresh request [RFC3261], in order to negotiate sending and 246 receiving of keep-alives associated with a dialog. Usage of keep- 247 alives can be negotiated when the dialog is established, or later 248 during the lifetime of the dialog. Once negotiated, keep-alives MUST 249 be sent for the lifetime of the dialog, until the dialog is 250 terminated. Once usage of keep-alives associated with a dialog has 251 been negotiated, it is not possible to re-negotiate the usage 252 associated with the dialog. 254 4.3. Behavior of a SIP entity willing to send keep-alives 256 As defined in [RFC5626], a SIP entity that supports sending of keep- 257 alives must act as a Session Traversal Utilities for NAT (STUN) 258 client [RFC5389]. The SIP entity must support those aspects of STUN 259 that are required in order to apply the STUN keep-alive mechanism 260 defined in [RFC5626], and it must support the CRLF keep-alive 261 mechanism defined in [RFC5626]. [RFC5626] defines when to use STUN, 262 respectively double-CRLF, for keep-alives. 264 When a SIP entity sends or forwards a request, if it wants to 265 negotiate the sending of keep-alives associated with a registration, 266 or a dialog, it MUST insert a "keep" parameter in its Via header 267 field of the request to indicate willingness to send keep-alives. 269 When the SIP entity receives the associated response, if the "keep" 270 parameter in its Via header field of the response contains a "keep" 271 parameter value, it MUST start to send keep-alives towards the same 272 destination where it would send a subsequent request (e.g. REGISTER 273 requests and initial requests for dialog) associated with the 274 registration (if the keep-alive negotiation is for a registration), 275 or where it would send subsequent mid-dialog requests (if the keep- 276 alive negotiation is for a dialog). Subsequent mid-dialog requests 277 are addressed based on the dialog route set. 279 Once a SIP entity has negotiated sending of keep-alives associated 280 with a dialog towards an adjacent SIP entity, it MUST NOT insert a 281 "keep" parameter in any subsequent SIP requests, associated with the 282 dialog, towards that adjacent SIP entity. Such "keep" parameter MUST 283 be ignored, if received. 285 Since an ACK request does not have an associated response, it can not 286 be used to negotiate usage of keep-alives. Therefore, a SIP entity 287 MUST NOT insert a "keep" parameter in its Via header field of an ACK 288 request. Such "keep" parameter MUST be ignored, if received. 290 A SIP entity MUST NOT indicates willingness to send keep-alives 291 associated with a dialog, unless it has also inserted itself in the 292 dialog route set [RFC3261]. 294 NOTE: When a SIP entity sends an initial request for a dialog, if the 295 adjacent downstream SIP entity does not insert itself in the dialog 296 route set using a Record-Route header field [RFC3261], the adjacent 297 downstream SIP entity will change once the dialog route set has been 298 established. If a SIP entity inserts a "keep" parameter in its Via 299 header field of an initial request for a dialog, and the "keep" 300 parameter in the associated response does not contain a parameter 301 value, the SIP entity might choose to insert a "keep" parameter in 302 its Via header field of a subsequent SIP request associated with the 303 dialog, in case the new adjacent SIP downstream entity (based on the 304 dialog route set) is willing to receive keep-alives (in which case it 305 will add a parameter value to the "keep" parameter). 307 If an INVITE request is used to indicate willingness to send keep- 308 alives, as long as at least one response (provisional or final) to 309 the INVITE request contains a "keep" parameter with a parameter 310 value, it is seen as an indication that the adjacent downstream SIP 311 entity is willing to receive keep-alives associated with the dialog 312 on which the response is received. 314 4.4. Behavior of a SIP entity willing to receive keep-alives 316 As defined in [RFC5626], a SIP entity that supports receiving of 317 keep-alives must act as a STUN server [RFC5389]. The SIP entity must 318 support those aspects of STUN that are required in order to apply the 319 STUN keep-alive mechanism defined in [RFC5626], and it must support 320 the CRLF keep-alive mechanism defined in [RFC5626]. 322 When a SIP entity sends or forwards a response, and the adjacent 323 upstream SIP entity indicated willingness to send keep-alives, if the 324 SIP entity is willing to receive keep-alives associated with the 325 registration, or the dialog, from the adjacent upstream SIP entity it 326 MUST add a parameter value to the "keep" parameter, before sending or 327 forwarding the response. The parameter can contain a recommended 328 keep-alive frequency, given in seconds, or a zero value. 330 When a SIP entity indicates willingness to receive keep-alives in a 331 response to an INVITE request, it MUST insert a "keep" parameter in 332 at least one reliable response to the request. The SIP entity MAY 333 insert an identical "keep" parameter value in other responses to the 334 same request. The SIP entity MUST NOT insert "keep" parameters with 335 differing values in responses to a single INVITE request. The SIP 336 entity SHOULD indicate the willingness to receive keep-alives as soon 337 as possible. 339 A SIP entity MUST NOT indicates willingness to receive keep-alives 340 associated with a dialog, unless it has also inserted itself in the 341 dialog route set [RFC3261]. 343 5. Keep-alive frequency 345 If a SIP entity receives a SIP response, where its Via header field 346 contains a "keep" parameter with a non-zero value that indicates a 347 recommended keep-alive frequency, given in seconds, it MUST use the 348 procedures defined for the Flow-Timer header field [RFC5626]. 349 According to the procedures, the SIP entity must send keep-alives at 350 least as often as the indicated recommended keep-alive frequency, and 351 if the SIP entity uses the recommended keep-alive frequency then it 352 should send its keep-alives so that the interval between each keep- 353 alive is randomly distributed between 80% and 100% of the recommended 354 keep-alive frequency. 356 If the received "keep" parameter value is zero, the SIP entity can 357 send keep-alives at its discretion. [RFC5626] provides additional 358 guidance on selecting the keep-alive frequency in case a recommended 359 keep-alive frequency is not provided. 361 This specification does not specify actions to take if negotiated 362 keep-alives are not received. As defined in [RFC5626], the receiving 363 SIP entity may consider a connection to be dead in such situations. 365 If a SIP entity that uses the "keep" parameter to indicate 366 willingness to receive keep-alives also inserts a Flow-Timer header 367 field (that can happen if the SIP entity is using both the Outbound 368 mechanism and the keep-alive mechanism) in the same SIP message, the 369 header field value and the "keep" parameter value MUST be identical. 371 SIP Outbound uses the Flow-Timer header field to indicate the server- 372 recommended keep-alive frequency. However, it will only be sent 373 between a UA and an edge proxy. Using the "keep" parameter, however, 374 the sending and receiving of keep-alives might be negotiated between 375 multiple entities on the signalling path. In addition, since the 376 server-recommended keep-alive frequency might vary between different 377 SIP entities, a single Flow-Timer header field can not be used to 378 indicate all the different frequency values, without forcing entities 379 to re-write the value of the Flow-Timer header field. 381 6. Connection reuse 383 Keep-alives are often sent in order to keep NAT bindings open, so 384 that the NAT may be passed by SIP requests sent in the reverse 385 direction, reusing the same connection, or for non-connection- 386 oriented transport protocols, reusing the same path. This 387 specification does not define such connection reuse mechanism. The 388 keep-alive mechanism defined in this specification is only used to 389 negotiate the sending and receiving of keep-alives. Entities that 390 want to reuse connections MUST use a another mechanism to ensure that 391 security aspects associated with connection reuse are taken into 392 consideration. 394 RFC 5923 [RFC5923] specifies a mechanism for using connection- 395 oriented transports to send requests in the reverse direction, and an 396 entity that wants to use connection-reuse as well as indicate support 397 of keep-alives on that connection will insert both the "alias" 398 parameter defined in [RFC5923] as well as the "keep" parameter 399 defined in this specification. 401 SIP Outbound specifies how registration flows are used to send 402 requests in the reverse direction. 404 7. Examples 406 7.1. General 408 This section shows example flows where usage of keep-alives, 409 associated with a registration and a dialog, is negotiated between 410 different SIP entities. 412 7.2. Keep-alive negotiation associated with registration: UA-proxy 414 The figure shows an example where Alice sends an REGISTER request. 415 She indicates willingness of sending keep-alive by inserting a "keep" 416 parameter in her Via header field of the request. The edge proxy 417 (P1) forwards the request towards the registrar. 419 P1 is willing to receive keep-alives from Alice for the duration of 420 the registration, so When P1 receives the associated response it adds 421 a keep parameter value, which indicates a recommended keep-alive 422 frequency of 30 seconds, to Alice's Via header field, before it 423 forwards the response towards Alice. 425 When Alice receives the response, she determines from her Via header 426 field that P1 is willing to receive keep-alives associated with the 427 registration. Until the registration expires, or Alice sends a 428 registration refresh request, Alice then sends periodic keep-alives 429 (in this example using the STUN keep-alive technique) towards P1, 430 using the recommended keep-alive frequency indicated by the keep 431 parameter value. 433 Alice P1 REGISTRAR 434 | | | 435 |--- REGISTER------------->| | 436 | Via: Alice;keep | | 437 | |--- REGISTER-------------->| 438 | | Via: P1 | 439 | | Via: Alice;keep | 440 | | | 441 | |<-- 200 OK ----------------| 442 | | Via: P1 | 443 | | Via: Alice;keep | 444 |<-- 200 OK ---------------| | 445 | Via: Alice;keep=30 | | 446 | | | 447 | | | 448 | *** Timeout *** | 449 | | | 450 |=== STUN request ========>| | 451 |<== STUN response ========| | 452 | | | 453 | *** Timeout *** | 454 | | | 455 |=== STUN request ========>| | 456 |<== STUN response ========| | 457 | | | 459 Figure 1: Example call flow 461 7.3. Keep-alive negotiation associated with dialog: UA-proxy 463 The figure shows an example where Alice sends an initial INVITE 464 request for a dialog. She indicates willingness to send keep-alive 465 by inserting a "keep" parameter in her Via header field of the 466 request. The edge proxy (P1) adds itself to the dialog route set by 467 adding itself to a Record-Route header field, before it forwards the 468 request towards Bob. 470 P1 is willing to receive keep-alives from Alice for the duration of 471 the dialog, so When P1 receives the associated response it adds a 472 keep parameter value, which indicates a recommended keep-alive 473 frequency of 30 seconds, to Alice's Via header field, before it 474 forwards the response towards Alice. 476 When Alice receives the response, she determines from her Via header 477 field that P1 is willing to receive keep-alives associated with the 478 dialog. For the lifetime of the dialog, Alice then sends periodic 479 keep-alives (in this example using the STUN keep-alive technique) 480 towards P1, using the recommended keep-alive frequency indicated by 481 the keep parameter value. 483 Alice P1 Bob 484 | | | 485 |--- INVITE -------------->| | 486 | Via: Alice;keep | | 487 | |--- INVITE --------------->| 488 | | Via: P1 | 489 | | Via: Alice;keep | 490 | | Record-Route: P1 | 491 | | | 492 | |<-- 200 OK ----------------| 493 | | Via: P1 | 494 | | Via: Alice;keep | 495 | | Record-Route: P1 | 496 |<-- 200 OK ---------------| | 497 | Alice: UAC;keep=30 | | 498 | Record-Route: P1 | | 499 | | | 500 |--- ACK ----------------->| | 501 | | | 502 | |--- ACK ------------------>| 503 | | | 504 | *** Timeout *** | 505 | | | 506 |=== STUN request ========>| | 507 |<== STUN response ========| | 508 | | | 509 | *** Timeout *** | 510 | | | 511 |=== STUN request ========>| | 512 |<== STUN response ========| | 513 | | | 514 | | | 515 |--- BYE ----------------->| | 516 | | | 517 | |--- BYE ------------------>| 518 | | | 519 | |<-- 200 OK ----------------| 520 | | | 522 Figure 2: Example call flow 524 7.4. Keep-alive negotiation associated with dialog: UA-UA 526 The figure shows an example where Alice sends an initial INVITE 527 request for a dialog. She indicates willingness to send keep-alive 528 by inserting a "keep" parameter in her Via header field of the 529 request. The edge proxy (P1) does not add itself to the dialog route 530 set, by adding itself to a Record-Route header field, before it 531 forwards the request towards Bob. . 533 When Alice receives the response, she determines from her Via header 534 field that P1 is not willing to receive keep-alives associated with 535 the dialog from her. When the dialog route set has been established, 536 Alice sends a mid-dialog UPDATE request towards Bob (since P1 did not 537 insert itself in the dialog route set), and she once again indicates 538 willingness to send keep-alives by inserting a "keep" parameter in 539 her Via header field of the request. Bob supports the keep-alive 540 mechanism, and is willing to receive keep-alives associated with the 541 dialog from Alice, so he creates a response and adds a keep parameter 542 value, which indicates a recommended keep-alive frequency of 30 543 seconds, to Alice's Via header field, before he forwards the response 544 towards Alice. 546 When Alice receives the response, she determines from her Via header 547 field that P1 is willing to receive keep-alives associated with the 548 dialog. For the lifetime of the dialog, Alice then sends periodic 549 keep-alives (in this example using the STUN keep-alive technique) 550 towards Bob, using the recommended keep-alive frequency indicated by 551 the keep parameter value. 553 Alice P1 Bob 554 | | | 555 |--- INVITE -------------->| | 556 | Via: Alice;keep | | 557 | |--- INVITE --------------->| 558 | | Via: P1 | 559 | | Via: Alice:keep | 560 | | | 561 | |<-- 200 OK ----------------| 562 | | Via: P1 | 563 | | Via: Alice;keep | 564 |<-- 200 OK ---------------| | 565 | Via: Alice;keep | | 566 | | | 567 | | 568 |--- ACK --------------------------------------------->| 569 | | 570 |--- UPDATE ------------------------------------------>| 571 | Via: Alice;keep | 572 | | 573 |<-- 200 OK ------------------------------------------>| 574 | Via: UAC;keep=30 | 575 | | 576 | | 577 | *** Timeout *** | 578 | | 579 |=== STUN request ====================================>| 580 |<== STUN response ====================================| 581 | | 582 | *** Timeout *** | 583 | | 584 |=== STUN request ====================================>| 585 |<== STUN response ====================================| 586 | | 587 | | 588 |--- BYE --------------------------------------------->| 589 | | 590 |<-- 200 OK -------------------------------------------| 591 | | 593 Figure 3: Example call flow 595 8. Grammar 597 This specification defines a new Via header field parameter, "keep". 598 The grammar includes the definitions from [RFC5626]. 600 The ABNF [RFC5234] is: 602 via-params =/ keep 604 keep = "keep" [ EQUAL 1*(DIGIT) ] 606 9. IANA Considerations 608 9.1. keep 610 This specification defines a new Via header field parameter called 611 keep in the "Header Field Parameters and Parameter Values" sub- 612 registry as per the registry created by [RFC5626]. The syntax is 613 defined in Section 8. The required information is: 615 Predefined 616 Header Field Parameter Name Values Reference 617 ---------------------- --------------------- ---------- --------- 618 Via keep No [RFCXXXX] 620 10. Security Considerations 622 SIP entities that send or receive keep-alives are often required to 623 use a connection reuse mechanism, in order to ensure that requests 624 sent in the reverse direction, towards the sender of the keep-alives, 625 traverse NATs etc. This specification does not specify a connection 626 reuse mechanism, and it does it address security issues related to 627 connection reuse. SIP entities that wish to reuse connections are 628 required to use a dedicated connection reuse mechanism, in 629 conjunction with the keep-alive negotiation mechanism. 631 Unless SIP messages are integrity protected, a man-in-the-middle can 632 modify Via header fields used by two entities to negotiate sending of 633 keep-alives, e.g. by removing the indications used to indicate 634 willingness to send and receive keep-alives, or by decreasing the 635 timer value to a verly low value, which might trigger additional 636 resource consumption due to the frequently sent keep-alives. 638 Apart from the issues described above, this specification does not 639 introduce security considerations in addition to those specified for 640 keep-alives in [RFC5626]. 642 11. Acknowledgements 644 Thanks to Staffan Blau, Francois Audet, Hadriel Kaplan, Sean Schneyer 645 and Milo Orsic for their comments on the initial draft. Thanks to 646 Juha Heinaenen, Jiri Kuthan, Dean Willis, John Elwell, Paul Kyzivat, 647 Peter Musgrave and Dale Worley for their comments on the list. 648 Thanks to Vijay Gurbani for providing text about the relationship 649 with the connect-reuse specification. 651 12. Change Log 653 [RFC EDITOR NOTE: Please remove this section when publishing] 655 Changes from draft-ietf-sipcore-keep-05 656 o New section about connection reuse added 657 o Clarify that the specification does not define a mechanism for 658 connection reuse 659 o New text added to the security considerations 660 o CRLF changed to double-CRLF in some places 662 13. References 664 13.1. Normative References 666 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 667 Requirement Levels", BCP 14, RFC 2119, March 1997. 669 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 670 A., Peterson, J., Sparks, R., Handley, M., and E. 671 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 672 June 2002. 674 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 675 Specifications: ABNF", STD 68, RFC 5234, January 2008. 677 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 678 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 679 October 2008. 681 [RFC5626] Jennings, C., Mahy, R., and F. Audet, "Managing Client- 682 Initiated Connections in the Session Initiation Protocol 683 (SIP)", RFC 5626, October 2009. 685 13.2. Informative References 687 [RFC5923] Gurbani, V., Mahy, R., and B. Tate, "Connection Reuse in 688 the Session Initiation Protocol (SIP)", RFC 5923, 689 June 2010. 691 Author's Address 693 Christer Holmberg 694 Ericsson 695 Hirsalantie 11 696 Jorvas 02420 697 Finland 699 Email: christer.holmberg@ericsson.com