3.2.5.3 SIP Proxy Operation

If a SIP proxy compliant with this protocol stores any state associated with SIP endpoints, it SHOULD use the value of the epid parameter, if one is present in the From or To header fields, combined with the address-of-record from the URI of the corresponding header, as an index into its state table. Specifically, the address-of-record and epid parameter from the From header field SHOULD be used to identify UAC endpoints, and address-of-record and epid parameters from the To header field SHOULD be used to identify UAS endpoints.

If a SIP proxy compliant with this protocol receives a request targeted at the address-of-record that belongs to the domain that this proxy is responsible for, and it is supposed to access a SIP location service to compute the request targets, as specified in [RFC3261] section 16, it MUST perform two additional steps:

  1. The SIP proxy MUST examine the To header field of the request. If the To header field contains an epid parameter, the proxy MUST ignore any records returned by the SIP location service that do not have the same epid parameter value when computing request targets.

  2. If the SIP proxy uses any record returned by the SIP location service as a request target, and the record contains an epid parameter value placed there by the SIP registrar, as described in section 3.2.5.2, it MUST add the epid parameter value to the To header field as an epid parameter, unless the To header field of the request already has an epid parameter. In the latter case, the value in the parameter is expected to be the same as in the SIP location service record; otherwise, the SIP proxy would have ignored the record, as discussed in step 1.