3.8.5.1 SIP Proxy Operation

When a SIP proxy compliant with this protocol receives a SERVICE request targeted to a URI built according to location-profile-gruu syntax, as described in section 2.2.3, whose address-of-record matches an address-of-record in the domain for which this SIP proxy is responsible, it MUST process the request as follows:

  1. Perform standard routing procedures against the Request-URI field, as described in [RFC3261]. One of the standard routing procedures in [RFC3261] specifies that it MUST respond with a 404 response if the address-of-record in the Request-URI field does not exist in the domain that the proxy is responsible for.

  2. Extract the name of the location profile from the location-profile-gruu URI. If the location-profile-gruu URI contains the default parameter, the proxy SHOULD consult its internal database to determine the name of the location profile whose address-of-record matches the address-of-record in the location-profile-gruu URI. Otherwise, it MUST extract the name of the location profile from the phone-context URI parameter. If neither the default or phone-context parameters are present in the location-profile-gruu URI, the SIP proxy MUST reject the request with a 485 Ambiguous response.

  3. The SIP proxy MUST then check its location profile descriptions database and attempt to locate the profile with the name extracted in Step 2. If the location profile description with the given name does not exist, the SIP proxy MUST reject the request with a 404 Not Found response. Otherwise, it MUST read the location profile description from its database and form an XML document according to the syntax described in section 2.2.8.

  4. The proxy MUST form and send the response to the SERVICE request as described in [RFC3261] and [IETFDRAFT-SIPSOAP-00] and insert the following fields:

    1. The Content-Type header field MUST be set to application/ms-location-profile-definition+xml.

    2. The body of the response MUST be set to the location profile description XML document created in step 3.