\documentclass[11pt]{article}
\usepackage{times}
\usepackage{graphics}
\usepackage{i-d}
\usepackage{html}
\usepackage{txtpsfig}
\usepackage[dvips]{changebar}

\title{SIP for Click-To-Dial-Back and Third-Party Control}
\author{Schulzrinne}
\shorttitle{SIP}
\filename{ietf-pint-sip-00}
\wg{PINT WG}
\address{Columbia U.}
\pubdate{\today}
\expires{April 1, 1998}
\newcommand{\motivation}[1]{\begin{quotation}\begin{footnotesize}#1\end{footnotesize}\end{quotation}}
\newcommand{\see}{$\rightarrow$}
\newenvironment{syntax}{\begin{quotation}\begin{sf}\begin{tabular}{lcll}}{\end{tabular}\end{sf}\end{quotation}}

\begin{document}
\maketitle

%\section{SIP for Controlling Phone Services}
\section{Introduction}

SIP \cite{} can also be used to control calls established by other
entities, for example, to have a computer control a PBX or a web server
ask an SCP to initiate a call to a standard telephone
(``click-to-dial-back'').  We refer to the entity initiating the phone
call as the controller and the PBX or SCP as the PSTN server.

%\subsection{Outgoing Call}
\section{Outgoing Call}

The controller sends an {\sf INVITE} request to the PSTN server.  The
SIP request contains information about the caller and the call, e.g.,
from a web form. The PSTN server may use this information in initiating
the call. The telephone number to be called is contained in the {\sf c}
(connection) parameter of the SDP body. For example, if the subscriber
with number 415 555 1200 wants to initiate a call through her local PBX
to the subscriber at 1-212-555-1234, her SIP client issues the following
request to the PBX:

\begin{verbatim}
  INVITE sip://1-212-555-1234@pbx.example.com
  From: j.doe@example.com
  Content-type: application/sdp
  Call-ID:

  v=0
  o=user1 53655765 2353687637 IN IP4 128.3.4.5
  c=PSTN E.164 +1-415-555-1200
  t=0 0
  m=audio 0 RTP/AVP 0
\end{verbatim}

Camp-on is realized with the SIP {\sf Call-Disposition} ``queue''
parameter.

%\subsection{Answering Incoming Calls}
\section{Answering Incoming Calls}

If a controller receives a SIP call, it may indicate in its 200 response
to send the audio to a given telephone number, as indicated in the
previous section.  Alternatively, it can include the phone number in a
redirection response, but then it is assumed that further call control
is handled by the phone device, not the controller.  It can also reject
the call with the standard SIP codes.  Call forwarding is handled with
standard SIP 30x status codes.

\begin{flushleft}
\begin{tabular}{ll}
accept call       & 200\\
blind transfer    & {\sf BYE}, with new destination\\
forward, no anser & 408\\
forward, busy     & 600\\
forward call      & 301 or 302, {\sf Location} contains address\\
\end{tabular}
\end{flushleft}

%\subsection{Placing Calls on Hold}
\section{Placing Calls on Hold}

The party wishing to place the other party on hold sends an {\sf INVITE}
for the existing call identifier, with an SDP description indicating a
zero port number for the media types it currently does not wish to
receive. This also allows media-specific hold, e.g., to ask the other
side temporarily not to send video. Music-on-hold is implemented by
asking an RTSP server to play to the IP address (or phone number)
provided in the RTSP {\sf SETUP} request.

%\subsection{Call Parking}
\section{Call Parking}

A user can send an {\sf INVITE} to an existing call id and cause it to
move to a new extension. [Alternative: PARK request]

%\subsection{Call Transfer}
\section{Call Transfer}

To transfer an existing call blindly, the controller sends a BYE
containing a {\sf Location} header indicating the phone number the call
is to be transferred to.

For supervised call transfer, the controller initiates a call to the
destination of the call, placing the existing call on hold. It then
sends a {\sf BYE}, as above, for the first call. The PBX can transfer
back the call to the first destination if the call transfer fails.

%\subsection{Configuring the Local PBX}
\section{Configuring the Local PBX}

A controller can control a PBX by issuing a {\sf REGISTER} request with
call-handling specification.  This call-handling specification can be in
a number of programming languages and formats, including a simple list
of parameters as a {\sf text/parameter}.  Table~\ref{tab:pars} lists the
parameters currently defined. The {\sf REGISTER} response returns the
current configuration. [TBD: Could use GET\_PARAMETER and SET\_PARAMETER
instead.]

Examples:
\begin{verbatim}
autoanswer: on
callsparked: 5
forward_busy: +1-415-555-1234
forward_all: off
\end{verbatim}

\begin{table}[htpb]
\begin{flushleft}
\begin{tabular}{llp{4in}}
autoanswer    & on, off & automatically answer incoming calls to user\\
autoanswerspk & on, off & \\
callsparked   & integer & number of calls parked for a given user\\
\ldots
\end{tabular}
\end{flushleft}
\caption{Configuring PBX behavior using SIP}
\label{tab:pars}
\caption{Parameters}
\end{table}

\end{document}
