\header{ETag}               & 200    &   & e & - & - & - & o & - & - \\
\header{If-Match}           &  R     &   & e & o & o & - & - & - & - \\
\header{If-None-Match}      &  R     &   & e & o & o & - & - & - & - \\

& $|$ & \header{ETag}             & ; Section~\ref{sec:ETag}\\

& $|$ & \header{If-Match}              & ; Section~\ref{sec:If-Match}\\
& $|$ & \header{If-None-Match}         & ; Section~\ref{sec:If-None-Match}\\

\subsection{\header{ETag}}
\label{sec:ETag}

The \header{ETag} response-header field labels an instance of the
callee.  A callee {\MUST} include an \header{ETag} in a 200 response to
an {\INVITE} if the \header{Location} response-header field is not
sufficient to uniquely identify the callee.  Typically, this is the case
if the \header{Location} header points to a proxy rather than the callee
itself. (If requests are forked, it is possible that two or more people
``pick up the phone'' for the same call.)

If the caller receives a 2xx response containing an entity tag, it
{\MUST} include a \header{If-Match} (Section~\ref{sec:If-Match})
request-header field with that entity tag in the {\ACK} or {\BYE}. It
would send a {\BYE} with the entity tag if it does not wish to talk to
this particular instance of the callee.

The entity tag consists of an opaque quoted string.  An entity tag
{\MUST} be unique across all instances associated with a particular
\header{To} URI.  A given entity tag value may be used for different
URIs without implying anything about the equivalence of those URIs.  It
is {\RECOMMENDED} that the entity tag is a cryptographically random
identifier with at least 32 bits of randomness.

Note that SIP does not use the concept of ``weak'' entity tags [H3.11].

\begin{syntax}
ETag       & = & "ETag" ":" entity-tag\\
entity-tag & = & quoted-string\\
\end{syntax}

\subsection{\header{If-Match}}
\label{sec:If-Match}

The \header{If-Match} request-header field is used with a method to make
it conditional.  The server {\MUSTNOT} perform the request unless it had
returned one of the listed entity tags in a \header{ETag} header field
in a 200 response for the same \header{Call-ID}.  The ``*'' tag matches
all entity tags, as well as the case where the server that had not
returned an entity tag.  If there is no match, a user agent server
{\MUST} return a 412 (Precondition Failed) response, while a proxy
server forwards the request according to the \header{Request-URI}. A
proxy server that receives an {\ACK} with a matching entity tag
{\MUSTNOT} forward the request.

\begin{syntax}
If-Match & = & "If-Match" ":" ( "*" $|$ 1\#entity-tag )
\end{syntax}

The \header{If-Match} allows a caller to select among a set of callee
that answer to the same \header{request-URI} and \header{To}.

Example:
\begin{verbatim}
  If-Match: "83ja", "148293289"
\end{verbatim}

\subsection{\header{If-None-Match}}
\label{sec:If-None-Match}

The \header{If-None-Match} request-header field is used with a method to
make the method conditional.  The server compares the list of entity
tags in the \header{If-None-Match} header to the entity tag that it had
returned in an \header{ETag} header (Section \ref{sec:ETag}) as part of
a 200 response for the same \header{Call-ID}.  The value ``*'' matches
any entity tag.  If one of the entity tag in the \header{If-None-Match}
header matches the \header{ETag} entity tag, a user agent server
{\MUSTNOT} perform the method requested and respond with a status of 412
(Precondition Failed) instead while a proxy server forwards the request. 
(The ``*'' value is included for symmetry with \header{If-Match} only
and currently has no practical application.)

\begin{syntax}
If-None-Match & =& "If-None-Match" ":" ( "*" $|$ 1\#entity-tag )
\end{syntax}
Example:
\begin{verbatim}
  If-None-Match: "83ja", "148293289"
\end{verbatim}

&$|$& "412" & ; {\rm Precondition Failed}\\

\subsubsection{412 Precondition Failed}

The precondition given in one or more of the request-header fields
evaluated to false when it was tested on the server.  Preconditions
include \header{If-Match} (Section \ref{sec:If-Match}) and
\header{If-None-Match} (Section \ref{sec:If-None-Match}).


