Reliability of Provisional Responses in Session Initiation Protocol (SIP)
obsoletes
- rfc-2543 — SIP: Session Initiation Protocol
Extracted elements (28)
PRACK is a normal SIP dialog request (like BYE) rather than a special message like ACK, giving it hop-by-hop reliability through stateful proxies and requiring it to have its own response. This design was necessary so PRACK could traverse proxy servers compliant to RFC 2543.
Reliable provisional response retransmission intervals double without a cap (unlike 2xx retransmissions which cap at T2), because PRACK retransmissions are independent of 1xx reception, whereas ACK retransmissions are triggered by receipt of 2xx.
The 100 (Trying) response is explicitly excluded from reliable transmission because it is hop-by-hop only, making the end-to-end reliability mechanism inapplicable.
The UAS MUST NOT send a second reliable provisional response until the first is acknowledged because the first conveys the initial RSeq sequence number; sending additional responses before acknowledgment would prevent the UAS from guaranteeing in-order delivery.
A proxy acting as a UAS MAY send reliable provisional responses, but MUST NOT do so for requests that contain a tag in the To field (i.e., within an existing dialog). If a PRACK arrives at a proxy that doesn't match any outstanding reliable provisional response, the PRACK MUST be proxied.
The UAC SHOULD NOT retransmit the PRACK when it receives a retransmission of the provisional response being acknowledged, though doing so does not create a protocol error. Once a reliable provisional response is received, retransmissions of that response MUST be discarded.
A reliable provisional response MUST contain a Require header field with the option tag 100rel, and MUST include an RSeq header field. The first RSeq value in a transaction MUST be between 1 and 2**31 - 1, and it is RECOMMENDED to be chosen uniformly in this range.
A reliable provisional response MUST establish a dialog if one is not yet created. The UAC MUST create a new PRACK request within the dialog associated with the provisional response.
A Require header with the value 100rel MUST NOT be present in any requests except INVITE, although extensions may allow its usage with other methods.
A UAS MUST NOT attempt to send a 100 (Trying) response reliably. Only provisional responses numbered 101 to 199 may be sent reliably.
A UAS MUST send any non-100 provisional response reliably if the initial request contained a Require header field with the option tag 100rel. If unwilling, it MUST reject the initial request with a 420 (Bad Extension) and include an Unsupported header field containing 100rel.
All user agents that support this extension MUST support all offer/answer exchanges that are possible based on the rules in Section 13.2 of RFC 3261, based on the existence of INVITE and PRACK as requests, and 2xx and reliable 1xx as non-failure reliable responses.
If a PRACK request is received that does not match any unacknowledged reliable provisional response, the UAS MUST respond with a 481. If it does match, it MUST be responded to with a 2xx response and the provisional response MUST be removed from the unacknowledged list.
If a reliable provisional response is retransmitted for 64*T1 seconds without reception of a corresponding PRACK, the UAS SHOULD reject the original request with a 5xx response.
If the UAC receives a reliable provisional response with an offer, it MUST generate an answer in the PRACK. If the UAS receives a PRACK with an offer, it MUST place the answer in the 2xx to the PRACK.
If the UAS had placed a session description in any reliable provisional response that is unacknowledged when the INVITE is accepted, the UAS MUST delay sending the 2xx until the provisional response is acknowledged.
Reliable provisional responses are retransmitted with an exponential backoff starting at T1 seconds, doubling for each retransmission. This differs from 2xx retransmissions, which cap at T2.
The UAC MUST maintain a sequence number initialized to the RSeq in the first reliable provisional response. If a subsequent reliable provisional response has an RSeq not exactly one higher, it MUST NOT be acknowledged with a PRACK and MUST NOT be processed further.
The UAC SHOULD include a Supported header with 100rel in all INVITE requests to indicate support for reliable provisional responses even if not requiring them.
The UAS MUST NOT send a second reliable provisional response until the first is acknowledged. The value of RSeq in each subsequent reliable provisional response MUST be greater by exactly one, and RSeq numbers MUST NOT wrap around.
The 100rel option tag is used in Supported and Require headers to negotiate reliable provisional responses. In Supported it signals capability; in Require (in a request) it mandates reliability; in Require (in a reliable provisional response) it signals the response must be acknowledged.
The PRACK method is a new SIP request method for acknowledging reliable provisional responses. Unlike ACK, PRACK is a normal SIP dialog request that traverses stateful proxies and has its own 2xx response.
This document registers the 100rel option tag with IANA for use in Supported and Require headers to negotiate reliable provisional responses in SIP.
This document registers two new SIP header fields with IANA: RSeq (used in provisional responses, no compact form) and RAck (used in PRACK requests, no compact form), both under RFC 3262.
The PRACK request can be injected by attackers to force retransmissions of reliable provisional responses to cease. Since provisional responses can convey important information, PRACK messages SHOULD be authenticated using the authentication procedures specified in RFC 3261.
A reliable provisional response transitions from 'unacknowledged' to 'acknowledged' upon receipt of a matching PRACK (same dialog, method, CSeq-num, and response-num). If unacknowledged for 64*T1 seconds, the UAS SHOULD reject the original request with 5xx.
The RAck header field is sent in PRACK requests and contains three fields: the RSeq value from the provisional response being acknowledged, the CSeq number from that response, and the CSeq method. BNF: RAck = "RAck" HCOLON response-num LWS CSeq-num LWS Method. Example: RAck: 776656 1 INVITE.
The RSeq header field carries a single unsigned numeric value from 1 to 2**32 - 1, included in provisional responses to assign a sequence number for reliability tracking. BNF: RSeq = "RSeq" HCOLON response-num.