SIP J. Rosenberg Internet-Draft Cisco Systems Expires:September 7, 2006 March 6,April 20, 2007 October 17, 2006 Construction of the Route Header Field in the Session Initiation Protocol (SIP)draft-rosenberg-sip-route-construct-01draft-rosenberg-sip-route-construct-02 Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire onSeptember 7, 2006.April 20, 2007. Copyright Notice Copyright (C) The Internet Society (2006). Abstract The Route header field in the Session Initiation Protocol (SIP) is used to cause a request to visit a set of hops on its way towards the final destination. Several specifications have defined rules for how a user agent obtains and then uses a set of Route header fields in the transmission of a request. These include the SIP specification itself, the Service-Route header field specification, the SIP server option in the Dynamic Host Configuration Protocol (DHCP), and others. Unfortunately, these specifications are not consistent and the resulting behavior at clients and servers is not clear or complete. This document resolves this problem by defining a consistent set oflogic.logic, and in the process, serves as an update to the Service-Route specification. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Existing Sources . . . . . . . . . . . . . . . . . . . . . . . 32.12.1. Default Outbound Proxies . . . . . . . . . . . . . . . . . 32.22.2. Service Route . . . . . . . . . . . . . . . . . . . . . . 42.32.3. Record-Routes . . . . . . . . . . . . . . . . . . . . . . 42.4 305 Use Proxy2.4. Loose Routes . . . . . . . . . . . . . . . . . . . . . . . 4 3. Problems with Current Specifications . . . . . . . . . . . . . 5 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 5. Overview of Operation . . . . . . . . . . . . . . . . . . . . 75.6. Detailed Processing Rules . . . . . . . . . . . . . . . . .9 5.1. 7 6.1. Registrar Behavior . . . . . . . . . . . . . . . . . . . .9 5.28 6.2. Proxy Behavior . . . . . . . . . . . . . . . . . . . . . . 105.36.3. UAC Behavior . . . . . . . . . . . . . . . . . . . . . . .11 5.4 Client Behavior10 6.3.1. REGISTER Processing . . . . . . . . . . . . . . . . . 10 6.3.2. Request Origination . . . .13 5.5 Server Behavior. . . . . . . . . . . . . 11 7. Grammar . . . . . . . . . . .14 6. Grammar. . . . . . . . . . . . . . . . 12 8. Security Considerations . . . . . . . . . .14 7. Security. . . . . . . . . 12 9. IANA Considerations . . . . . . . . . . . . . . . . . .15 8. IANA Considerations. . . 13 9.1. SIP Option Tag . . . . . . . . . . . . . . . . . . . .15 9.. . 13 9.2. Header Field Parameter . . . . . . . . . . . . . . . . . . 13 10. Examples . . . . . . . . . . . . . . . . . . . . . . . . . .15 10.. 13 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .15 11.. 14 12. References . . . . . . . . . . . . . . . . . . . . . . . . .15 11.1. 14 12.1. Normative References . . . . . . . . . . . . . . . . . .15 11.2. 14 12.2. Informative References . . . . . . . . . . . . . . . . .16. 14 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 16 Intellectual Property and Copyright Statements . . . . . . . . . . 17 1. Introduction The Route header field in the Session Initiation Protocol (SIP) protocol is used to cause a request to visit a set of hops on its way towards the final destination. RFC 3261 [2] discusses how a client constructs the Route header field for requests. However, this logic is restricted to mid-dialog requests, where the route set was learned as a result of record-routing. However, additional sources of routes can exist for a UA. These include default outbound proxies, a service route learned from the Service-Route header field [3], and a redirectioncoming from a 305 response.utilizing loose routing [7]. In total, there are four sources of potential route headers. The way in which these various sources are reconciled is unclear. Furthermore, the various specifications are unclear about which requests these Route headers are applicable to. Do they apply to REGISTER? Do they apply to mid-dialog requests? Finally,the existing specifications are incomplete and inconsistent.RFC 3608 is underspecified, which can result in interoperability problems. Section 2 reviews the existing sources of route sources. Section 3 discusses problems with the existing specifications. Section45 overviews the proposed changes in behavior. Section56 provides a detailed description of element behavior, and Section67 defines the grammar for the newheadersparameters specified here. 2. Existing Sources This section examines the current set of route header field sources.2.12.1. Default Outbound Proxies RFC 3261 discusses default outbound proxies. In Section 8.1.1.1, it makes reference to its interaction with Route header fields: In some special circumstances, the presence of a pre-existing route set can affect the Request-URI of the message. A pre- existing route set is an ordered set of URIs that identify a chain of servers, to which a UAC will send outgoing requests that are outside of a dialog. Commonly, they are configured on the UA by a user or service provider manually, or through some other non-SIP mechanism. When a provider wishes to configure a UA with an outbound proxy, it is RECOMMENDED that this be done by providing it with a pre-existing route set with a single URI, that of the outbound proxy. When a pre-existing route set is present, the procedures for populating the Request-URI and Route header field detailed in Section 12.2.1.1 MUST be followed (even though there is no dialog), using the desired Request-URI as the remote target URI. The default outbound proxy can be learned either through DHCP[6],[8], through configuration (such as the SIP configuration framework[8]),[9]), or through other means. In the IP Multimedia Subsystem (IMS), the default outbound proxy is the P-CSCF and is learned through GPRS specific techniques. RFC 3261 does not explicitly say the set of messages to which this route set applies. However, the text above implies that it is for all requests outside of a dialog.2.22.2. Service Route RFC 3608 specifies the Service-Route header field. This header field is provided to the UA in a 2xx response to a REGISTER request. The client uses this to populate its Route header fields for outgoing requests. However, RFC 3608 explicitly says that the decision a UA makes about how it combines the service route with other outbound routes is a matter of local policy. Furthermore, RFC 3608 does not clearly define to which requests the service route applies, and in particular, whether or not it applies to a REGISTER request or a mid- dialog request. Furthermore, RFC 3608 specifies that a service-route is associated with an Address-of-Record (AOR), and is shared by all contacts associated with the same AOR. It also specifies that the Service- Route URI can only be ones known to the registrar apriori, as opposed to learned through the registration itself.2.32.3. Record-Routes RFC 3261 provides a detailed description of the record-routing mechanism, and how the user agents in a dialog construct route sets from the Record-Route header field values. RFC 3261 is also clear that the resulting route set applies to mid-dialog requests. It implies (though does not explicitly say) that the resulting route set overrides any default outbound proxies (which represent a pre-loaded route set).2.4 305 Use Proxy RFC 32612.4. Loose Routes Loose routing, introduced in [7], definesthe 305 "Use Proxy" response code, but says extremely little about exactly how it is used. It has this to say: The requested resource MUST be accessed through the proxy given by the Contact field. The Contact field gives the URI of the proxy. The recipient is expectedmechanisms for using Route header fields torepeat this single request via the proxy. 305 (Use Proxy) responses MUST only be generated by UASs. It is unclear how the Contactaddress and invoke services inthea user agent. It also specifies a redirection mechanism whereby a server can redirectis used. Does it populate the request URI of the resulting request? Or, doesa client, and ask itget usedtopopulateeither modify the topmost Route headerfield? The restriction to UASs is also not explained. Historically, the reason for the restriction to UAs was to avoid routing loops. Consider an outbound proxy that generates a 305, insteadfield ofproxyingits request, or add a new Route header field to the topmost request. Theconcern wasspecification indicates thatthe client would then recurse on the response, populate the Contact into a new request URI, and send the requestit is applicable toits default outbound proxy, which redirects once more. To avoid this,both mid-dialog and out-of-dialog requests. Since theRFC says that only a UASclient canredirect with a 305, notbe aproxy. However,user agent, thisdesign decision on 305 handling was made prior to the conception of loose routing, although both ended up in RFC 3261. The designforms another potential source ofthe 305 mechanism, unfortunately, was not revisited after loose routing was specified. As such, the draft is not clear about whether or not the contact gets utilized asa Route header fieldvalue or whether it replaces the Request URI. The assumption, unstated, is that it populates the Request-URI, since redirection works that way in general.for user agents. 3. Problems with Current Specifications Numerous problems have arisen as a consequence of the combination of these specifications. These problems fit into two categories. The first are interoperability problems, and the second are missing capabilities. An interoperability problem that has arisen is keeping an outbound proxy on the path for outbound requests. Consider a proxy in a hotel which a client discovers via DHCP and uses as its outbound proxy. This proxy wishes to be used for incoming and outgoing requests, both in and out of a dialog. If the home proxy provides a service route, the hotel proxy will not be able to determine what it needs to do in order to stay on the path. If the client implementation is such that it appends the service route to its default outbound proxy, then the hotel proxy need not do anything to stay on the path. If, however, the client abandons its default proxy in favor of the service route, the hotel proxy would fall off the path of subsequent requests unless it inserted a Service-Route into the response of a REGISTER request. Interestingly, the latter is illegal behavior according to RFC 3608, but is the only mechanism available for ensuring that a proxy stay on the request path. Since RFC 3608 does not provide any normative behavior for combining service routes and outbound proxies, the hotel proxy cannot know what to do, thus causing the interoperability problem. This points to the first major functional gap withthe existing specifications.RFC 3608. There is no standards-based way for keeping an outbound proxy on the path for outbound requests, when it is not the default outbound proxy. Consider a proxy in a hotel, PH-1 which a client discovers via DHCP and uses as its outbound proxy. When the client sends a REGISTER to this proxy, it forwards it to a second proxy in the hotel, PH-2, which then forwards it to the home proxy of the user, PA. PH-2 needs to be on the outbound path for all requests leaving the hotel. PA includes itself in a Service-Route header field in the response. The client receives this Service-Route. For an initial INVITE request, the client constructs a route set which includes its outbound proxy PH-1 followed by the URI from the Service-Route, PA. This request will traverse PH-1, which now follows the next Route header, sending it to PA. This is not the desired behavior. The problem is that the Service-Route URI has provided a route that overrides the default outbound route behavior at PH-1. Similarly, there is no way inthe current specificationsRFC 3608 to change the outbound proxy, outside of an update in the client configuration. Such changes are extremely useful for many operational reasons. One example is movement of subscribers between geographically distributed sites in cases where a site must be gracefully taken out of service, and the subscribers using it need to be moved gracefully, over a period of an hour or two, from one site to the other. Since, at best, the impact of Service-Route on the outbound proxy is ambiguous, there is generally no way to affect it excepting configuration change. Using configuration updates as the only way to alter the outbound proxy is problematic. In practice, systems providing automated updates to client configuration (when they exist, as they often do not) are decoupled from the operational systems that manage subscriber capacity and software upgrades of sites, making the change hard to affect through configuration. Furthermore, configuration updates are typically passed to clients once they are made. Here, however, the objective is to gracefully move subscribers. Using the randomized nature of REGISTER timings helps provide that; such a function is difficult to accomplish through configuration updates. Finally, many deployments use mechanisms other than[8][9] for updating client configurations. As a consequence, there is no common way across deployments to provide this very basic operational feature.Finally,Another problem that has come up with RFC 3608 is that it will not work well with mid-dialog failover techniques identified for SIP Outbound [10]. These techniques require that the outbound proxy construct a URI for the Service-Route that isimportantused by the UA for new requests outside of a dialog. Finally, RFC 3608 is defined such that the service route is identical for all contacts registered tonotea specific AOR. This makes it applicable only for selecting a set of configured, well-known servers to use, and only ones within the domain of the owner of that AOR. This is a fairly narrow scope of applicability, and introduces a configuration burden on the registrar. Architecturally, there is anarchitecturalinconsistency between record-routing and service route. Withrecord- route,record-route, each proxy on the path of the request inserts a Record-Route header field, and this dictates the path of subsequent messages within a dialog both to and from the UA. With REGISTER, each proxy on the path of the request inserts a Path [4] header field to receive requests directed towards the client. However, the Service-Route is not the inverse of the Path, and is instead created through proprietary means by the registrar. 4. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [1]. 5. Overview of OperationFirstly, new behavior for generation and processing of the 305 Use Proxy is specified. Any element inThis specification updates thenetwork, proxy or UAS, can generate a 305, not just a UAS as specifiedbehaviors inRFC3261. The 305 is directed towards a specific upstream element, whether it isRFC 3608. In particular, aproxy or UAC, through the inclusionregistrar, upon receipt of a REGISTER, uses theRedirect-TargetPath header field values to construct the Service-Route in the response.ThisIn addition, the registrar retains an instance of the Path (and resulting Service Route) for each registered contact. The Path and Service-Route remain valid for the duration of the registration, and are updated for each registration refresh. In order to retain backwards compatibility with systems based on RFC 3608, proxies compliant to this specification include a flag, "p2sr", in their Path header fieldcontains a counter that is decremented as the response is forwarded upstream.values. Whenit hits zero, that element recurses on it. This only works iftheserver that sendsregistrar receives the305 can be sure that all ofREGISTER request, it examines theupstream elements betweensequence of Path header field URI. If itandsees that one or more contiguous proxies at thetargetend of theredirectPath sequence do not support thismechanism. To make this determination,mechanism, the registrar omits those URI from the Service-Route, and omits theTarget-RangeRequire header fieldis used.parameter indicating support for this specification in the response. Thisheader field contains a pair of integers, start-range and end-range. These integers correspond tocauses thevalues ofUA to revert to existing behavior, augmenting theMax-Forwards header field across aroute setof compliant elements. Whenwith thefirst elementoutbound proxy [[OPEN ISSUE: well, thats true for IMS at least. UA behavior isn't defined at all ina compliant chain (for example, a UAC supportingthismechanism) emits a request, it sets both start-range and end-rangearea in RFC 3608. Alternative is tothe valuehave two option tags - one that says to augment, and one that says don't.]] If, however, all ofMax-Forwards intherequest it emits. A compliant element decrements both Max-Forwards and end-range before forwardingPath URI include therequest if its policy says that downstream elements are permitted to redirect elements upstream from it. If this"p2sr" flag, an option tag isnot permitted,placed into theelement sets both start-range and end-range to Max- ForwardsRequire header field is placed in the response, indicating that the Service-Route overrides the outboundrequest, effectively startingproxy. The rules for constructing thechain afresh. However,Route for anon-compliant element will only decrementrequest at thevalue of Max-Forwards. As such,UA follow in acompliant server can determine whether the previous hop was compliant by comparingstraightforward manner from this. Mid-dialog requests always use thevalueset ofMax- Forwards inURI learned from thereceivedRecord-Route. A requestwith the valueoutside ofend-range. If they are identical, it meanstheprevious hop supports the mechanism. Therefore, this proxy is is extended an existing chainscope ofcompliant elements, and it decrements both end-rangea dialog, including a REGISTER refresh, uses the Service-Route, andMax-Forwards before sendingbased on therequest. However,Require flag, may or may not override the outbound proxy. Finally, in all cases, if a request generates a redirect response that contains a loose route, thevalues of Max-Forwards and end- rangeRoute set is further modified or augmented based on the redirection. 6. Detailed Processing Rules 6.1. Registrar Behavior This specification updates the procedures from RFC 3608. The procedures in this specification MUST NOT be followed unless thereceivedREGISTER requestwere not identical, it means thatcontains a Supported header field with theprevious upstream element (and possibly ones upstream"sr" option tag. Assuming the REGISTER request contains this option tag, the registrar examines the set of Path header field values, starting fromthat) werethe top (the proxy closes to, but notcompliant. Therefore, thisincluding the registrar itself) towards the bottom (the proxy farthest away from the registrar). If the registrar is planning on adding itself to thefirst in a chain of compliant elements. It therefore resets start-range and end-rangeService-Route, it adds itself to thevaluetop ofMax-Forwards intherequest it emits. Now, when a server receives a request, if Max-Forwards equals end- range,list. Its own URI MUST include theserver knows some number"p2sr" Path header field parameter. If the resulting list is such that there are 0 or more contiguous values starting at the top which contain the "p2sr" Path header field parameter, followed by 0 or more contiguous values which do not contain this parameter, the registrar SHOULD follow the remaining procedures ofupstream elements supportthismechanism. Indeed,specification in theexact numberconstruction ofsuch elements willthe Service- Route header field in the response. If not, the procedures defined here MUST NOT bestart- range minus end-range plus one. Thus,used. In addition, if none of theserver can insertPath header field values contain theRedirect-Target"p2sr" Path header fieldintoparameters, theresponse with a value between 0 (directingprocedures defined here MUST NOT be used. Consider theimmediate upstream element to recurse)example network of Figure 1. The UAC is separated from the registrar by three proxies, P1, P2 andstart-range minus end-range. MF:70 MF:69 MF:68 MF:67 + +-----+SR:70 .......SR:70 +-----+SR:68 +-----+SR:68 |-----+ | |ER:70 . .ER:70 | |ER:68 | |ER:67 |P3. The UAC supports the mechanism in this specification and indicates this through the "sr" option tag in the Supported header field of its REGISTER request. +------+ +------+ +------+ +------+ +------+ | ||----->. .----->| |----->| |----->|| |UAC|. P-1 .|P-2| |P-3| |P-4| UAC |---->| P1 |----->| P2 |----->| P3 |----->| Reg | |. .||<-----| |<-----|| | |. .||RT:0||RT:1 +|+-----+ ....... +-----+ +-----+ -----+| |V+------+ +------+ +------+ +------+ +------+ Figure 1This procedure is shown pictorially in Figure 1. The figure shows a UAC and four proxies, P-1 through P-4. The UAC and proxies P-2 through P-4 supportWhen themechanism, but P-1 does not. TheUACemits an INVITE request. It populates Max-Forwards (shown as MF inregisters, each of thefigure) withproxies inserts itself onto theinitial value of 70. It also adds a Target-RangePath header fieldto the request, with a start-range value (SR in the figure)of70, and an end-range value (ER inthefigure)REGISTER. Each of70. This request is received by P-1. Since P-1the proxies either supports this extension (and thus inserts a "ps2r" parameter into its Path header field value) or it does notunderstand Target- Range, it only decrements Max-Forwards. The request(in which case no parameter isnow received by P-2. P-2 sees that the value of Max-Forwards in the received request (69) doesinserted). The following table shows, for various Path sequences, whether or notmatchthevaluemodified Service-Route procedures ofend-range (70). Thus, it knows that its immediately upstream neighbor didn'tthis specification would be used. Path Header Field | Use New SR | Notes | Procedures? | -------------------------------------------------------------------- P3;p2sr, | | P2;p2sr, | Y | All proxies supportthe mechanism. As such, when it emits its request,itsets the value of both start-range and end-rangeP1;p2sr | | -------------------------------------------------------------------- P3;p2sr, | | Proxies closest tothe value of Max-Forwards, 68. This request arrives at P-3. P-3 seesregistrar P2;p2sr, | Y | support, followed by ones P1 | | thatthe value of Max-Forwards matches end-range. So, it decrements both in the requestdon't -------------------------------------------------------------------- P3;p2sr, | | Proxies closest to registrar P2 | Y | support, followed by ones P1 | | that don't -------------------------------------------------------------------- P3, | | P2, | N | No proxies support itemits. This request arrives at P-4. Again,P1 | | -------------------------------------------------------------------- reg;p2sr | | P3, | |Registrar planning on inserting P2, | Y |itself onto thevalueService-Route P1 | | -------------------------------------------------------------------- P3, | | Set ofMax-Forwards equals end-range. It subtracts end-range from start-range (68-67) and adds 1, which results in 2. This meansproxies thatthe 2 upstream elementssupportthe redirect targeting mechanism,P2;p2sr, | N | it must be contiguous andP-4 generates a 305 response with a Redirect-Target value of 1. This is received by P-3, which decrements Redirect-TargetP1 | | closest tozero. This is received by P-2, which sees that the value is zero. This meansregistrar -------------------------------------------------------------------- P3;p2sr, | | Set of proxies that support P2, | N | itis the intended target of the redirect. It therefore recurses on the redirect and emits a new request. [[OPEN ISSUE: This backwards compatibility mechanism could actuallymust beused for all redirects; providing a mechanism to knowcontiguous andcontrol where and when recursion is done. Indeed,P1;p2sr | | closest to registrar -------------------------------------------------------------------- Figure 2 This constraint basically says that themechanism could provide a general framework for allowing downstream serversPath has todetermine whether a sequence of upstream servers supports some extension. If one uses a sequence of ranges instead ofbe built either by asingle range, fullproxy chain which all supportinformation can be delivered to the UAS. Is there a need for such a thing?]] In addition to specifying new rules for generation and processing of the 305,thisspecification updates the behaviors in RFC 3608. In particular,spec, or by aregistrar, upon receipt ofchain whereby aREGISTER, uses the Path header field values to construct the Service-Route in the response. The values from the Path are copied into the Service-Route, and the registrar can then add some additional ones if they are within the domain of the provider. By allowing the registrar to add values, the mechanism defined here is madebunch didn't support it, followed by asuperset of the behaviors definedbunch that did. This works well inRFC 3608. There,IMS deployments where theregistrar can only add URI in its own domain. Here,visited network doesn't support theregistrar can add such URI,mechanism, butalso reflects Path headers from the request, which may have come from other domains. In addition, RFC 3608 definedtheservice route to be associated with an AOR, rather than a registered contact. This specification modifies that behavior. Instead, the service route will be associated with each registered contact. Note that the registrar never needs to store the service-route; it is computed as a function ofhome network does. If thePath headermechanisms inthe REGISTER request. 5. Detailed Processing Rules 5.1 Registrar Behavior Thisthis specificationupdatesare to be used, theprocedures from RFC 3608. Theregistrar MUST construct the Service-Route in the registration response by taking each URI from thePathlist which contained the "p2sr" header fieldin the REGISTER request,parameter, and inverting the order.After inversion, theThe registrarMAYMUST addadditional URIs at the end of the list (that is, the right hand side of the list, correspondingan option tag toproxy elements that will be the farthest away from the UA). Furthermore, the registrar MAY replace or remove any URIs that are within a domain underthecontrol of the registrar. When replacing a URI, one or more new ones can take its place. If the registrar isRequire header field inexample.com, this would include any URIs whose domain part is example.com. It would also include any URIs whose domain is a subdomain of example.com, as long as that subdomain is underthecontrol of example.com. It could also include URIs whose domain part is unrelated to example.com, as long as those are within the control of example.com. It is difficult to provide a concise definition of "under the control", but generally it means that the administrative policies for the subservient domain are completely defined by the controlling domain. This behavior ensures that proxies outside of the domain of the registrar have a way to appear on the service route, but provides a way, within a domain, to provide service routes that are not coupled toresponse (adding thePath. [[OPEN ISSUE: Its unclear whether this mechanism is backwards compatibleheader field if necessary) withcurrent IMS procedures.the value "sr". TheP-CSCF will insert Path, but not expect for itsURIto bein theoutboundService- Routeset. The procedures here, for a UA compliant to this specification, will result in an outgoing INVITE being delivered to the P-CSCF as a consequence of it being the default outbound proxy, but the request will arrive with the topmost route equal to the outbound proxy URI, and the next route will be the Path URI. The route after that will be the S-CSCF (or I-CSCF in the home domain if added toheader field values SHOULD NOT contain theservice route). Not clear"p2sr" parameter; thatthis will work. If it doesn't, itparameter iseasily remedied by includingaflag in thePath headerwhich indicates whether it needs to be reflected into Service-Route.]] 5.2 Proxy Behavior When a proxy receives a request that contains the Target-Range header field, it examines thefield valueof end-range. If end-rangeand is notequal to the value of Max-Forwardsneeded in thereceived request, the proxyService-Route. The resulting Service-Route MUSTset both end-rangebe recomputed for each registration refresh, andstart-range equal to the value of the Max- Forwards header field in the request it emits. If they are equal, the proxyfor each new registration. The server MAYextendstore thechain of compliant elements, or MAY reset it, startingvalues associated withitself. The decision depends on whether the proxy wishes downstream elements to be able to generate redirects towards upstream elements, andit, though this isa matternot necessary for proper operation oflocal policy. Ifthis specification. In addition, theproxy decides to reset it, it sets both end-range and start-range equalregistrar MUST only return in a 200 OK response to thevalue ofREGISTER request, theMax-ForwardsContact header fieldinassociated with therequestregistration which was just performed. [[OPEN ISSUE: This is really orthogonal, and itemits. Ifis probably controversial. Basically itdecidesproposes toextend it, it sets end-range equaluse this new service route mechanism as a vehicle for eliminating query registers and third party registrations.]]. A UA compliant tothe value of the Max-Forwards header field in the request it emits and retains the value of start-range. Whenthis specification will never generate aproxy receivesregistration with anything except for a305 response, it MUST check the value of the Redirect-Target header field.single Contact. If the mechanisms in thisvalue is non-zero,specification are not used, theproxyregistrar MUSTdecrement it by one before forwardingfollow the305 upstream,procedures of RFC 3608 andMUST NOT recurse on the 305. If the value is zero,construct theproxy followsService- Route as it would otherwise. It MUST omit theprocedures"sr" option tag from a Require header field inSection 5.4.the response. 6.2. Proxy Behavior This specification updates the proxy processing rules in RFC 3608.In particular, if aA proxy compliant to this specification which inserts a Path header fieldinvalue into a REGISTERrequest, it means thatrequest MUST include acompliant registrar will echo the"p2sr" Path header fieldback intoparameter with its value. If theREGISTERresponse to the REGISTER request includes the Require header field that includes the "sr" option tag, it means that the UA will be using that URI (which will be echoed in the Service-Route) as aService-RouteRoute header fieldvalue. Thevalue for requests outside of a dialog. In this case, the proxy MAY remove its value from theService- RouteService-Route in the response, or MAY modify it.IfWhen theREGISTER response does not containUA initiates aService-Route valuerequest outside of a dialog, that request will contain a route set which includes thePathURIs learned from the Service-Route. Consequently, a proxy MUST be prepared to receive such a request, in which case the topmost Route header will be the URIinserted bytheproxy, it means thatproxy passed to theregistrar is notUA in the 200 OK response to REGISTER. 6.3. UAC Behavior 6.3.1. REGISTER Processing A UA compliant to thisspecification. [[OPEN ISSUE:specification MUST include the "sr" option tag in the Supported header field of its REGISTER request. Such a UA MUST include only a single Contact in each REGISTER request, which points to the UA performing the registration. It MUST NOT generate a "query REGISTER" which contains no contacts, MUST NOT include multiple Contact header field values in its registration, andthen itMUST NOT register a Contact which doeswhat??] [[OPEN ISSUE:notsure ifdirectly point to thefollowing belongs here or not; its not elaborated on anywhere elseUA itself. When the REGISTER response arrives, and it isjustaplaceholder]] If2xx response, theproxy receives a request destinedUA looks for theAORpresence of asubscriber, andSupported header field in theproxy isresponse with theresponsible proxy for that domain, it looks up"sr" option tag. If present, theAORUA is operating in "override" mode, as described below. If not present, thelocation database, and retrievesUA is operating in "augment" mode, as described below. In either case, thePath URI andUA MUST cache theregistered Contact. However, insteadcontents ofrewriting the request-URI to be equal to the registered contact, if that contact contains the URI loose-route parameter,theproxy retainsService-Route header field for therequest URI, and instead uses that registered contact URIduration of its registration. A single UA may still be performing multiple registrations, for purposes of high availability, as a consequence of thelast Route header field value.procedures defined in SIP outbound [6]. In thisway,case, theUASUA willreceive new requests with the AOR retained in the request URI, and a topmost Route header field present,end up witha URI containing the registered contact. 5.3 UAC Behavior A UACmultiple sets of Service-Route, each of whichsupports the 305 recursion mechanism, including the Response-Target and Target-Range header fields, MUST includeis bound to theTarget-Range header field in all requests it emits, excepting CANCEL and ACK.particular flow that was registered (and its associated Contact). 6.3.2. Request Origination It is RECOMMENDED that a UA compliant to this specification also be compliant to UA loose routing [7]. Thisheader field MUST have the start range and end range values equalallows proxies to utilize a redirection to further augment thevalue of Max-Forwardsway in which the route set for a requestemittedis constructed. The primary question addressed by this specification is how the UA constructs theUAC.route set for a request. Determination of the route set for a request depends on whether the request isdonegenerated as a consequence of a redirection. If the UA indicated support for loose routing intwo steps. The firstits request (as described in [7], the Route set for the recursed request is generated from the request which generated the recursion, as described there. This specification assumes that a UA may have one or more configured outbound proxies, each in thedeterminationform of abaselineSIP URI. Each of these will either be a loose routeset. This set is(in which case theroute set determined strictly by protocol mechanisms, and hasrequest would contain that URI in the Route header field) or notyet been subject to UA policies(in whichmight require alteration of the route set. Those policies are then applied, andcase theresult isUA will just send thefinal route set forrequest to that target without including its URI in therequest.topmost Route request). For a request sent by a UAC that is not the resultof recursion on a 305,loose route recursion, the following logic MUST be used to compute thebaselineroute set: o If the request is a mid-dialog request, the route set is computed per the procedures in Section 12.2.1.1 of RFC 3261. Thebaselineroute set will not contain any routes learned from configuration, DHCP, Service-Route or any other mechanism. o If the request is not a mid-dialog request, the client checks to see if it has learned a service route as a result of registration. The UAC may have learned numerous service routes, one for each unique AOR/Contact that it registered. In the case of registrations using the mechanisms of[5],[6], the Contact includes the flow ID and instance ID, so that the client may have a distinct service route for each unique AOR/Flow ID/Instance ID combination. As such, when sending a request, the client selects the service route corresponding to the contact which is sending the request. [[OPEN ISSUE: Need to say more about this selection.]].Once a serviceIf the UA is operating in "override" mode for this routehas been selected,set, the URIs from this service route become thebaselineroute set.Here too,If the UA is operating in thebaseline"augment" mode for this routeset will not contain any routes learned from configuration, DHCP, or otherset, the UA takes the outbound proxy URI it used for the REGISTER request which created the route set, and appends that URI to the top of the serviceroutes.route. o If the request is not a mid-dialog request, and there are are no service routes associated with the contact generating the request, the UAC uses the route set learned through configuration. [[OPEN ISSUE: Do we need to specify how to reconcile route sources learned across disparate configuration sources? For example DHCP and a config file? These can come from different providers.]] If therequest is being generated as a consequence of a 305, the baseline route set is computed as described in Section 5.4. With the baseline route set computed, the UAC applies policy to determine whether this route set needs to be modified. The primary factor involved is whether or not the client needs to send this request through its outbound proxy or not. The following logic is RECOMMENDED. If thetopmost URI in thebaseline route set equals the configured default outbound proxy for the UAC, then the baseline route set is used unmodified, and used as the final route set. If, however, it does not, the UAC checks a white list of URI that it maintains. If the topmost URI appears on that white list, the baselineresulting route set isused as the final route set. If it isnotpresent, the default outbound proxy URI is appended to the top of thea loose routeset. The white list represents destinations that the UA has confidence are ones permitted to be used. Here, this implies that the provider of the default outbound proxy allows that URI to be used in its place. This white list(which canbe provided by configuration, but this is cumbersome and NOT RECOMMENDED. Instead, the following algorithm is RECOMMENDED. Initially, the white list is emptyhappen when there is aUA starts up. If a UA receives a 305 to a REGISTER request it generates, the URI in the Contact header field of the redirect are added to the white list. This will cause the REGISTER to be sent with one of these URI as the topmost URI in the route set. If that registration succeeds, the URI are retained in the white list for the duration of the registration. The client maintains a separate white list for each registered contact. This algorithm works because of two factors. Firstly, registrations are always targeted towards the domain of the subscriber, and are never delivered to user agents. As such, the mechanism relies on trust between the provider of theconfigured outbound proxyand provider of the AOR for the subscriber to follow the 305 mechanism described here correctly. However, ifthattrust doesn't exist, basic call processingis notpossible in any case. The second factor is the 305 mechanism itself. If the outbound proxy doesn't support this specification, or the provider of the outbound proxy doesn't wish the provider of the AOR to bypass the outbound proxy, the 305 mechanism allows this to be known to the provider of the AOR. Thus, the provider of the AOR can only bypass the outbound proxy if permitted by the provider of the outbound proxy. Typically, this would only be allowed when they are the same provider. The 305 mechanism allows the outbound proxy to bypass itself, since the outbound proxy can generatea305 as long as the client supports the mechanism in this specification. 5.4 Client Behavior The following logic defined here applies to all clients, both UAC and proxies, and applies to the processing of a 305 response. When a client receives a 305 response, it MUST check for the presence of the Response-Target header field. If this header field is absent, the client MAY recurse on the request. However, in this case, the recursion MUST be accomplished by replacing the request URI of the request it generates with the value of the Contact header field in the 305 response. This provides backwards compatibility with the existing usage of 305, since all redirection defined in RFC 3261 updates the Request-URI. If the Response-Target header field is present, but has a non-zero value, the client MUST NOT recurse on the redirect. If the Response-Target header field is present and has a value of zero, the client MUST recurse on the redirect. To compute the request that is sent as a result of the recursion,loose route), theclientUA MUSTtake the route set used for the request that generated the 305 response. Ifremove thatrequest had a Route header field, the first value MUST be replaced with the value of the Contact header field in the 305 with the highest q-value. If there are multiple such Contacts with the same q-value, one is chosen at random. The result is used as the route set for the new request. If the client is a UAC, it follows the procedures defined in Section 5.3. If the client is a proxy, it follows the procedures definde in Section 5.2. [[ISSUE: There are three choices about how to process the contact in the 305. TheURIthere can replace the route set at the client completely, they can be appended tofrom therouteRoute set,or they can replace the topmost route. This draft employs the latter technique. Further consideration is needed to determine whether or not this is the right thing. Since the contact can contain multiple URI, we could actually havebut still use itcontain the entire route set that should replace the one from the request.]] If a 305 response had multiple Contact header field values, and the recursed request generated a 503 response, and the client had exhausted all alternative servers learned from DNS [7]forthe previous Contact header field value, the client SHOULD choose the Contact from the 305 with the next highest q-value, and construct another recursed request using the procedures defined above. In the event the 305 had multiple Contact header field values with equivalent q-values, the next highest one might have a q-value equal to the one that was just tried. 5.5 Server Behavior Any server, either a UAS or a proxy, MAY generate a 305 in response to a request. However, it MUST NOT do so unless the request contains a Target-Range header field, and the value of end-range in that header field equals the valuepurposes ofMax-Forwards insending thereceivedrequest.If the server generates a 305, it MUST direct that redirect to a specific upstream element. To do so, it includes a Redirect- Target header field in the response. That header field identifies a specific element that is the target of the redirect. A value of 0 indicates that the element immediately upstream is the target, 1 indicates that the target is the second upstream element, and so on. The value of Redirect-Target MUST be between 0 and start range minus end range. 6.7. Grammar This specification definestwo new header fields - the Target-Rangean option tag andRedirect-Targeta Path headerfields.field parameter. Their syntax is as follows:Target-Range = "Target-Range" HCOLON start-range SWS "-" SWS end-range Redirect-Target = "Redirect-Target" HCOLON target-val start-range = 1*DIGIT end-range = 1*DIGIT target-val = 1*DIGIT 7.option-tag \= "sr" rr-param \= "p2sr" 8. Security Considerations The route set used by a user agent for generating initial requests into the network is very sensitive information. If this information is manipulated by an attacker, it can cause calls to be directed towards intermediaries, which can then observe call patterns, intercept communications, and so on.AsConsequently, aconsequence, the mechanisms inUA using this specificationto take careSHOULD use sips when performing a registration. This makes sure thatthisonly entities along the request path can modify the route setcan only be updated on very specific conditions. Furthermore,used by the305 mechanism defined here gives service providers policy hooksUA. Even with sips, it is possible thatallow them to control whether such redirection cana malicious home proxy could modify the route set used by the UA, eliminating the outbound proxy that would otherwise beemployedused byexteranlit. This kind of attack is only meaningful in environments where the outbound proxy is in a different domain than the home proxy. However, presumably the outbound proxy is present to authorize access to services, and removing it will only result in denial of serviceproviders. [[ISSUE: needs more verbiage here]] 8.to the user, which would appear to provide no benefit. 9. IANA Considerations9. ExamplesThis specification registers a new option tag and a new Path header field parameter. 9.1. SIP Option Tag This specification registers a new SIP option tag, as per the guidelines in Section 27.1 of RFC 3261. Name: sr Description: This option tag is used to identify the usage of Path reflected Service-Route, as defined by RFC XXXX [[NOTE TO IANA: Please replace XXXX with the RFC number of this specification]] 9.2. Header Field Parameter This specification defines the "p2sr" header field parameter, as per the registry created by [5]. The required information is as follows: Header field in which the parameter can appear: Path Name of the Parameter: p2sr RFC Reference: RFC XXXX [[NOTE TO IANA: Please replace XXXX with the RFC number of this specification.]] 10. Examples TODO. 11. Acknowledgements The author would like to thank Paul Kyzivat and Anders Kristensen for their comments.11.12. References11.112.1. Normative References [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [2] 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. [3] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP) Extension Header Field for Service Route Discovery During Registration", RFC 3608, October 2003. [4] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP) Extension Header Field for Registering Non-Adjacent Contacts", RFC 3327, December 2002. [5] Camarillo, G., "The Internet Assigned Number Authority (IANA) Header Field Parameter Registry for the Session Initiation Protocol (SIP)", BCP 98, RFC 3968, December 2004. [6] Jennings, C. and R. Mahy, "Managing Client Initiated Connections in the Session Initiation Protocol (SIP)",draft-ietf-sip-outbound-02draft-ietf-sip-outbound-04 (work in progress),MarchJune 2006.11.2[7] Rosenberg, J., "User Agent Loose Routing in the Session Initiation Protocol (SIP)", draft-rosenberg-sip-ua-loose-route-00 (work in progress), October 2006. 12.2. Informative References[6][8] Schulzrinne, H., "Dynamic Host Configuration Protocol(DHCP-for- IPv4)(DHCP- for-IPv4) Option for Session Initiation Protocol (SIP) Servers", RFC 3361, August 2002.[7] Rosenberg, J. and H. Schulzrinne, "Session Initiation Protocol (SIP): Locating SIP Servers", RFC 3263, June 2002. [8][9] Petrie, D., "A Framework for Session Initiation Protocol User Agent Profile Delivery",draft-ietf-sipping-config-framework-07draft-ietf-sipping-config-framework-09 (work in progress),July 2005.October 2006. [10] Rosenberg, J., "Discovering Outbound Proxies and Providing High Availability with Client Initiated Connections in the Session Initiation Protocol (SIP)", draft-rosenberg-sip-outbound-discovery-mid-dialog-00 (work in progress), October 2006. Author's Address Jonathan Rosenberg Cisco Systems 600 Lanidex Plaza Parsippany, NJ 07054 US Phone: +1 973 952-5000 Email: jdrosen@cisco.com URI: http://www.jdrosen.net Intellectual Property Statement The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Disclaimer of Validity This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM 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. Copyright Statement Copyright (C) The Internet Society (2006). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society.