\section{Minimal Implementation}
\label{sec:minimal}

\subsection{Transport Protocol Support}

All entities
{\MUST} support UDP. User agents {\SHOULD} implement TCP transport.
Stateful proxy, registrar, and redirect servers {\MUST} implement TCP
transport. Other transports {\MAY} be supported by any entity.

\subsection{Client}

All clients {\MUST} be able to generate the {\INVITE} and {\ACK}
requests.  Clients {\MUST} generate and parse the \header{Call-ID},
\header{Content-Length}, \header{Content-Type}, \header{CSeq},
\header{From}, \header{Record-Route}, \header{Route} and \header{To}
headers.  Clients {\MUST} also parse the
\header{Require} header.  A minimal implementation {\MUST} understand
SDP (RFC 2327, \cite{rfc2327}).  It {\MUST} be able to recognize the
status code classes 1 through 6 and act accordingly. UAs {\MUST} be able
to use outbound proxies.

The following capability sets build on top of the minimal implementation
described in the previous paragraph. In general, each capability listed
below builds on the ones above it:
\begin{description}

\item[Basic:] A basic implementation adds support for the {\BYE} method
to allow the interruption of a pending call attempt.  It includes a
\header{User-Agent} header in its requests and indicates its preferred
language in the \header{Accept-Language} header.

\item[Redirection:] To support call forwarding, a client needs to be
able to understand the \header{Contact} header, but only the
\header{SIP-URL} part, not the parameters.

\cbdelete

\item[Negotiation:] A client {\MUST} be able to request the {\OPTIONS}
method and understand the 380 (Alternative Service) status and the
\header{Contact} parameters to participate in terminal and media
negotiation.  It {\SHOULD} be able to parse the \header{Warning}
response header to provide useful feedback to the caller.

\item[Authentication:] If a client wishes to invite callees that require
caller authentication, it {\MUST} be able to recognize the 401
(Unauthorized) status code, {\MUST} be able to generate the
\header{Authorization} request header and {\MUST} understand the
\header{WWW-Authenticate} response header.

If a client wishes to use proxies that require caller authentication, it
{\MUST} be able to recognize the 407 (Proxy Authentication Required)
status code, {\MUST} be able to generate the
\header{Proxy-Authorization} request header and understand the
\header{Proxy-Authenticate} response header.

\end{description}

\subsection{Server}

A minimally compliant server implementation {\MUST} understand the
{\INVITE}, {\ACK}, {\OPTIONS} and {\BYE} requests.  A proxy server
{\MUST} also understand {\CANCEL}.  It {\MUST} parse and generate, as
appropriate, the \header{Call-ID}, \header{Content-Length},
\header{Content-Type}, \header{CSeq}, \header{Expires}, \header{From},
\header{Max-Forwards}, \header{Require}, \header{To} and \header{Via}
headers.  It {\MUST} echo the \header{CSeq} and \header{Timestamp}
headers in the response.  It {\SHOULD} include the \header{Server}
header in its responses.

\subsection{Header Processing}

Implementations {\SHOULDNOT} have built-in limits for the number of header
instances and header field lengths, beyond imposing an overall message
length. Header fields that identify the transaction {\SHOULD} appear
first in the message so that implementations that cannot handle the full
message can at least return a status response, e.g., 513 (Message Too
Large).

Table~\ref{tab:mheaders} lists the headers that different
implementations support.  UAC refers to a user-agent client (calling
user agent), UAS to a user-agent server (called user-agent).

The fields in the table have the following meaning.  Type is as in
Table~\ref{tab:headers1} and \ref{tab:headers2}.  ``-'' indicates the
field is not meaningful to this system (although it might be generated
by it).  ``m'' indicates the field {\MUST} be understood.  ``b''
indicates the field {\SHOULD} be understood by a basic implementation. 
``r'' indicates the field {\SHOULD} be understood if the system claims
to understand redirection.  ``a'' indicates the field {\SHOULD} be
understood if the system claims to support authentication.  ``e''
indicates the field {\SHOULD} be understood if the system claims to
support encryption.  ``o'' indicates support of the field is purely
optional.  Headers whose support is optional for all implementations are
not shown.

\begin{table}[htpb]
\begin{center}
%\begin{tabular}{lccc*{5}{c}}
\begin{tabular}{lccccc}
                            & type   & UAC & proxy & UAS & registrar\\
\hline
\header{Accept}             &  R     &  -    &  o    &  m     &  m  \\
\header{Accept-Encoding}    &  R     &  -    &  -    &  m     &  m  \\
\header{Accept-Language}    &  R     &  -    &  b    &  b     &  b  \\
\header{Allow}              & 405    &  o    &  -    &  -     &  -  \\
\header{Authorization}      &  R     &  a    &  o    &  a     &  a  \\
\header{Call-ID}            &  g     &  m    &  m    &  m     &  m  \\
\header{Contact}            &  R     &  -    &  -    &  m     &  m  \\
\header{Contact}            &  r     &  m    &  r    &  -     &  -  \\
\header{Content-Encoding}   &  g     &  m    &  -    &  m     &  m  \\
\header{Content-Length}     &  g     &  m    &  m    &  m     &  m  \\
\header{Content-Type}       &  g     &  m    &  -    &  m     &  m  \\
\header{CSeq}               &  g     &  m    &  m    &  m     &  m  \\
\header{Encryption}         &  g     &  e    &  -    &  e     &  e  \\
\header{Expires}            &  g     &  -    &  o    &  o     &  m  \\
\header{From}               &  g     &  m    &  o    &  m     &  m  \\
\header{Max-Forwards}       &  R     &  -    &  b    &  -     &  -  \\
\header{Proxy-Authenticate} & 407    &  a    &  -    &  -     &  -  \\
\header{Proxy-Authorization}&  R     &  -    &  a    &  -     &  -  \\
\header{Proxy-Require}      &  R     &  -    &  m    &  -     &  -  \\
\header{Record-Route}       &  R     &  m    &  -    &  m     &  m  \\
\header{Require}            &  R     &  m    &  -    &  m     &  m  \\
\header{Response-Key}       &  R     &  -    &  -    &  e     &  e  \\
\header{Route}              &  R     &  m    &  m    &  m     &  -  \\
\header{Timestamp}          &  g     &  o    &  o    &  m     &  m  \\
\header{To}                 &  g     &  m    &  m    &  m     &  m  \\
\header{Unsupported}        &  r     &  b    &  b    &  -     &  -  \\
\header{User-Agent}         &  g     &  b    &  -    &  b     &  -  \\
\header{Via}                &  g     &  m    &  m    &  m     &  m  \\
\header{WWW-Authenticate}   & 401    &  a    &  -    &  -     &  -  \\
\end{tabular}
\end{center}
\caption[Summary of header fields]{Header Field Processing Requirements}
\label{tab:mheaders}
\end{table}
