RFC 3311
The Session Initiation Protocol (SIP) UPDATE Method
RFC 3311: The Session Initiation Protocol (SIP) UPDATE Method π (Part 1 of 3)
okay bestie, this is RFC 3311 π It's a Standards Track doc, written by J. Rosenberg at dynamicsoft, and it's dated September 2002. The header doesn't list anything it obsoletes or updates, so there's nothing to chase there π
The big idea is the new UPDATE method for SIP π It lets a client change session parameters, like which media streams are in use and which codecs they use, but it leaves the dialog state alone. So it's kind of like a re-INVITE, except it can be sent before the initial INVITE has finished. That makes it perfect for updating things in early dialogs β¨
Status of this Memo π¦
This document is an Internet standards track protocol for the Internet community, and it asks people for discussion and suggestions for improvements. For the official standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) π Distribution of this memo is unlimited π
Copyright Notice πΈ
Copyright (C) The Internet Society (2002). All Rights Reserved. π
Abstract π§
This spec defines the brand-new UPDATE method for the Session Initiation Protocol (SIP) β¨ UPDATE lets a client update session parameters, like the set of media streams and their codecs, with zero impact on the dialog state. So yeah, it's giving re-INVITE, but the difference is that UPDATE can be sent before the initial INVITE is completed. Iconic for early dialogs π
Table of Contents π
1 Introduction .............................................. 2
2 Terminology ............................................... 3
3 Overview of Operation ..................................... 3
4 Determining Support for this Extension .................... 3
5 UPDATE Handling ........................................... 4
5.1 Sending an UPDATE ......................................... 4
5.2 Receiving an UPDATE ....................................... 5
5.3 Processing the UPDATE Response ............................ 6
6 Proxy Behavior ............................................ 7
7 Definition of the UPDATE method ........................... 7
8 Example Call Flow ......................................... 7
9 Security Considerations ................................... 11
10 IANA Considerations ....................................... 11
11 Notice Regarding Intellectual Property Rights ............. 11
12 Normative References ...................................... 11
13 Acknowledgements .......................................... 12
14 Author's Address .......................................... 12
15 Full Copyright Statement .................................. 13
1 Introduction π·
SIP [1] defines the INVITE method for starting and changing sessions. The thing is, INVITE actually touches two important pieces of state π It affects the session (the media streams SIP sets up) and it also affects the dialog (the state SIP itself defines). That's totally reasonable most of the time, but there are real scenarios where this coupling causes drama π
The main problem is when parts of the session need to change before the initial INVITE has been answered. A classic example is "early media," which is when the session is set up to carry call progress, but the INVITE itself hasn't been accepted yet. It's really important that either the caller or the callee can change that session (putting early media on hold, for example) before the call is answered. But re-INVITE can't do this job, because it changes the dialog state as well as the session π
So we need something that lets the caller or callee send updated session info before a final response to the initial INVITE is generated. That's where UPDATE comes in. It's defined here, and it can be sent by a UA within a dialog (early or confirmed) to update session parameters without touching the dialog state itself π¦β¨
2 Terminology π
In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 [2] and indicate requirement levels for compliant SIP implementations π
3 Overview of Operation π§ββοΈ
This extension is super straightforward β¨ The caller starts with an INVITE transaction, and that goes normally. Once a dialog exists (early or confirmed), the caller can generate an UPDATE that carries an SDP offer [3] to update the session. The answer comes back in the response to the UPDATE π«Ά The callee can do the same thing: once a dialog is established, the callee sends an UPDATE with an offer, and the caller puts its answer in the 2xx to that UPDATE.
The Allow header field is how you show you support the UPDATE method π₯ And there are extra constraints on when UPDATE can be used, based on the restrictions of the offer/answer model, so don't skip those π
4 Determining Support for this Extension π
Starting a session works exactly as specified in RFC 3261 [1] β But a UAC compliant to this spec SHOULD also include an Allow header field in the INVITE request, listing the method UPDATE, so everyone knows it can receive an UPDATE request π
When a UAS compliant to this spec gets an INVITE request for a new dialog and generates a reliable provisional response containing SDP, that response SHOULD contain an Allow header field listing the UPDATE method. This tells the caller the callee can receive an UPDATE at any time π An unreliable provisional response MAY contain an Allow header field listing UPDATE, and a 2xx response SHOULD contain an Allow header field listing UPDATE too π
Responses are processed normally as per RFC 3261 [1]. For reliable provisional responses, they're handled according to [4] π¦ Here's the important bit: a reliable provisional response will always create an early dialog at the UAC, and that's necessary so the UAC can receive UPDATE requests from the callee πβ¨
If the response has an Allow header field containing the value "UPDATE", the UAC knows the callee supports UPDATE, and the UAC is allowed to follow the procedures in Section 5.1 π
5 UPDATE Handling π
5.1 Sending an UPDATE π€
The UPDATE request is built just like any other request inside an existing dialog, as described in Section 12.2.1 of RFC 3261 π§ It MAY be sent for both early and confirmed dialogs, and it MAY be sent by either the caller or the callee πΈ Even though UPDATE can be used on confirmed dialogs, it is RECOMMENDED that a re-INVITE be used instead. Why? An UPDATE has to be answered immediately, which rules out user approval. And approval is often needed, which a re-INVITE allows π It's giving "wait, let me check with the user first" energy π
The UAC MAY add optional headers to the UPDATE request, as defined in Tables 1 and 2 β¨
UPDATE is a target refresh request. As RFC 3261 [1] specifies, that means it can update the remote target of a dialog π¦ If a UA uses an UPDATE request or response to change the remote target while an INVITE transaction is in progress, and that UA is a UAS for that INVITE transaction, it MUST place the same value into the Contact header field of the 2xx to the INVITE that it placed into the UPDATE request or response. No skipping this one, bestie π
The rules for including offers and answers in SIP messages, from Section 13.2.1 of RFC 3261, still apply π«Ά These rules exist to guarantee a consistent view of the session state. So here's what they mean for the caller:
- If the UPDATE is sent before the initial INVITE transaction completes, and the initial INVITE contained an offer, the UPDATE can contain an offer if the callee generated an answer in a reliable provisional response, and the caller has received answers to any other offers it sent in either PRACK or UPDATE, and has generated answers for any offers it received in an UPDATE from the callee.
- If the UPDATE is sent before the initial INVITE transaction completes, and the initial INVITE did not contain an offer, the UPDATE can contain an offer if the callee generated an offer in a reliable provisional response, and the UAC generated an answer in the corresponding PRACK. Of course, it can't send an UPDATE if it has not received answers to any other offers it sent in either PRACK or UPDATE, or has not generated answers for any other offers it received in an UPDATE from the callee π₯Ί
- If the UPDATE is sent after the initial INVITE transaction completes, it cannot contain an offer if the caller has generated or received offers in a re-INVITE or UPDATE which have not been answered π
And here's what they mean for the callee:
- If the UPDATE is sent before the INVITE transaction completes, and the initial INVITE contained an offer, the UPDATE cannot be sent with an offer unless the callee has generated an answer in a reliable provisional response, has received a PRACK for that reliable provisional response, has not received any requests (PRACK or UPDATE) with offers that it has not answered, and has not sent any UPDATE requests containing offers that have not been answered π
- If the UPDATE is sent before the initial INVITE transaction completes, and the initial INVITE did not contain an offer, the UPDATE cannot be sent with an offer unless the callee has sent an offer in a reliable provisional response, received an answer in a PRACK, and has not received any UPDATE requests with offers that it has not answered, and has not sent any UPDATE requests containing offers that have not been answered π«
- If the UPDATE is sent after the initial INVITE transaction completes, it cannot be sent with an offer if the callee has generated or received offers in a re-INVITE or UPDATE which have not been answered π
5.2 Receiving an UPDATE β¨
okay so an UPDATE gets handled like any other mid-dialog target refresh request, which you can read about in Section 12.2.2 of RFC 3261 [1] π¦ If the request is generally acceptable, processing keeps going as described below. This is nearly identical to Section 14.2 of RFC 3261 [1], just generalized for UPDATE, so it's giving familiar π
A UAS that gets an UPDATE before it has sent a final response to a previous UPDATE on the same dialog MUST return a 500 response to the new one, and it MUST include a Retry-After header field with a randomly chosen value between 0 and 10 seconds π
Now the offer and answer drama π If an UPDATE comes in with an offer, and the UAS has already made an offer (in an UPDATE, PRACK or INVITE) that hasn't been answered yet, the UAS MUST reject the UPDATE with a 491 response. Similarly, if an UPDATE comes in with an offer, and the UAS has received an offer (in an UPDATE, PRACK, or INVITE) that it hasn't answered yet, the UAS MUST reject the UPDATE with a 500 response, and MUST include a Retry-After header field with a randomly chosen value between 0 and 10 seconds. Iykyk, the timing is everything π
If a UA gets an UPDATE for an existing dialog, it MUST check any version identifiers in the session description or, if there are no version identifiers, the content of the session description, to see if it has changed. If the session description has changed, the UAS MUST adjust the session parameters accordingly and generate an answer in the 2xx response. However, unlike a re-INVITE, the UPDATE MUST be responded to promptly, so the user cannot generally be prompted to approve the session changes π If the UAS can't change the session parameters without prompting the user, it SHOULD reject the request with a 504 response. If the new session description isn't acceptable, the UAS can reject it by returning a 488 (Not Acceptable Here) response for the UPDATE. This response SHOULD include a Warning header field π
5.3 Processing the UPDATE Response πΈ
Processing of the UPDATE response at the UAC follows the rules in Section 12.2.1.2 of RFC 3261 [1] for a target refresh request. Once that's done, it continues as specified below. This is nearly identical to the processing in Section 14.1 of RFC 3261 [1], just generalized for UPDATE π§
If a UA gets a non-2xx final response to an UPDATE, the session parameters MUST remain unchanged, as if no UPDATE had been issued. Note that, as stated in Section 12.2.1 of RFC 3261 [1], if the non-2xx final response is a 481 (Call/Transaction Does Not Exist), or a 408 (Request Timeout), or no response at all is received for the UPDATE (that is, a timeout is returned by the UPDATE client transaction), the UAC will terminate the dialog. Yikes, that's a whole vibe π
If a UAC gets a 491 response to an UPDATE, it SHOULD start a timer with a value T chosen as follows:
- If the UAC is the owner of the Call-ID of the dialog ID (meaning it generated the value), T has a randomly chosen value between 2.1 and 4 seconds in units of 10 ms.
- If the UAC is not the owner of the Call-ID of the dialog ID, T has a randomly chosen value between 0 and 2 seconds in units of 10 ms.
When the timer fires, the UAC SHOULD attempt the UPDATE once more, if it still wants that session modification to happen. For example, if the call was already hung up with a BYE, the UPDATE would not take place ππ«
6 Proxy Behavior π
Proxy processing of the UPDATE request is identical to any other non-INVITE request. No special treatment, no drama π
7 Definition of the UPDATE method π¦
The semantics of the UPDATE method are described in detail above. This extension adds another value to the Method BNF described in RFC 3261:
UPDATEm = %x55.50.44.41.54.45 ; UPDATE in caps
Method = INVITEm / ACKm / OPTIONSm / BYEm
/ CANCELm / REGISTERm / UPDATEm
/ extension-method
Table 1 extends Table 2 of RFC 3261 for the UPDATE method. Table 2 updates Table 3 of RFC 3261 for the UPDATE method. β¨π«Ά
8. Example Call Flow π
okay so this section walks through a full call flow using the UPDATE method, and it's giving main character energy π
Check out Figure 1 below. The caller starts with an initial INVITE (1) that carries an offer. Then the callee sends back a 180 (2) with an answer to that offer. Once that offer/answer exchange is done, the session is established, even though the dialog is still in the early state π¦
Next, the caller sends a PRACK (3) to acknowledge the 180, and the PRACK gets a 200 OK (4) back. The caller then decides to change something about the session, like putting it on hold π So they send an UPDATE request (5) with a new offer, and that offer gets answered in the 200 response to the UPDATE (6).
Shortly after, the callee wants to tweak something too, so it sends its own UPDATE request (7) with an offer, and the answer comes back in the 200 response (8). Finally, the callee answers the call, which gives us a 200 OK response to the INVITE (9), and then an ACK (10). Neither the 200 OK to the INVITE nor the ACK contains SDP. no cap, that's the whole flow π«Ά
Header field where proxy UPDATE
____________________________________________
Accept R o
Accept 2xx o
Accept 415 c
Accept-Encoding R o
Accept-Encoding 2xx o
Accept-Encoding 415 c
Accept-Language R o
Accept-Language 2xx o
Accept-Language 415 c
Alert-Info -
Allow R o
Allow 2xx o
Allow r o
Allow 405 m
Allow-Events (1) -
Authentication-Info 2xx o
Authorization R o
Call-ID c r m
Call-Info ar o
Contact R m
Contact 1xx o
Contact 2xx m
Contact 3xx d o
Contact 485 o
Content-Disposition o
Content-Encoding o
Content-Language o
Content-Length ar t
Content-Type *
CSeq c r m
Date a o
Error-Info 300-699 a o
Event (1) -
Expires -
From c r m
In-Reply-To -
Max-Forwards R amr m
Min-Expires -
MIME-Version o
Organization ar o
Table 1: Summary of header fields, A--O ; (1) defined in [5].
Header field where proxy UPDATE
____________________________________________________
Priority -
Proxy-Authenticate 407 ar m
Proxy-Authenticate 401 ar o
Proxy-Authorization R dr o
Proxy-Require R ar o
RAck R -
Record-Route R ar o
Record-Route 2xx,18x mr o
Reply-To -
Require ar c
Retry-After 404,413,480,486 o
500,503 o
600,603 o
Route R adr c
RSeq - -
Server r o
Subject - -
Subscription-State (1) -
Supported R o
Supported 2xx o
Timestamp o
To c r m
Unsupported 420 m
User-Agent o
Via R amr m
Via rc dr m
Warning r o
WWW-Authenticate 401 ar m
WWW-Authenticate 407 ar o
Table 2: Summary of header fields, P--Z.
Caller Callee
| |
| |
|(1) INVITE with offer 1 |
|---------------------------->|
| |
| |
|(2) 180 with answer 1 |
|<----------------------------|
| |
| |
|(3) PRACK |
|---------------------------->|
| |
| |
|(4) 200 PRACK |
|<----------------------------|
| |
| |
|(5) UPDATE with offer 2 |
|---------------------------->|
| |
| |
|(6) 200 UPDATE with answer 2 |
|<----------------------------|
| |
| |
|(7) UPDATE with offer 3 |
|<----------------------------|
| |
| |
|(8) 200 UPDATE with answer 3 |
|---------------------------->|
| |
| |
|(9) 200 INVITE |
|<----------------------------|
| |
| |
|(10) ACK |
|---------------------------->|
| |
| |
| |
| |
Figure 1: UPDATE Call Flow
9. Security Considerations π
okay this one is SERIOUS bestie π The security considerations for UPDATE are identical to those for re-INVITE. It is important that the UPDATE be integrity protected and authenticated as coming from the same source as the entity on the other end of the dialog. RFC 3261 [1] discusses security mechanisms for achieving these functions. no skipping this one, periodt π
10. IANA Considerations π§
As per Section 27.4 of RFC 3261 [1], this specification serves as a registration for the SIP UPDATE request method. The information to be added to the registry is:
RFC 3311: This specification serves as the RFC for registering
the UPDATE request method.
Method Name: UPDATE
Reason Phrase: Not applicable.
11. Notice Regarding Intellectual Property Rights πΈ
The IETF has been notified of intellectual property rights claimed in regard to some or all of the specification contained in this document. For more information, consult the online list of claimed rights.
12. Normative References π
[1] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[3] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with the Session Description Protocol (SDP)", RFC 3264, June 2002.
[4] Rosenberg, J. and H. Schulzrinne, "Reliability of Provisional Responses in the Session Initiation Protocol (SIP)", RFC 3262, June 2002.
[5] Roach, A.B., "Session Initiation Protocol (SIP)-Specific Event Notification", RFC 3265, June 2002.
13. Acknowledgements π«Ά
The author would like to thank Jo Hornsby, Markus Isomaki, Rohan Mahy, and Bob Penfield for their comments. the squad is valid π
14. Author's Address ποΈ
Jonathan Rosenberg
dynamicsoft
72 Eagle Rock Avenue
First Floor
East Hanover, NJ 07936
EMail: jdrosen@dynamicsoft.com
15. Full Copyright Statement β
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society. thank you for being the reason the lights stay on β¨
π¦ where this page comes from
- ietf: rfc3311 2002-10
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms