<?xml version='1.0'?>
<!DOCTYPE rfc SYSTEM 'rfcXXXX.dtd'>
<rfc ipr='full3978' docName='draft-worley-sipping-dialog-00'>

<front>
<title abbrev='Guidelines for the Dialog Event Package'>
Guidelines for Implementing the Dialog Event Package in User Agents
</title>
<author initials='D.R.' surname='Worley' fullname='Dale R. Worley'>
       <organization abbrev='Pingtel'>
           Pingtel Corp.
       </organization>
       <postal>
           <street>400 West Cummings Park, Suite 2200</street>
           <city>Woburn</city>
           <region>MA</region>
           <code>01801</code>
           <country>US</country>
       </postal>
       <phone>+1 781 938 5306 x173</phone>
       <email>dworley@pingtel.com</email>
       <uri>http://www.pingtel.com</uri>
</author>
<date month='October' year='2005' />
<area>Transport</area>
<workgroup>Sipping</workgroup>
<keyword>Dialog event package</keyword>
<abstract>
<t>
This document sets out guidelines for how user agents should implement
the dialog event package in order to be usable in systems that
implement end-point controlled call-control (EPCC) features.  It is in
addition to the basic requirements for dialog event package
implementation in RFC 3265 and draft-ietf-sipping-dialog-package.
</t>
</abstract>
</front>

<middle>

<section title='Background' anchor='background'>

<t>
SIP implements telephony and similar applications over the Internet.
SIP largely conforms to the "end-to-end princple"<xref
target='end-to-end'/>, putting the major
responsibility for "call-control features" in the user agents
(telephones) themselves, in constrast to traditional telephony, where
the intelligence is concentrated in a small number of centralized
switches.
In order for a user agent to interact with dialogs (calls) that are
present on other
user agents, those user agents must publish the state of the dialogs
in which they are participating in a dialog event package<xref target='dialog-event'/>.
A user agent can retrieve another user agent's dialog event package to
obtain the identifiers of the second user agent's dialogs, and using
those identifiers, it can manipulate those dialogs.
</t>

<t>
Unfortnately, the dialog event package was specified before the
breadth of its importance was fully understood, so its specification
is relatively loose.
Loose enough that many implementations within the standard are not
usable for end-point call control (EPCC).
It is the purpose of this memo to provide a specification of
the dialog event package that is tight enough to ensure that a user
agent can fully participate in current and future EPCC operations.
</t>

</section>

<section title='Guidelines' anchor='guidelines'>

<t>
This section contains the guidelines for implementing high-quality
dialog event packages, and a brief discussion of the motiviation for
each guideline.
</t>

<section title='Addressing' anchor='addressing'>

<t>
UAs accept requests bearing one of a set of request-URIs.  Since the
UA does not control which "host parts" of URIs can route to it;
</t>

<t>
<list style='empty'>
<t>
Guideline 1: A UA should not be sensitive to the host part of the
request-URI in processing a request, as long as the host part resolves
to specify the UA.
</t>
</list>
</t>

<t>
Since a subscriber to the dialog event package may know only an
AOR (address of record) to identify the UA with which it desires to
communicate, the UA may have to route its
SUBSCRIBE through a proxy via the AOR.  The proxy will send the
SUBSCRIBE to the registered contact URIs for that AOR.
</t>

<t>
<list style='empty'>
<t>
Guideline 2: A UA should accept SUBSCRIBEs to all URIs that it
uses as contacts for AORs.
</t>
</list>
</t>

<t>
A single UA may have contacts for multiple AORs, some of which may
have contacts at other UAs.  So dialog events "for an AOR" should only
contain information about dialogs that were somehow addressed to that
AOR.
</t>

<t>
<list style='empty'>
<t>
Guideline 3: A SUBSCRIBE to a URI that the UA uses as a contact for an
AOR should obtain dialog events that describe only INVITEs to that URI
(and URIs that the UA treats as equivalent).
</t>
</list>
</t>

</section>

<section title='Status/Presence' anchor='status'>

<t>
Attendant consoles and other status reporting devices sometimes want
information about the status of a UA, rather than about all dialogs
that were addressed to a particular AOR.
</t>

<t>
<list style='empty'>
<t>
Guideline 4: A UA should accept SUBSCRIBEs to URIs with a null "user".
These subscriptions should report dialog events that describe all
dialogs at the UA.
</t>
</list>
</t>

</section>

<section title='Dialog Package Data' anchor='data'>

<t>
In order to implement EPCC, the dialog event package needs to contain
enough information to allow the subscriber to construct requests (REFER, INVITE
with Replaces, etc) that can operate on the dialog.
</t>

<t>
<list style='empty'>
<t>
Guideline 5: The dialog event package should include the call-id,
local-tag, remote-tag, and direction attributes of the dialog element.
</t>
</list>
</t>

<t>
In order to allow a variety of EPCC functions, the data in the dialog event
package needs to comprehensively describe the dialog's endpoints in a
standard way.
</t>

<t>
<list style='empty'>

<t>
Guideline 6: The dialog event package should use the following sources
for the following elements:
</t>

<t>
<list style='hanging'>

<t hangText="initiator's identity:">
the "From" header of the INVITE
</t>

<t hangText="initiator's target:">
the "Contact" header of the latest INVITE
</t>

<t hangText="recipient's identity:">
the "To" header of the INVITE, or the "From"
header that would be used when initiating a call from the "user"
specified in the SUBSCRIBE
</t>

<t hangText="recipient's target:">
the "Contact" header of the latest 2xx response to an INVITE
</t>

</list>
</t>

</list>
</t>

<t>
Note that both Contact headers can be updated by re-INVITE and
UPDATE requests during the dialog:
</t>

<t>
<list style='empty'>
<t>
Guideline 7:  The data in the dialog event package should be updated
when the contacts of the endpoints change.
</t>
</list>
</t>

</section>

<section title='Security' anchor='security'>

<t>
Because an agent that knows a dialog's parameters has total control
over the dialog, dissemination of that information should be
restricted to trusted agents.  (E.g., imagine the Jerkey Boys
subscribing to dialog events for your organization's customer service
line.)
</t>

<t>
<list style='empty'>
<t>
Guideline 8:  A UA should have a way of restricting dialog information
to trusted subscribers.  A UA should provide one of the following
methods to determine which subscribers are trusted:
</t>

<t>
<list style='letters'>

<t>
only SUBSCRIBEs coming directly from a specified IP address are trusted, or
</t>

<t>
only SUBSCRIBEs authorized by trusted keys are trusted.
</t>

</list>
</t>

</list>
</t>

<t>
Untrusted SUBSCRIBEs may come from any place on the Internet.  Because
the dialog event package provides presence information even if the
dialog identifiers are removed:
</t>

<t>
<list style='empty'>
<t>
Guideline 9:  A UA receiving an untrusted SUBSCRIBE should reject it
rather than providing an edited version (e.g., omitting the dialog
identifiers and only providing the state).
</t>
</list>
</t>

</section>

</section>

<section title='Current Implementations' anchor='impl'>

<t>
This section compares the dialog event packages generated by five
current, popular commercial UAs.
The data was taken by a test tool from current products that claimed
to implement the dialog event package.
</t>

<t>
The <xref target='methods'>first table</xref> lists the responses to
SUBSCRIBEs and INVITEs to both the URI specifying the first "line number" supported by
the UA and to the URI that gives the phone's IP address but no user.
Only one of the five implementations will accept SUBSCRIBES to both
URIs (Guidelines 2 and 4).
</t>

<texttable anchor='methods'>
<preamble>Method/user combinations accepted:</preamble>
<ttcol align='left'>User Agent</ttcol>
<ttcol align='left'>SUBSCRIBE to Line 1</ttcol>
<ttcol align='left'>SUBSCRIBE to no user</ttcol>
<ttcol align='left'>INVITE to Line 1</ttcol>
<ttcol align='left'>INVITE to no user</ttcol>
<c>A</c><c>200</c><c>404</c><c>200</c><c>404</c>
<c>B</c><c>200</c><c>404</c><c>200</c><c>404</c>
<c>C</c><c>404</c><c>200</c><c>200</c><c>200</c>
<c>D</c><c>200</c><c>200</c><c>200</c><c>200</c>
<c>E</c><c>200</c><c>404</c><c>200</c><c>404</c>
</texttable>

<t>
The <xref target='reports'>second table</xref> lists which INVITEs
will be reported in the dialog event packages returned for which
SUBSCRIBEs.
Only one of the five UAs accepts all recommended SUBSCRIBEs, and it
does not return all the dialogs specified by Guideline 4.
</t>

<texttable anchor='reports'>
<preamble>Which SUBSCRIBEs report which INVITEs:</preamble>
<ttcol align='left'>User Agent</ttcol>
<ttcol align='left'>INVITE on Line 1, SUBSCRIBE on Line 1</ttcol>
<ttcol align='left'>INVITE on Line 1, SUBSCRIBE on no user</ttcol>
<ttcol align='left'>INVITE on no user, SUBSCRIBE on Line 1</ttcol>
<ttcol align='left'>INVITE on no user, SUBSCRIBE on no user</ttcol>
<c>A</c><c>Y</c><c>-</c><c>-</c><c>-</c>
<c>B</c><c>Y</c><c>-</c><c>-</c><c>-</c>
<c>C</c><c>-</c><c>Y</c><c>-</c><c>Y</c>
<c>D</c><c>Y</c><c>N</c><c>N</c><c>Y</c>
<c>E</c><c>Y</c><c>-</c><c>-</c><c>-</c>
<postamble>"Y" means that the INVITE is reported for the SUBSCRIBE,
"N" means that it is not, "-" means that the UA does not accept the
INVITE or SUBSCRIBE</postamble>
</texttable>

<t>
The <xref target='data-items'>third table</xref> lists the data items
present in the dialog events generated by each UA.
Four of the five UAs provide all of the dialog identifiers (Guideline
5), but the populating of the identity and target fields is quite weak
(Guideline 6).
</t>

<texttable anchor='data-items'>
<preamble>Which data are present in the dialog events (for incoming calls):</preamble>
<ttcol align='left'>User Agent</ttcol>
<ttcol align='left'>Call-Id, Tags</ttcol>
<ttcol align='left'>Direction</ttcol>
<c>A</c><c>N</c><c>N</c>
<c>B</c><c>Y</c><c>Y</c>
<c>C</c><c>Y</c><c>Y</c>
<c>D</c><c>Y</c><c>Y</c>
<c>E</c><c>Y</c><c>Y</c>
</texttable>

<texttable>
<preamble>Which data are present in the dialog events (part 2):</preamble>
<ttcol align='left'>User Agent</ttcol>
<ttcol align='left'>Local identity</ttcol>
<ttcol align='left'>Local target</ttcol>
<ttcol align='left'>Remote identity</ttcol>
<ttcol align='left'>Remote target</ttcol>
<c>A</c><c>-</c><c>-</c><c>-</c><c>-</c>
<c>B</c><c>To</c><c>Contact</c><c>From</c><c>-</c>
<c>C</c><c>-</c><c>To</c><c>Contact</c><c>-</c>
<c>D</c><c>To</c><c>To</c><c>From</c><c>From</c>
<c>E</c><c>To</c><c>Fixed value</c><c>From</c><c>Contact</c>
<postamble>"To" means value of the To header, "Contact" means value
of the appropriate Contact header, "From" means value of the From
header, "Fixed value" means a fixed string, "-" means no value
</postamble>
</texttable>

</section>

</middle>

<back>
<references>

<reference anchor='end-to-end'>
    <front>
	<title>End-to-End Arguments in System Design</title>
        <author initials='J.H.' surname='Salzer'/>
        <author initials='D.P.' surname='Reed'/>
        <author initials='D.D.' surname='Clark'/>
	<date month='November' year='1984' />
    </front>
    <seriesInfo name='RFC' value='2200' />
    <seriesInfo name='STD' value='1' />
    <format type='TXT'/>
<!--         Arguments in System Design," ACM TOCS, Vol 2, Number 4, November
        1984, pp 277-288.
-->
</reference>

<reference anchor='dialog-event'>
<!-- draft-ietf-sipping-dialog-package-06.txt -->
    <front>
	<title>End-to-End Arguments in System Design</title>
        <author initials='J.H.' surname='Salzer'/>
        <author initials='D.P.' surname='Reed'/>
        <author initials='D.D.' surname='Clark'/>
	<date month='November' year='1984' />
    </front>
    <format type='TXT'/>
</reference>

</references>
</back>

</rfc>

