3.9.5.10 History-Info Header Field Processing

This section follows the product behavior described in endnote <61>.

When the SIP proxy authorized for the domain in the address-of-record of the Request-URI field processes the INVITE request using the published preamble, as described in section 3.9.5.2, it MUST process the History-Info header field in the request, if present, as follows:

  1. The proxy MUST perform basic validation of the History-Info header field entries according to the syntax in section 2.2.17 so that it can extract the value of the hi-index parameter of the last entry. If validation of the History-Info header field fails, the proxy MUST stop further processing. The proxy can reject the request with a 480 response.

  2. If validation of the History-Info header field succeeds, the proxy MUST store the value of the History-Info header field except the last entry, which is the entry targeted at the address-of-record for which the proxy processes the INVITE request, in the INVITE transaction processing context.

  3. The proxy MUST also extract the value of the hi-index parameter from the last entry and store it in the INVITE transaction processing context.

If a History-Info header field is not present in the request, the proxy MUST store an empty History-Info header field and hi-index parameter value of 1 in the INVITE transaction processing context.

The proxy MUST also initialize a value of branch index to 1 in the INVITE transaction processing context.

When, as part of processing the INVITE transaction, the INVITE request is proxied or forwarded to any destination, the SIP proxy MUST copy the History-Info header field that it stored in the INVITE transaction processing context to the proxied or forwarded request and append one or more History-Info header field entries as follows:

  • If the destination is a registered endpoint whose address-of-record matches the address-of-record of the target of the original INVITE request or the INVITE request is forked to the destination at the same time as it is being sent to the registered endpoints, the proxy MUST add one History-Info header field entry with a hi-targeted-to-uri parameter set to the SIP URI of the registered endpoint address-of-record, and a hi-index parameter set to the current value of the hi-index parameter in the INVITE transaction processing context.

  • If the destination is a registered endpoint whose address-of-record matches the address-of-record of the target and  the request was targeted at the private line of the user, the proxy SHOULD add a hi-ms-line-type parameter with the value "private"<62>.

    In addition, the proxy SHOULD add a hi-ms-target-phone parameter with the phone line associated with the user as a TEL URI as its value<63>.

  • For other destinations, the proxy MUST add two History-Info header field entries:

  1. An entry with the parameters set as follows:

    hi-targeted-to-uri value MUST be set to the SIP URI of the address-of-record of the target in the original INVITE request.

    hi-index parameter value MUST be set to the current value of the hi-index parameter in the INVITE transaction processing context.

    hi-ms-retarget-reason parameter value MUST be set to the value of team-call if the current destination was selected as the result of team ringing, or to the value of delegation if the current destination was selected as the result of delegate ringing, or to the value of forwarding in all other cases.

    hi-ms-target-phone parameter value MUST be set to the phone line associated with the target user as a TEL URI<64>.

    reason parameter MUST NOT be set if the request is being sent to a registered endpoint of the target or if the INVITE request is being sent to the current destination while any previous forks to registered endpoints are still active (as is the case with simultaneous ringing, delegate ringing or team-call as described in section 3.9.5.2.2.1, section 3.9.5.2.2.2, and section 3.9.5.2.2.3). The reason parameter MUST be set to the value "SIP;cause=303;text=Redirect" if the INVITE request is forwarded to the current destination as the result of the processing of a 303 response, as described in section 3.9.5.3, or with the value of "SIP;cause=302;text=Moved Temporarily" if the INVITE request is forwarded to the current destination for any other reason. The reason parameter is an optional parameter for History-Info header field, reflected in the History-Info header by including the reason  header escaped in the hi-targeted-to-uri. The reason parameter MAY use the Reason header extensions defined in this specification.

  2. An entry with the parameters set as follows:

    hi-targeted-to-uri parameter value MUST be set to the SIP URI of the address-of-record of the destination.

    hi-index parameter value MUST be set to the concatenation of a) the current value of the hi-index parameter in the INVITE transaction processing context , b) the "." separator, and c) the current value of the branch index in the INVITE transaction processing context.

    The proxy MUST then increment by 1 the value of the branch index in the current INVITE transaction processing context.

When, as part of processing the INVITE transaction, the proxy generates a 181 response, it MUST add a History-Info header field with a single entry with the parameters set as follows:

  • hi-targeted-to-uri parameter value MUST be set to the SIP URI of the address-of-record of the target in the original INVITE request.

  • hi-index parameter value MUST be set to the value of 1.

  • hi-ms-retarget-reason parameter value MUST be set to the value of team-call if the 181 response was generated when the original INVITE was sent to the destination as the result of team ringing, or to the value of delegation if the 181 response was generated when the original INVITE was sent to the destination as the result of delegate ringing, or to the value of forwarding in all other cases.

  • reason parameter MUST NOT be set if the INVITE request is being sent to the current destination while any previous fork to registered endpoints are still active. The reason parameter MUST be set to the value of "SIP;cause=303;text=Redirect" if the INVITE request is forwarded to the current destination as the result of the processing of a 303 response, as described in section 3.9.5.3, or with the value of "SIP;cause=302;text=Moved Temporarily" if the INVITE request is forwarded to the current destination for any other reason.