History-Info header field values by including the Privacy Header
[RFC3323] with a priv-value of "history" escaped in the hi-
targeted-to-uri or by adding the Privacy header with a priv-value
of "history" to the Request. The use of the Privacy Header with
a priv-value of "history" indicates whether a specific or all
History-Info headers should not be forwarded.
o Extension (hi-extension): An optional parameter to allow for
future optional extensions. As per [RFC3261], any implementation
not understanding an extension should ignore it.
The following summarizes the syntax of the History-Info header, based
upon the standard SIP syntax [RFC3261]:
History-Info = "History-Info" HCOLON
hi-entry *(COMMA hi-entry)
hi-entry = hi-targeted-to-uri *( SEMI hi-param )
hi-targeted-to-uri= name-addr
hi-param = hi-index / hi-extension
hi-index = "index" EQUAL 1*DIGIT *(DOT 1*DIGIT)
hi-extension = generic-param
4.2. Protocol Examples
The following provides some examples of the History-Info header.
Note that the backslash and CRLF between the fields in the examples
below are for readability purposes only.
History-Info:<sip:UserA@ims.example.com?Reason=SIP%3B\
cause%3D302>;index=1;foo=bar
History-Info: <sip:UserA@ims.example.com?Reason=SIP%3B \
cause%3D302>; index=1.1,
<sip:UserB@example.com?Privacy=history&Reason=SIP%3B\
cause%3D486>;index=1.2,
<sip:45432@vm.example.com>;index=1.3
4.3. Protocol Usage
This section describes the processing specific to UAs and Proxies for
the History-Info header, the "histinfo" option tag, and the priv-
value of "history". As discussed in Section 1.3, the fundamental
objective is to capture the target Request-URIs as a request is
forwarded. This allows for the capturing of the history of a request
that would be lost due to subsequent (re)targeting and forwarding.
To accomplish this for the entire history of a request, either the
UAC must capture the Request-URI in a History-Info header in the
initial request or a proxy must add a History-Info header with both a
hi-entry for the Request-URI in the initial request and a hi-entry
for the target Request-URI as the request is forwarded. The basic
processing is for each entity forwarding a request to add a hi-entry
for the target Request-URI, updating the index and adding the Reason
as appropriate for any retargeted Request-URI.
4.3.1. User Agent Client (UAC) Behavior
The UAC SHOULD include the "histinfo" option tag in the Supported
header in any request not associated with an established dialog for
which the UAC would like the History-Info header in the response. In
addition, the UAC MAY improve the diagnostic utility of its request
by adding a History-Info header, using the Request-URI of the request
as the hi-target-to-uri and initializing the index to the RECOMMENDED
value of 1 in the hi-entry. As a result, intermediaries and the UAS
will know at least the original Request-URI, and if the Request-URI
was modified by a previous hop.
In the case where the request is routed to a redirect server and the
UAC receives a 3xx response with a Contact header, the UAC MAY
maintain the previous hi-entry(s) in the request. In this case, the
reason header SHOULD be associated with the hi-targeted-to-uri in the
previous (last) hi-entry, as described in Section 4.3.3.1.2. A new
hi-entry MAY then be added for the URI from the Contact header (which
becomes the new Request-URI). In this case, the index is created by
reading and incrementing the value of the index from the previous
hi-entry, thus following the same rules as those prescribed for a
proxy in retargeting, described in Section 4.3.3.1.3. An example of
this scenario can be found in Appendix D.
A UAC that does not want the History-Info header added due to privacy
considerations SHOULD include a Privacy header with a priv-value(s)
of "session", "header", or "history" in the request.
With the exception of the processing of a 3xx response described
above, the processing of the History-Info header received in the
Response is application specific and outside the scope of this
document. However, the validity of the information SHOULD be ensured
prior to any application usage. For example, the entries MAY be
evaluated to determine gaps in indices, which could indicate that an
entry has been maliciously removed or removed for privacy reasons.
Either way, an application MAY want to be aware of potentially
missing information.
4.3.2. User Agent Server (UAS) Behavior
The processing of the History-Info header by a UAS in a Request
depends upon local policy and specific applications at the UAS that
might make use of the information. Prior to any application usage of
the information, the validity SHOULD be ascertained. For example,
the entries MAY be evaluated to determine gaps in indices, which
could indicate that an entry has been maliciously removed or removed
for privacy reasons. Either way, an application MAY want to be aware
of potentially missing information.
If the "histinfo" option tag is received in a request, the UAS SHOULD
include any History-Info received in the request in the subsequent
response.
4.3.3. Proxy Behavior
The inclusion of the History-Info header in a Request does not alter
the fundamental processing of proxies for determining request targets
as defined in Section 16.5 of [RFC3261]. Whether a proxy adds the
History-Info header or a new hi-entry as it forwards a Request
depends upon the following considerations:
1. Whether the Request contains the "histinfo" option tag in the
Supported header.
2. Whether the proxy supports the History-Info header.
3. Whether the Request contains a Privacy header with a priv-value
of "session", "header", or "history".
4. Whether any History-Info header added for a proxy/domain should
go outside that domain. An example being the use of the
History-Info header within the specific domain in which it is
retargeted, however, policies (for privacy, user and network
security, etc.) would prohibit the exposure of that information
outside that domain. To accommodate such a scenario, a proxy
MAY insert the Privacy header with a priv-value of "history"
when the request is being forwarded within the same domain. An
example of such an application is provided in Appendix C.
5. Whether a hi-entry is added for a specific Request-URI due to
local privacy policy considerations. A proxy MAY add the
Privacy header with a priv-value of "history" associated with
the specific hi-targeted-to-uri.
An example policy would be a proxy that only adds the History-Info
header if the "histinfo" option tag is in the Supported header.
Other proxies may have a policy that they always add the header, but
never forward it outside a particular domain, accomplishing this by
adding a Privacy header with a priv-value of "history" to each hi-
entry to allow the information to be collected for internal
retargeting only.
Each application making use of the History-Info header SHOULD address
the impacts of the local policies on the specific application (e.g.,
what specification of local policy is optimally required for a
specific application and any potential limitations imposed by local
policy decisions).
Consistent with basic SIP processing of optional headers, proxies
SHOULD maintain the History-Info header(s), received in messages
being forwarded, independent of whether local policy supports
History-Info.
The specific processing by proxies for adding the History-Info
headers in Requests and Responses, to accommodate the considerations
outlined above, is described in detail in the following sections.
4.3.3.1. Adding the History-Info Header to Requests
Upon evaluation of the considerations under which the History-Info
header is to be included in requests (e.g., no Privacy header
overriding inclusion, local policy supports, etc.), detailed in
Section 4.3.3, a proxy SHOULD add a hi-entry as it forwards a
Request. Section 16.6 of [RFC3261] defines the steps to be followed
as the proxy forwards a Request. Step 5 prescribes the addition of
optional headers. Although this would seem the appropriate step for
adding the History-Info header, the interaction with Step 6,
"Postprocess routing information", and the impact of a strict route
in the Route header could result in the Request-URI being changed;
thus, adding the History-Info header between Steps 8 (adding Via
header) and 9 (adding Content-Length) is RECOMMENDED. Note that in
the case of loose routing, the Request-URI does not change during the
forwarding of a Request; thus, the capturing of History-Info for such
a request would result in duplicate Request-URIs with different
indices. The hi-entry MUST be added following any hi-entry received
in the request being forwarded. Additionally, if a request is
received that doesn’t include a History-Info header, the proxy MAY
add a History-Info header with a hi-entry preceding the one being
added for the current request being forwarded. The index for this
hi-entry is RECOMMENDED to start at 1. The following subsections
define the details of creating the information associated with each
hi-entry.
4.3.3.1.1. Privacy in the History-Info Header
If there is a Privacy header in the request with a priv-value of
"session", "header", or "history", a hi-entry MAY be added, if the
request is being forwarded to a Request-URI associated with a domain
for which the processing entity is responsible (and provided local
policy supports the History-Info header, etc.). If a request is
being forwarded to a Request-URI associated with a domain for which
the proxy is not responsible and there is a Privacy header in the
request with a priv-value of "session", "header", or "history", the
proxy SHOULD remove any hi-entry(s) prior to forwarding, depending
upon local policy and whether the proxy might know a priori that it
can rely on a downstream privacy service to apply the requested
privacy.
For the scenario where there is no Privacy header in the request and
the request is being forwarded to a Request-URI associated with the
domain(s) for which this entity is responsible, there are several
additional considerations:
o If there is no local policy associated with privacy, then a hi-
entry MAY be added to the Request.
o If the proxy’s local policies, per consideration 4 in section
4.3.3, indicate that the History-Info header should not be
forwarded beyond the domain for which this intermediary is
responsible, then a Privacy header with a priv-value of "history"
SHOULD be associated with each hi-entry added by that proxy in
this scenario.
o If the proxy’s policy, per consideration 5 in Section 4.3.3,
indicates that History-Info for a specific Request-URI should not
be forwarded beyond the domain for which this intermediary is
responsible, then a Privacy header with a priv-value of "history"
SHOULD be associated with the specific hi-entry, for that
specific hi-targeted-to-uri, added by that proxy in this
scenario.
If a request is being forwarded to a Request-URI associated with a
domain for which the proxy is not responsible and local policy
requires privacy associated with any, or with specific, hi-entries it
has added, any hi-entry with a priv-value of "history" SHOULD be
removed prior to forwarding.
4.3.3.1.2. Reason in the History-Info Header
For retargets that are the result of an explicit SIP response, a
Reason MUST be associated with the hi-targeted-to-uri. If the SIP
response does not include a Reason header, the SIP Response Code that
triggered the retargeting MUST be included as the Reason associated
with the hi-targeted-to-uri that has been retargeted. If the
response contains a non-SIP Reason header (e.g., Q.850), it MUST be
captured as an additional Reason associated with the hi-targeted-to-
uri that has been retargeted, along with the SIP Response Code. If
the Reason header is a SIP reason, then it MUST be used as the Reason
associated with the hi-targeted-to-uri rather than the SIP response
code.
For retargets as a result of timeouts or internal events, a Reason
MAY be associated with the hi-targeted-to-uri that has been
retargeted.
The addition of the Reason should occur prior to the forwarding of
the request (which may add a new hi-entry with a new hi-targeted-to-
uri) as it is associated with the hi-targeted-to-uri that has been
retargeted, since it reflects the reason why the Request to that
specific URI was not successful.
4.3.3.1.3. Indexing in the History-Info Header
In order to maintain ordering and accurately reflect the nesting and
retargeting of the request, an index MUST be included along with the
Targeted-to-URI being captured. Per the syntax in Section 4.1, the
index consists of a dot-delimited series of digits (e.g., 1.1.2).
Each dot reflects a hop or level of nesting; thus, the number of hops
is determined by the total number of dots. Within each level, the
integer reflects the number of peer entities to which the request has
been routed. Thus, the indexing results in a logical tree
representation for the history of the Request. It is recommended
that for each level of indexing, the index start at 1. It is
recommended that an increment of 1 is used for advancing to a new
branch.
The basic rules for adding the index are summarized as follows:
1. Basic Forwarding: In the case of a Request that is being
forwarded, the index is determined by adding another level of
indexing since the depth/length of the branch is increasing. To
accomplish this, the proxy reads the value from the History-Info
header in the received request, if available, and adds another
level of indexing by appending the dot delimiter followed by an
initial index for the new level RECOMMENDED to be 1. For
example, if the index in the last History-Info header field in
the received request is 1.1, this proxy would initialize its
index to 1.1.1 and forward the request.
2. Retargeting within a Proxy - 1st instance: For the first
instance of retargeting within a Proxy, the calculation of the
index follows that prescribed for basic forwarding.
3. Retargeting within a Proxy - subsequent instance: For each
subsequent retargeting of a request by the same proxy, another
branch is added. With the index for each new branch calculated
by incrementing the last/lowest digit at the current level, the
index in the next request forwarded by this same proxy,
following the example above, would be 1.1.2.
4. Retargeting based upon a Response: In the case of retargeting
due to a specific response (e.g., 302), the index would be
calculated per rule 3. That is, the lowest/last digit of the
index is incremented (i.e., a new branch is created), with the
increment RECOMMENDED to be 1. For example, if the index in the
History-Info header of the received request was 1.2, then the
index in the History-Info header field for the new hi-targeted-
to-URI would be 1.3.
5. Retargeting the request in parallel (forking): If the request
forwarding is done in parallel, the index MUST be captured for
each forked request per the rules above, with each new Request
having a unique index. The only difference in the messaging for
this scenario and the messaging produced per basic proxy
retargeting in rules 2 and 3 is these forwarded requests do not
have History-Info entries associated with their peers. The
proxy builds the subsequent response (or request) using the
aggregated information associated with each of those requests
and including the header entries in the order indicated by the
indexing. Responses are processed as described in Section 16.7
of [RFC3261] with the aggregated History-Info entries processed
similar to Step 7 "Aggregate Authentication Header Field
Values". Section 4.5 provides an example of a parallel request
scenario, highlighting this indexing mechanism.
4.3.3.2. Processing History-Info in Responses
A proxy that receives a Request with the "histinfo" option tag in the
Supported header, and depending upon a local policy supporting the
capture of History-Info, SHOULD return captured History-Info in
subsequent, provisional, and final responses to the Request, subject
to the following considerations for privacy:
o If the response is being forwarded to a Request-URI associated
with a domain for which the proxy is not responsible and there
was a Privacy header, in the request received by the proxy, with
a priv-value of "session", "header", or "history", the proxy MUST
remove the History-Info header (i.e., all hi-entries) prior to
forwarding.
o If a request is being forwarded to a Request-URI associated with
a domain for which the proxy is not responsible and local policy
requires privacy associated with any or all hi-entry(s) it has
added, any hi-entry with a priv-value of "history" MUST be
removed prior to forwarding.
o If a proxy receives a response from another intermediary
associated with a domain for which it is responsible, including
hi-entry(s) with privacy headers, and that response is to be
forwarded to a domain for which it is not responsible, then those
hi-entry(s) MUST be removed.
The processing of History-Info in responses follows the methodology
described in Section 16.7 of [RFC3261], with the processing of
History-Info headers adding an additional step, just before Step 9,
"Forwarding the Response".
4.3.4. Redirect Server Behavior
A redirect server SHOULD NOT add any new History-Info, as that would
be done by the entity receiving the 3xx response. However, a
redirect server MAY include History-Info in responses by adding any
History-Info headers received in a request to a subsequent response.
4.4. Security for History-Info
As discussed in Section 3, the security requirements are met by
recommending the use of TLS (a basic SIP requirement per [RFC3261])
for hop-by-hop security. If TLS is not available on the connection
over which a request containing a History-Info header is being
forwarded, then either of the following two options MUST be
implemented:
o The History-Info header MUST be removed prior to forwarding the
request, or
o The request MUST be redirected, including the History-Info header
in the response, to allow the UAC to securely issue the request,
including the History-Info header.
4.5. Example Applications Using History-Info
This scenario highlights an example where the History-Info in the
response is primarily of use in not retrying routes that have already
been tried by another proxy. Note that this is just an example and
that there may be valid reasons why a Proxy would want to retry the
routes, and thus, this would likely be a local proxy or even user-
specific policy.
UA1 sends a call to Bob to proxy 1. Proxy 1 forwards the request to
Proxy 2. Proxy 2 sends the requests in parallel and tries several
places (UA2, UA3, and UA4) before sending a response to Proxy 1 that
all the places are busy. Proxy 1, without the History-Info, would
try some of the same places (e.g., UA3) based upon registered
contacts for Bob, before completing at UA5. However, with the
History-Info, Proxy 1 determines that UA3 has already received the
invite; thus, the INVITE goes directly to UA5.
Section 4.5.1 provides this same scenario using one of the privacy
mechanisms, with Proxy2 (P2) adding the Privacy header indicating
that the History-Info header is not to be propagated outside P2’s
domain. This scenario highlights the potential functionality lost
with the use of "history" privacy in the Privacy header for the
entire request and the need for careful consideration on the use of
privacy for History-Info.
Section 4.5.2 also provides the same scenario using one of the
privacy mechanisms, however, due to local policy at Proxy2, only one
of the Request-URIs (UA4) in the History-Info contains a priv-value
of "history", thus allowing some optimized functionality in the
routing of the request, but still maintaining privacy for specific
URIs.
The formatting in these scenarios is for visual purposes; thus,
backslash and CRLF are used between the fields for readability and
the headers in the URI are not shown properly formatted for escaping.
Refer to Section 4.2 examples for the proper formatting. Additional
detailed scenarios are available in the appendix.
UA1 Proxy1 Proxy2 UA2 UA3 UA4 UA5
| | | | | | |
|--INVITE -->| | | | | |
| |-INVITE->| | | | |
Supported: histinfo
History-Info: <sip:Bob@P1.example.com>;index=1,
<sip:Bob@P2.example.com>; index=1.1
| | | | | | |
| | |-INVITE>| | | |
History-Info: <sip:Bob@P1.example.com>;index=1,
<sip:Bob@P2.example.com>;index=1.1,
<sip:User2@UA2.example.com>;index=1.1.1
| | | | | | |
| | |-----INVITE ---->| | |
History-Info:<sip:Bob@P1.example.com>;index=1,
<sip:Bob@P2.example.com>; index=1.1,
<sip:User3@UA3.example.com>;index=1.1.2
| | | | | | |
| | |-------INVITE------------>| |
History-Info:<sip:Bob@P1.example.com>;index=1,
<sip:Bob@P2.example.com>;index=1.1,
<sip:User4@UA4.example.com>;index=1.1.3
/* All Responses from the INVITEs indicate non-success/non-