One document matched: draft-boulton-ivr-control-package-02.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
	<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY rfc2616 PUBLIC ''  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml'>
	<!ENTITY rfc3261 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3261.xml'>
	<!ENTITY rfc3262 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3262.xml'>
	<!ENTITY rfc3263 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3263.xml'>
	<!ENTITY rfc3264 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml'>
    <!ENTITY rfc4240 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4240.xml'>
    <!ENTITY rfc2396 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2396.xml'>
    <!ENTITY rfc2897 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2897.xml'>
    <!ENTITY rfc4574 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4574.xml'>
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<rfc category="std" docName="draft-boulton-ivr-control-package-02" ipr="full3978">
	<front>

		<title abbrev="Media Server Control Package">A Basic Interactive
			Voice Response (IVR) Control Package for the Session
			Initiation Protocol (SIP)</title>
		
		<author fullname="Chris Boulton" initials="C." surname="Boulton">
			<organization>Ubiquity Software Corporation</organization>
			<address>
				<postal>
					<street>Building 3</street>
					<street>Wern Fawr Lane</street>
					<street>St Mellons</street>
					<city>Cardiff</city>
					<region>South Wales</region>
					<code>CF3 5EA</code>
				</postal>
				<email>cboulton@ubiquitysoftware.com</email>
			</address>
		</author>
		<author fullname="Tim Melanchuk" initials="T." surname="Melanchuk">
			<organization>BlankSpace</organization>
			<address>
			
				<email>tim.melanchuk@gmail.com</email>
			</address>
		</author>

		<author fullname="Scott McGlashan" initials="S." surname="McGlashan">
			<organization>Hewlett-Packard</organization>
			<address>
				<postal>
					<street>Gustav III:s boulevard 36</street>
					<city>SE-16985 Stockholm</city>
					<region>Sweden</region>
				</postal>
				<email>scott.mcglashan@hp.com</email>
			</address>
		</author>

		<author fullname="Asher Shiratzky" initials="A." surname="Shiratzky">
			<organization>Radvision</organization>
			<address>
				<postal>
					<street>24 Raoul Wallenberg st</street>
					<city>Tel-Aviv</city>
					<region>Israel</region>
				</postal>
				<email>ashers@radvision.com</email>
			</address>
		</author>
		
		<date year="2006"/>
		<workgroup/>
		<abstract>

			<t>This document defines a Session Initiation (SIP) Control
			Package for basic Interactive Voice Response (IVR)
			interaction.  The control of Media Servers and their related
			resources in decomposed network architectures plays an
			important role in various Next Generation Networks.  This
			Control Package provides IVR functionality using the SIP
			Control Framework.</t>
		
		</abstract>
	</front>

	<middle>

		<section title="Introduction">

<t>The SIP Control Framework <xref target="SIPCF"/> provides a generic
approach for establishment and reporting capabilities of remotely
initiated commands.  The Framework utilizes many functions provided by
the Session Initiation Protocol <xref target="RFC3261"/> (SIP) for the
rendezvous and establishment of a reliable channel for control
interactions.  The Control Framework also introduces the concept of a
Control Package.  A Control Package is an explicit usage of the Control
Framework for a particular interaction set.  This specification defines
a package for basic IVR. </t>

<t>The scope of the package is control of media server functions for
basic interactive media (e.g. play a prompt, collecting DTMF, recording
user input) as well as notifications related to these functions. </t>

<t>These functions and notifications are defined as messages in XML
<xref target="XML"/>. The message use XML elements for preparing,
starting and stopping dialogs, as well as elements for responses and
notifications (<xref target="CCXML10"/>, <xref target="MSML"/> and
<xref target="MSCP"/>).  </t>


<t>This basic IVR package uses  template dialogs to provide IVR
 functionality.   Three template dialogs are defined:
   <list style="hanging">
      <t hangText="playannouncement:">
         a dialog to play one or more prompts to the user</t>
      <t hangText="promptandcollect:">
         a dialog to prompt the user and collect their input</t>
      <t hangText="promptandrecord:">
         a dialog to prompt the user and record their input</t>
   </list>
</t>


      <t>Template dialogs are intended to provide basic IVR
        functionality (<xref target="H.248.9"/>, <xref
        target="RFC4240"/>, <xref target="MSML"/>, <xref
        target="RFC2897"/> and <xref target="MSCML"/>). The template
        approach follows previous approaches in that it provides IVR
        functionality which is commonly required for applications. It
        differs in that the functionality is expressed in XML using a
        reference to the template dialog, and parameters expressed in a
        simple XML data structure. This is a lightweight approach since
        the contents of the dialog itself does not need to be
        transported over the control channel (or fetched from an
        external source), only a template reference plus configuration
        data is required. From the developer's perspective, this
        simplifies application development: they do not need to write
        their IVR dialog using custom XML elements, they only need to
        reference the template dialog and, if required, populate a
        simple XML data structure to pass configuration data.  </t>


<t>To use a template dialog, the AS developer references it by name in
    an XML message for preparing or starting a dialog; for example
    <dialogstart src="promptandrecord"/>. The XML message may also
    contain template input parameters in a <data> element to
    configure specific behavior defined by the template dialog;
    e.g. using "prompts" with the value
    "http://www.example.com/welcome.wav". If the dialog starts
    successfully, a <response status="200"/> is returned. When the
    dialog is completed, the MS returns template output parameters in a
    dialogexit <event> notification to the AS. </t>


      <t>The implementation of template dialogs requires only that they
      adhere to the syntax and semantics of templates described in this
      document. </t>


<t>Other control packages MAY be defined which extend the capabilities
   of the templates dialogs defined in this document. Such control packages
   MUST respect the syntax and semantics of this control package.
</t>


<t>This document specifies how the basic IVR control package fulfils the
    requirements of the SIP Control Framework control packages (<xref
    target="sec:Control_Package_Definition"/>), which XML elements are
    defined by the package (<xref target="definitions"/>), the template
    dialog definitions (<xref target="defn.templates"/>) as well as
    providing examples (<xref target="examples.protocol"/>, <xref
    target="examples.templates"/>) and an XML schema (<xref
    target="schema"/>). </t>

</section>
		


<section anchor="terminology" title="Conventions and Terminology">
			
<t>In this document, <xref target="RFC2119">BCP 14/RFC 2119</xref>
defines the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY",
and "OPTIONAL".  In addition, BCP 15 indicates requirement levels for
compliant implementations.  </t>
			
<t>The following additional terms are defined for use in this document:
			
<list style="hanging">

<t hangText="Dialog:">A dialog performs media interaction with a user. A
dialog is identified by a URI and has an associated mimetype.  Dialogs
typically feature basic capabilities such as playing audio prompts,
collecting DTMF input and recording audio input from the user. More
advanced dialogs may also feature synthesized speech, recording and
playback of video, recognition of spoken input, and mixed initiative
conversations.</t>

<t hangText="Application server:">A SIP <xref target="RFC3261"/>
application server (AS) hosts and executes services such as interactive
media and conferencing in an operator's network. An AS influences and
impacts the SIP session, in particular by terminating SIP sessions on a
media server, which is under its control.</t>

<t hangText="Media Server:">A media server (MS) processes media streams
on behalf of an AS by offering functionality such as interactive media,
conferencing, and transcoding to the end user. Interactive media
functionality is realized by way of dialogs, which are identified by a
URI and initiated by the application server.  </t>
</list>
</t>

</section>


<section anchor="sec:Control_Package_Definition" title="Control Package
Definition">

<t>This section fulfills the mandatory requirement for information that
MUST be specified during the definition of a Control Framework Package,
as detailed in Section 9 of <xref target="SIPCF"/>.</t>
		  
<section anchor="sec:Control_Package_Name" title="Control Package Name">

<t>The Control Framework requires a Control Package definition to
specify and register a unique name and version.</t>

<t>The name and version of this Control Package is "msc-ivr-basic/1.0"
(Media Server Control - Interactive Voice Response - Basic - version 1.0
).  </t>
		     
</section>



<section anchor="sec:Message_Usage" title="Framework Message Usage">

<t>IVR functionality includes capabilities such as playing prompts,
collecting DTMF and recording user input.  These functions are expressed
using template dialogs defined in <xref target="defn.templates"/>. </t>

<t>This package defines XML elements in <xref target="definitions"/> and
    provides an XML Schema in <xref target="schema"/>. 
    </t>

<t>The XML elements in this package are split into requests, responses
    and event notifications.

    Requests are carried in CONTROL message bodies; <dialogprepare>,
	<dialogstart> and <dialogterminate> elements are defined as
	package requests.

    Responses are carried either in REPORT message or Control Framework
	200 response bodies; the <response> element is defined as a
	package response. 

    Event notifications are also carried in REPORT message bodies; the
	<event> element is defined for package event notifications.

</t>


<t>Note that package responses are different from framework response
	codes. Framework error response codes (see Section 8 of <xref
	target="SIPCF"/>) are used when the request or event notification is
	invalid; for example, a request is invalid XML (400), or not
	understood (500). Package responses are carried in 200 response or
	REPORT message bodies. This package's response codes are defined in
	<xref target="defn.response"/>. </t>


    <t>
    The schema uses "connection-id" and "conf-id" attributes which are
    imported from schema defined in core Control Framework <xref
    target="SIPCF"/>.
   </t>


</section>


<section anchor="sec:Common_XML" title="Common XML Support">

<t>The Control Framework requires a Control Package definition to
specify if the attributes for media dialog or conference references are
required.</t>

<t>This package requires that the XML Schema in Section 16.1 of <xref
target="SIPCF"/> MUST be supported for media dialogs and conferences. </t>

</section>

<section anchor="sec:Control_Body" title="CONTROL Message Body">

<t>A valid CONTROL body message MUST conform to the schema defined in
    <xref target="schema"/> and described in <xref
    target="definitions"/>. XML messages appearing in CONTROL messages
    MUST contain a <dialogprepare>, <dialogstart> or
    <dialogterminate> request element (<xref
    target="defn.requests"/>).  </t>


</section>

<section anchor="sec:REPORT_Body" title="REPORT Message Body">

<t>A valid REPORT body MUST conform to the schema defined in <xref
target="schema"/> and described in <xref target="definitions"/>. XML
messages appearing in REPORT messages MUST contain a <response>
(<xref target="defn.responses"/>), or a (notification) <event>
element (<xref target="defn.notifications"/>).

</t>

</section>


</section>


<section anchor="definitions" title="Element Definitions">

    <t>This section defines the XML messages for this control package. </t>

    <t>[Editors Note: since XML Schema may not be able to express all
    constraints expressed in these definitions, in cases where there is
    a difference in constraints, the definitions in the section take
    priority.]</t>

<section anchor="defn.requests" title="Requests">

        <t>The following request elements are defined:

        <list style="hanging">
            
            <t hangText="<dialogprepare>:"> prepare an IVR dialog for
            later execution </t>

            <t hangText="<dialogstart>:"> start an IVR dialog on a
            connection or conference</t>

            <t hangText="<dialogterminate>:">terminate an active IVR dialog</t>

        </list>


        </t>


<section anchor="defn.dialogprepare" title="<dialogprepare>">

<t>The <dialogprepare> request is sent from the AS to the MS to
request preparation of an IVR dialog. A prepared dialog is executed when
the AS sends a <dialogstart> request referencing the prepared dialog
(see <xref target="defn.dialogstart"/>).</t>


<t>A <dialogprepare> element has the following attributes:

<list style="hanging">

<t hangText="src:">string identifying the URI of the dialog document to
prepare. The attribute is mandatory. The MS MUST support
"playannouncement", "promptandcollect" and "promptandrecord" template dialogs
as the value for this attribute.</t>

<t hangText="dialogid:">string indicating a unique name for the
    dialog. If this attribute is not specified, the MS creates a unique
    name for the dialog. The value is used in subsequent references to
    the dialog (e.g. as dialogid in a <response>). It is an error if
    a dialog with the same name already exists on the MS.
    The attribute is optional. </t>

</list>

</t>

<t>The <dialogprepare> element has the following child elements: 

<list style="hanging">

<t hangText="<data>:">an XML data structure (see <xref
    target="defn.data"/>) to pass parameters into the dialog. It is
    an error if a specified parameter is not supported by the implementation.
    The element is optional. </t>


<t hangText="<subscribe>:">an XML data structure (see <xref
    target="defn.subscribe"/>) indicating notification events to which
    the AS subscribes. It is an error if a specified notification event
    is not supported by the implementation. The element is
    optional. </t>

</list>

</t>

<t> For example, a request to prepare a playannouncement dialog where a
single prompt is played once:

<figure><artwork>
<dialogprepare src="playannouncement">
  <data>
     <item name="prompts" 
              value="http://www.example.com/prompt1.wav"/>
     <item name="iterations" value="1"/>
  </data>
</dialogprepare>
</artwork></figure>

</t>

<t>When an MS has successfully received a <dialogprepare> request, it
MUST reply with a <response> element (<xref
target="defn.responses"/>). 
</t>

</section>


<section anchor="defn.dialogstart" title="<dialogstart>">

<t>The <dialogstart> element is sent by the AS to request execution
of a dialog. The dialog may be defined in the dialogstart request
itself, or reference a previously prepared dialog. </t>

<t>The <dialogstart> element has the following attributes:

<list style="hanging">

<t hangText="src:"> string identifying the URI of the dialog document to
start. The attribute is optional. The MS MUST support playannouncement,
promptandcollect and promptandrecord template dialogs as the value for
this attribute.  </t>

<t hangText="dialogid:">string indicating a unique name for the
    dialog. If this attribute is not specified, the MS creates a unique
    name for the dialog. The value is used in subsequent references to
    the dialog (e.g. as dialogid in a <response>). It is an error if
    a dialog with the same name already exists on the MS.
    The attribute is optional.
    </t> 

<t hangText="prepareddialogid:">string identifying a dialog previously
prepared using a dialogprepare request. The attribute is optional.</t>
  

<t hangText="connection-id:">string identifying the SIP dialog
    connection on which this dialog is to be started (see Section 16.1
    of <xref target="SIPCF"/>).  The attribute is optional. </t>


<t hangText="conf-id:">string identifying the conference on which this
    dialog is to be started (see Section 16.1 of <xref
    target="SIPCF"/>). The attribute is optional. </t>

</list>
</t>

<t>If the prepareddialogid is specified, it is an error to specify the
    src or dialogid attributes. </t>

<t>If the prepareddialogid is not specified, exactly the src attribute
    MUST be specified; otherwise, it is an error. </t>

 <t>Exactly one of the connection-id or conf-id attributes MUST be
 specified. It is an error to specify both connection-id and
 conf-id.</t>

<t>The <dialogstart> element has the following child elements
defined: 

<list style="hanging">

<t hangText="<stream>:"> contains the following
attributes:
    <list style="hanging"> 

        <t hangText="media:">a string indicating the type of media
        associated with the stream. It is strongly recommended that the
        following values are used for common types of media: "audio" for
        audio media, and "video" for video media.  The attribute is
        mandatory. </t>

        <t hangText="label:">a string indicating the SDP label
        associated with a media stream (<xref target="RFC4574"/>).  The
        attribute is optional.  </t>

        <t hangText="direction:">a string indicating the direction of
        the media flow between a dialog and its end point conference or
        connection. Defined values are: "sendrecv" (media can be sent
        and received), "sendonly" (media can only be sent), and
        "recvonly" (media can only be received). The default value is
        "sendrecv". The attribute is optional. </t>

    </list> 

    One or more <stream> elements may be specified so that individual
    media streams can be controlled independently; for example, audio
    only for transmission, but video only for reception. 

    The <stream> element is optional. If no <stream> elements are
    specified, then the default is the media configuration of the
    connection or conference.

    It is an error if a <stream> element is in conflict with (a)
    another <stream> element, (b) with dialog, connection or
    conference media capabilities, or (c) with a SDP label value as part
    of the connection-id (see Section 16.1 of <xref target="SIPCF"/>).
    </t>

<t hangText="<data>:">an XML data structure (see <xref
    target="defn.data"/>) to pass parameters into the dialog.  It is
    an error if a specified parameter is not supported by the
    implementation.  The element is optional. </t>

<t hangText="<subscribe>:">an XML data structure (see <xref
    target="defn.subscribe"/>) indicating notification events to which
    the AS subscribes. It is an error if a specified notification event
    is not supported by the implementation.The element is optional. </t>

</list>
    </t>

<t>[Editors Note: the <stream> element assumes that the use of the
    SDP label by itself is insufficent for media stream control. In
    particular, the SDP label does not address directionality, nor does
    it address conferences. Further investigation of the <stream> is
    is required.]  </t>

<t>If the prepareddialogid is specified and the <dialogprepare>
contained a <data> element, it is an error to specify it in
<dialogstart>.  Likewise, If the prepareddialogid is specified and
the <dialogprepare> contained a <subscribe> element, it is an
error to specify it in <dialogstart>.
</t>

<t>For example, a request to start a promptandrecord template dialog on
a conference:
<figure><artwork>
 <dialogstart conf-id="conference11" src="playandrecord">
    <data>
      <item name="maxtime" value="384000s"/>
    </data>
 </dialogstart>
</artwork></figure>
    </t>

<t>When an MS has successfully received a <dialogstart> request, it
MUST reply with a <response> element (<xref
target="defn.responses"/>).  </t>

</section>

<section anchor="defn.dialogterminate" title="<dialogterminate>">

<t>A dialog that has been successfully prepared or started can be
terminated by a <dialogterminate> request element from the AS.</t>

<t>The <dialogterminate> element has the following attributes:

<list style="hanging">

<t hangText="dialogid:">string identifying an existing dialog. The
attribute is mandatory.</t>

<t hangText="immediate:">string with the values "true" or "false"
    indicating whether the dialog is to be terminated immediately or
    not. If a dialog is terminated immediately, no further dialog event
    notifications are sent (including a dialogexit <event>). The default
    is "false". The attribute is optional. </t>

</list>
</t>

<t>For example, assuming a dialog with the dialogid "vxi1" has been
started, it can be terminated immediately with the following request:

<figure><artwork>
<dialogterminate dialogid="vxi1" immediate="true"/>
</artwork></figure>
</t>


<t>When an MS has successfully received a <dialogterminate> request, it
MUST reply with a <response> element (<xref
target="defn.responses"/>).  </t>

</section>

</section>




<section anchor="defn.responses" title="Responses">

  <t>Responses are specified in a <response> element. </t>


<section anchor="defn.response" title="<response>">

<t>Reponses to requests are indicated by a <response> element. </t>

<t>The <response> element has following attributes:

<list style="hanging">

<t hangText="status:">numeric code indicating the response status. The
attribute is mandatory.</t>

<t hangText="reason:">string specifying a reason for the response
status. The attribute is optional. </t>

<t hangText="dialogid:">string identifying the dialog. The attribute is
optional.</t>

<t hangText="connection-id:">string identifying the SIP dialog
    connection associated with the dialog (see Section 16.1 of <xref
    target="SIPCF"/>). The attribute is optional.</t>

<t hangText="conf-id:">string identifying the conference associated with
    the dialog (see Section 16.1 of <xref target="SIPCF"/>). The
    attribute is optional.</t>

</list>
</t>

    <t>The following status codes are defined: </t>


       <texttable anchor="defn.response.statuscodes"
                title="<response> status codes" >
                <ttcol align="left" width="15%">code</ttcol>
                <ttcol align="left" width="85%">description</ttcol>
                <c>200</c>
                <c>OK</c>

                <c>401</c>
                <c>dialogid already exists</c>
                <c>402</c>
                <c>dialogid does not exist</c>


                <c>403</c>
                <c>connection-id does not exist</c>

                <c>404</c>
                <c>conf-id does not exist</c>

                <c>405</c>
                <c>Unknown or unsupported element</c>

                <c>406</c>
                <c>Element required</c>

                <c>407</c>
                <c>Unknown or unsupported attribute</c>

                <c>408</c>
                <c>Attribute required</c>

                <c>409</c>
                <c>template dialog not supported</c>

                <c>410</c>
                <c>data parameter not supported</c>

                <c>411</c>
                <c>event subscription not supported</c>

                <c>412</c>
                <c>stream parameter invalid</c>

                <c>499</c>
                <c>other error</c>

              </texttable>

 <t>[Editors Note: more status codes may need to be defined.]</t>

<t>For example, a response when a dialog was prepared successfully:

<figure><artwork>
<response status="200" dialogid="vxi1"/>
</artwork></figure>
</t>


<t>The response if dialog preparation failed due to an unknown template:

<figure><artwork>
 <response status="409" dialogid="vxi1" 
    reason="Unknown template: promptandrecod"/>
</artwork></figure>
</t>


<t>For example, a response when the dialog was started successfully.

<figure><artwork>
 <response status="200" dialogid="vxi1" 
              connection-id="7HDY839~HJKSkyHS"/>
</artwork></figure>

</t>

</section>

</section>


<section anchor="defn.notifications" title="Notifications">

    <t>Event notifications are specified in an <event> element. </t>

<section anchor="defn.event" title="<event>">

    <t>Dialog event notifications are either manual or automatic. </t>

<t> Manual event notifications are defined when an AS subscribes to
    notifications for dialog events using the <subscribe> element of
    <dialogprepare> or <dialogstart>.  </t>

<t> Automatic event notifications are defined as part of a Control
    Package. The AS SHOULD NOT subscribe to these event
    notifications. The MS MUST support these event notifications. This
    package defines one automatic notification event: "dialogexit" which
    indicates that an active dialog has terminated. Note that this
    notification is not sent if the dialog has been terminated by the AS
    using a <dialogterminate/> request where "immediate=true". </t>

<t> When a dialog generates a notification event, the MS sends the event
    to the AS using an <event> element. </t>


<t>The <event> element has the following attributes:

<list style="hanging">

<t hangText="name:">string indicating the name of dialog event. The
string is restricted to a sequence of alphanumeric or "."
characters. The attribute is mandatory. </t>

<t hangText="dialogid:">string identifying the dialog. The attribute is
mandatory. </t>

</list>
</t>

<t>The <event> element has the following child element: 

<list style="hanging">

<t hangText="<data>:"> an XML data structure (see <xref
    target="defn.data"/>) to pass information additional information
    about the dialog event.  The element is optional. </t> 

</list> 

</t>

<t>For example, when a dialog exits the MS may send a dialogexit
    <event> with data indicating the status of a template
    dialog:

<figure><artwork>
<event name="dialogexit" dialogid="vxi1">
 <data>
   <item name="status" value="1"/>
 </data>
</event>
</artwork></figure>
</t>

</section>



</section>


<section anchor="defn.data" title="<data>">

<t>The <data> element is a general container for parameterized data.
    </t>

    <t>The <data> element has no attributes, but has the
    following child elements defined:


      <list style="hanging">

       <t hangText="<item>:"> contains the following attributes:

        <list style="hanging"> 

        <t hangText="name:">a string indicating the name of the
            parameter.  The attribute is mandatory. </t>

        <t hangText="value:">a string indicating the value of the
        parameter. Multiple values of a parameters can be specified 
        using space separation. The attribute is mandatory.  </t>

        </list>
    </t>

    </list>

      Multiple <item> elements may be specified. </t>


<t>For example, a <data> specifying promptandcollect template
parameters with simple values:

<figure><artwork>
<data>
   <item name="iterations" value="5"/>
   <item name="timeout" value="10s"/>
</data>
</artwork></figure>

</t>

<t>In this example, a <data> specifying a playannouncement
    template with a complex value for the prompts parameter:

<figure><artwork>
<data>
 <item name="prompts" value="http://example.com/balance.wav 
          http://example.com/five.wav http://example.com/euros.wav"/>
</data>
</artwork></figure>
</t>

<t>[Editors Note: we may also want to investigate the use of 
<item>s nested within a  top-level <item> to specify complex
    values. ]</t>

</section>

<section anchor="defn.subscribe" title="<subscribe>">

<t> The <subscribe> element is a container for specifying dialog
    notification events to which an AS subscribes. Notifications of
    dialog events are delivered using the <event> element (see <xref
    target="defn.event"/>).
</t>

    <t>The <subscribe> element has no attributes, but has the
    following child elements defined:

      <list style="hanging">

       <t hangText="<notify>:"> contains the following attributes:

        <list style="hanging"> 

        <t hangText="name:">a string indicating the name of the event to
            be notified of.  The attribute is mandatory. </t>
        </list>

        The <notify> element may have a <data> child element. </t>
    </list>
      Multiple <notify> elements may be specified. 
    </t>


<t>For example, the AS wishes to subscribe to DTMF and bargein
    notification events associated with a dialog:

<figure><artwork>
<dialogstart src="promptandcollect" 
     connection-id="7HDY839~HJKSkyHS~HUwkuh7ns">
 <subscribe>
    <notify name="dtmf"/>
    <notify name="bargein"/>
  </subscribe>
</dialogstart>
</artwork></figure>


If the MS supports these notification events, then it would use the
    <event> element to send notifications during the dialog to the AS
    when the events occured.  </t>

<t>[Editors Note: It may be possible to define a general event
    subscription mechanism as part of the SIP Control Framework.] </t>

<t>[Editors Note: This Control Package does not specify dialog
    notification events apart from "dialogexit". Later versions may
    define events such as: "dtmf" (a DTMF key is pressed), "mediastart"
    (media playback started), "bargein" (user has barged in on a
    prompt), and "rtpcontrol" (control data, e.g. VFU, PoC, etc, is
    received over the RTP control channel.] </t>


</section>

</section>



<section anchor="defn.templates" title="IVR Template Dialogs">

        <t>The execution of IVR template dialog takes place on the
            MS. The AS specifies the name of the template and
            configuration parameters, and receives the result from the
            MS after the dialog has been executed. </t>

       <t>Input parameters are used to configure and customize the
      behavior of the template. For many input parameters, the templates
      provide default values; a developer can specify an alternative
      value if the default is not appropriate for their
      application. Input parameters for templates may be mandatory,
      requiring a specific value to be provided. </t>

      <t>The result of executing a template dialog is reported to the AS
      using output parameters. These parameters may describe status
      information, error information or information collected from the
      user. Output parameters are mandatory or optional depending on the
      specific template; mandatory parameters must be specified by the
      implementation. </t>

    <t>Template dialogs are invoked by referencing them in the src
    attribute of <dialogprepare> (<xref
    target="defn.dialogprepare"/>) or <dialogstart> (<xref
    target="defn.dialogstart"/>). Input parameters are specified in the
    <data> child element (<xref target="defn.data"/>) of these
    elements. Output parameters are specified in the <data> child
    element of a dialogexit <event> notification (<xref
    target="defn.event"/>). The detailed mapping of template dialogs to
    XML CONTROL and REPORT messages is described in <xref
    target="sec:Control_Package_Definition"/> and examples are provided
    in <xref target="examples.templates"/>.  </t>

      <t>The implementation of template dialogs MUST adhere to the
      syntax and semantics of templates described in this document.
      Implementations MAY support additional parameters of the defined
      template dialogs.  Implementations MAY support additional template
      dialogs. The actual implementation may be based on any
      technology or scripting language.  </t>

      <t>The media requirements on the template implementation are
     restricted to the capability to play audio prompts (specified as
     <xref format="title" target="defn.uri"/>s), collect DTMF input, and
     record audio input. The implementation MUST support G.711 audio
     formats (headerless and wav) for playback and recording. The
     implementation MAY support other media formats. </t>

    <t>[Editors Note: Later versions may consider additional media
    requirements including TTS, ASR, video, etc. ] </t>

    <section title="Play Announcement">

      <t>A template dialog to play announcements to the user. </t>

        <t>The template dialog is invoked using the URI
        "playannouncement".</t>
        
        <t>The dialog execution model consists of:

            <list style="numbers">

                <t>Playing <xref format="title"
                target="playannouncement.prompts"/> in the order
                specified until completion. 
                </t>

                <t>Repeating step 1 for the value of  <xref format="title"
                    target="playannouncement.iterations"/>. </t>

                <t>Returning <xref format="title" 
                    target="playannouncement.status"/> and 
                    <xref format="title" 
                    target="playannouncement.reason"/> parameters.
                    </t>

                </list>

        </t>


        <t>The input and output parameters are summarized and defined
        below.</t>

      <texttable anchor="playannouncement.parameters"
        title="playannouncement parameter overview">
        <ttcol align="left" width="15%">Name</ttcol>
        <ttcol align="left" width="15%">Direction</ttcol>
        <ttcol align="left" width="40%">Description</ttcol>
        <ttcol align="left" width="10%">Definition</ttcol>

        <c>prompts</c>
        <c>input</c>
        <c>prompts to play</c>
        <c><xref target="playannouncement.prompts"/></c>

        <c>iterations</c>
        <c>input</c>
        <c>maximum iterations</c>
        <c><xref target="playannouncement.iterations"/></c>

        <c>status</c>
        <c>output</c>
        <c>status code</c>
        <c><xref target="playannouncement.status"/></c>

        <c>reason</c>
        <c>output</c>
        <c>reason for status</c>
        <c><xref target="playannouncement.reason"/></c>

      </texttable>

          <t>Note that playannouncement requires at least one prompt
          specified in <xref format="title"
              target="playannouncement.prompts"/>.</t>


          <texttable anchor="playannouncement.prompts"
            title="prompts">

            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">prompts</ttcol>

            <c>Description</c>
            <c>One or more prompts to play</c>

            <c>Direction</c>
            <c>input</c>

            <c>Type</c>
            <c><xref format="title" target="defn.urilist"/></c>

            <c>Optional</c>
            <c>No</c>

            <c>Possible Values</c>
            <c>A valid URIList which is non-empty</c>

            <c>Default</c>
            <c>none</c>

          </texttable>


          <texttable anchor="playannouncement.iterations"  
              title="iterations">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">iterations</ttcol>

            <c>Description</c>
            <c>Maximum number of times the
            playannouncement  dialog is to be played</c>

            <c>Direction</c>
            <c>input</c>

            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
                <c>A valid non-negative integer.
                    A value of 0 indicates that the dialog is repeated
                       until halted by other means.</c>
            <c>Default</c>
            <c>1</c>
          </texttable>


          <texttable anchor="playannouncement.status" 
              title="status">

            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">status</ttcol>

            <c>Description</c>
            <c>A status code indicating success or failure of the
    playannouncement dialog</c>
            <c>Direction</c>
            <c>output</c>

            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>No</c>
            <c>Possible Values</c>
            <c>1 for success; otherwise an error code (600, 601, 602). 
               See <xref target="allstatuscodes"/>
            </c>
            <c>Default</c>
            <c>none</c>
          </texttable>



          <texttable anchor="playannouncement.reason" title="reason" >
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">reason</ttcol>
            <c>Description</c>
            <c>A textual description providing a reason
            for the status code; e.g. details about an error</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c><xref format="title" target="defn.string"/></c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid String value</c>
            <c>Default</c>
            <c>Empty string</c>
          </texttable>


     <t>The following additional input parameters are under
            consideration for later versions:</t>


        <texttable title="Additional playannouncement parameters" anchor="playannouncement.extensions">
          <ttcol align="left" width="15%">Name</ttcol>
          <ttcol align="left" width="85%">Description</ttcol>
          <c>duration</c>
          <c>maximum duration for the dialog including iterations</c>
          <c>interval</c>
          <c>time to elapse between successive
        iterations</c>
          <c>audiomaxage</c>
          <c>maxage cache control for prompts</c>
          <c>audiomaxstale</c>
          <c>maxstale cache control for prompts</c>
          <c>speed</c>
          <c>playback speed for prompts</c>
          <c>volume</c>
          <c>playback volume for prompts</c>
          <c>offset</c>
          <c>play from offset in prompts</c>
          <c>variables</c>
          <c>references to common types such as money, time, numbers, etc </c>
        </texttable>

</section>


 <section title="Prompt and Collect">
 
     <t>A template dialog to play prompts and collect DTMF input.  </t>

     <t>The dialog is invoked with the URI "promptandcollect". </t>

     
             <t>The dialog execution model consists of:

            <list style="numbers">

                <t>Clearing the digit buffer depending on the value of
                <xref format="title"
                target="promptandcollect.cleardigitbuffer"/>.</t>

                <t>Playing <xref format="title"
                target="promptandcollect.prompts"/> in the order
                specified.  The <xref format="title"
                target="promptandcollect.bargein"/> parameter determines
                whether user input can be collected during prompt
                playback stops (if so, prompt playback is stopped).
                </t>

                <t>Collecting DTMF input from the user. Valid DTMF
                patterns are either a simple digit string where the
                maximum length is determined by <xref format="title"
                target="promptandcollect.maxdigits"/> and may be
                terminated by the character in <xref format="title"
                target="promptandcollect.termchar"/>; or a custom DTMF
                grammar specified by <xref format="title"
                target="promptandcollect.grammar"/>. The parameters
                <xref format="title"
                target="promptandcollect.timeout"/>, <xref
                format="title"
                target="promptandcollect.interdigittimeout"/> and <xref
                format="title" target="promptandcollect.termtimeout"/>
                control user input timeout, interdigit timeout and the
                terminating timeout respectively.  </t>


                <t>If no input is collected or the input is invalid,
                    steps 1 - 3 are repeated for the value of <xref
                    format="title" target="promptandcollect.iterations"/>.
                  </t>

                <t>Returning <xref format="title" 
                    target="promptandcollect.status"/>,
                    <xref format="title" 
                    target="promptandcollect.reason"/> and
                    <xref format="title" 
                    target="promptandcollect.result"/> 
                    parameters.
                    </t>

                </list>

        </t>


     <t>The input and output parameter are summarized and defined
     below. </t>

      <texttable title="promptandcollect parameter overview">
        <ttcol align="left" width="15%">Name</ttcol>
        <ttcol align="left" width="15%">Direction</ttcol>
        <ttcol align="left" width="40%">Description</ttcol>
        <ttcol align="left" width="10%">Definition</ttcol>

                <c>prompts</c>
                <c>input</c>
                <c>prompts to play</c>
                <c><xref target="promptandcollect.prompts"/></c>


                <c>iterations</c>
                <c>input</c>
            <c>maximum attempts</c>
            <c>
              <xref target="promptandcollect.iterations"/>
            </c>


                <c>cleardigitbuffer</c>
                <c>input</c>
            <c>dtmf buffer clearing</c>
            <c>
              <xref target="promptandcollect.cleardigitbuffer"/>
            </c>

                <c>bargein</c>
                <c>input</c>
            <c>interruption of prompts </c>
            <c>
              <xref target="promptandcollect.bargein"/>
            </c>


                <c>timeout</c>
                <c>input</c>
            <c>timeout for user input </c>
            <c>
              <xref target="promptandcollect.timeout"/>
            </c>

                <c>interdigittimeout</c>
                <c>input</c>
            <c>timeout between digits </c>
            <c>
              <xref target="promptandcollect.interdigittimeout"/>
            </c>

                <c>termtimeout</c>
                <c>input</c>
            <c>terminating timeout </c>
            <c>
              <xref target="promptandcollect.termtimeout"/>
            </c>

                <c>termchar</c>
                <c>input</c>
            <c>terminating character </c>
            <c>
              <xref target="promptandcollect.termchar"/>
            </c>

                <c>maxdigits</c>
                <c>input</c>             
            <c>maximum number of digits </c>
            <c>
              <xref target="promptandcollect.maxdigits"/>
            </c>

                <c>grammar</c>
                <c>input</c>             
            <c>custom grammar </c>
            <c>
              <xref target="promptandcollect.grammar"/>
            </c>


                <c>status</c>
                <c>output</c>             
            <c>status code</c>
            <c>
              <xref target="promptandcollect.status"/>
            </c>


                <c>reason</c>
                <c>output</c>             
            <c>reason for status</c>
            <c>
              <xref target="promptandcollect.reason"/>
            </c>

                <c>result</c>
                <c>output</c>             
            <c>input collected</c>
            <c>
              <xref target="promptandcollect.result"/>
            </c>
      </texttable>


          <texttable anchor="promptandcollect.prompts"
          title="prompts">

            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">prompts</ttcol>

            <c>Description</c>
            <c>Initial prompts to play</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.urilist"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid URIList</c>
            <c>Default</c>
            <c>none</c>
          </texttable>


          <texttable anchor="promptandcollect.iterations"
          title="iterations">

            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">iterations</ttcol>
            <c>Description</c>
            <c>Maximum number of times the
            promptandcollect dialog is to be played</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid non-negative integer. A value of 0
            indicates the dialog is  repeated
            until halted by other means.</c>
            <c>Default</c>
            <c>0</c>
          </texttable>


          <texttable anchor="promptandcollect.cleardigitbuffer"
          title="cleardigitbuffer">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">cleardigitbuffer</ttcol>
            <c>Description</c>
            <c>Clear digit buffer prior to
            prompt playback</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.boolean"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid boolean value. A value of
            true indicates that the digitbuffer is to be cleared. A
            value of false indicates that the digitbuffer is not to be
            cleared. </c>
            <c>Default</c>
            <c>true</c>
          </texttable>


          <texttable anchor="promptandcollect.bargein"
          title="bargein">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">bargein</ttcol>
            <c>Description</c>
            <c>Indicates whether the user can interrupt
            the prompt with their input</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.boolean"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid boolean value. A value of
            true indicates that bargein is permitted.  A
            value of false indicates that bargein is not permitted. </c>
            <c>Default</c>
            <c>true</c>
          </texttable>


          <texttable anchor="promptandcollect.timeout"
          title="timeout">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">timeout</ttcol>
            <c>Description</c>
            <c>Indicates the time to wait for user input
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>5s</c>
          </texttable>


          <texttable anchor="promptandcollect.interdigittimeout"
          title="interdigittimeout">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">interdigittimeout</ttcol>
            <c>Description</c>
            <c>The inter-digit timeout value to use
            when recognizing DTMF input
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>2s</c>
          </texttable>


          <texttable anchor="promptandcollect.termtimeout"
          title="termtimeout">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">termtimeout</ttcol>
            <c>Description</c>
            <c>The terminating timeout to use when
        recognizing DTMF input </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>0s</c>
          </texttable>



          <texttable anchor="promptandcollect.termchar"
          title="termchar">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">termchar</ttcol>
            <c>Description</c>
            <c>The terminating DTMF character for DTMF
            input recognition. This parameter is
    ignored if the <xref format="title"
          target="promptandcollect.grammar"/> parameter is specified.</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.dtmfchar"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid DTMFChar value. To disable
                termination by a conventional DTMF character, set the parameter
    to an unconventional character like 'A'. </c>
            <c>Default</c>
            <c>#</c>
          </texttable>


          <texttable anchor="promptandcollect.maxdigits"
          title="maxdigits">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">maxdigits</ttcol>
            <c>Description</c>
            <c>The maximum number of digits to collect
    using an internal digits (0-9 only) grammar. This parameter is
    ignored if the <xref format="title"
          target="promptandcollect.grammar"/> parameter is specified. </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.posinteger"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid positive integer value. </c>
            <c>Default</c>
            <c>5</c>
          </texttable>

          <texttable anchor="promptandcollect.grammar"
          title="grammar">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">grammar</ttcol>
            <c>Description</c>

            <c>A URI reference to a custom DTMF grammar. If this
    parameter is specified, then the referenced DTMF grammar is used
    instead of the internal digits grammar (i.e. <xref format="title"
    target="promptandcollect.maxdigits"/> and <xref format="title"
    target="promptandcollect.termchar"/> are ignored even if
    specified). Custom grammars permit the full range of DTMF characters
    including '*' and '#' to be specified for DTMF pattern
    matching. </c>

            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.uri"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid URI value referencing a
    valid custom DTMF grammar. </c>
            <c>Default</c>
            <c>none</c>
          </texttable>

<t> [Editors note: The format of the custom DTMF grammar is not yet
    defined. Possibilities include: <xref target="SRGS"/>, <xref
    target="H.248.1"/>, and <xref target="KPML"/>. If more than one
    format is permitted, then an additional input parameter
    "grammartype" would indicate the format used in the grammar
    parameter.]</t>

          <texttable anchor="promptandcollect.status"
          title="status">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">status</ttcol>
            <c>Description</c>
            <c>A status code indicating success or failure of the
    promptandcollect dialog</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>No</c>
            <c>Possible Values</c>
            <c>1 for success; otherwise an error code (600, 601, 603). 
               See <xref target="allstatuscodes"/>
            </c>
            <c>Default</c>
            <c>none</c>
          </texttable>


          <texttable anchor="promptandcollect.reason"
          title="reason">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">reason</ttcol>
            <c>Description</c>
            <c>A textual description providing a reason
            for the status code; e.g. details on an error</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c><xref format="title" target="defn.string"/></c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid String value</c>
            <c>Default</c>
            <c>Empty string</c>
          </texttable>

          <texttable anchor="promptandcollect.result"
        title="result">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">result</ttcol>
            <c>Description</c>
            <c> The DTMF input collected from the user. </c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c><xref format="title" target="defn.dtmfstring"/></c>
            <c>Optional</c>
            <c>The parameter is mandatory if status is 1;
            otherwise, optional.</c>
            <c>Possible Values</c>
            <c>A valid DTMFString (no spaces between characters).
</c>
            <c>Default</c>
            <c>Empty String</c>
          </texttable>



        <t>In addition to the prompt extensions described in <xref
    target="playannouncement.extensions"/>, the following parameters are
    under consideration for later versions:</t>

        <texttable>
          <ttcol align="left" width="15%">Name</ttcol>
          <ttcol align="left" width="85%">Description</ttcol>
          <c>nomatchprompts</c>
          <c>prompts to play when input doesn't match
        the DTMF grammar</c>
          <c>noinputprompts</c>
          <c>prompts to play when there is no user
        input</c>
          <c>successprompts</c>
          <c>prompts to play when user input is
        collected</c>
          <c>failureprompts</c>
          <c>prompts to play when no valid user
        input has been collected after all iterations tried</c>
          <c>escapechar</c>
          <c>character which causes the dialog to
        restart without incrementing the iterations counter</c>
          <c>iterationcount</c>
          <c>number of iterations
    (output)</c>
          <c>promptplayedamount</c>
          <c>duration of initial prompts played if
    prompt interrupted (output)</c>
        </texttable>

 </section>




    <section title="Prompt and Record">

      <t>A template dialog to prompt the user and record their audio
        input.</t>


        <t>The dialog is invoked with the URI "promptandrecord". </t>


             <t>The dialog execution model consists of:

            <list style="numbers">

                <t>Playing <xref format="title"
                target="promptandrecord.prompts"/> in the order
                specified until completion.  </t>

                <t>Recording audio input from the user. Recording is
                initiated if user input is received before <xref
                format="title" target="promptandrecord.timeout"/>
                expires.  The recording is terminated by DTMF input,
                the maximum duration being exceeded or a final silence
                after recording, as specified in <xref format="title"
                target="promptandrecord.dtmfterm"/>, <xref format="title"
                target="promptandrecord.maxtime"/> and <xref
                format="title" target="promptandrecord.finalsilence"/>
                parameters respectively.
                        </t>

                <t>If recording is not initiated, steps 1 - 2 are
                    repeated for the value of <xref format="title"
                    target="promptandrecord.iterations"/>.  </t>

                <t>Returning <xref format="title" 
                    target="promptandrecord.status"/>,
                    <xref format="title" 
                    target="promptandrecord.reason"/> and
                    <xref format="title" 
                    target="promptandrecord.result"/> 
                    parameters.
                    </t>

                </list>

        </t>


        <t>The input and output parameter are summarized and defined
        below. </t>

      <texttable>
        <ttcol align="left" width="15%">Name</ttcol>
        <ttcol align="left" width="15%">Direction</ttcol>
        <ttcol align="left" width="60%">Description</ttcol>
        <ttcol align="left" width="10%">Definition</ttcol>

                <c>prompts</c>
                <c>input</c>    
            <c>prompts to play</c>
            <c>
              <xref target="promptandrecord.prompts"/>
            </c>

                <c>iterations</c>
                <c>input</c>    
            <c>maximum attempts</c>
            <c>
              <xref target="promptandrecord.iterations"/>
            </c>

                <c>timeout</c>
                <c>input</c>    
            <c>timeout to wait for input </c>
            <c>
              <xref target="promptandrecord.timeout"/>
            </c>

                <c>dtmf</c>
                <c>input</c>    
            <c>recording terminated by DTMF </c>
            <c>
              <xref target="promptandrecord.dtmfterm"/>
            </c>

                <c>maxtime</c>
                <c>input</c>    
            <c>maximum duration of recording </c>
            <c>
              <xref target="promptandrecord.maxtime"/>
            </c>

            <c>finalsilence</c>
                <c>input</c>
            <c>final silence to terminate recording </c>
            <c>
              <xref target="promptandrecord.finalsilence"/>
            </c>


            <c>status</c>
            <c>output</c>
            <c>status code</c>
            <c>
              <xref target="promptandrecord.status"/>
            </c>

            <c>reason</c>
            <c>output</c>
            <c>reason for status</c>
            <c>
              <xref target="promptandrecord.reason"/>
            </c>

            <c>result</c>
            <c>output</c>
            <c>URI for recording</c>
            <c>
              <xref target="promptandrecord.result"/>
            </c>

          </texttable>


          <texttable anchor="promptandrecord.prompts"
          title="prompts">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">prompts</ttcol>
            <c>Description</c>
            <c>Initial prompts to play</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.urilist"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid URIList</c>
            <c>Default</c>
            <c>none</c>
          </texttable>


          <texttable anchor="promptandrecord.iterations"
          title="iterations">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">iterations</ttcol>
            <c>Description</c>
            <c>Maximum number of times the
            promptandrecord dialog is to be played</c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid non-negative integer. A value of 0
            indicates that the dialog is repeated
            until halted by other means.</c>
            <c>Default</c>
            <c>0</c>
          </texttable>


          <texttable anchor="promptandrecord.timeout"
          title="timeout">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">timeout</ttcol>
            <c>Description</c>
            <c>Indicates the time to wait for user input.
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>5s</c>
          </texttable>


          <texttable anchor="promptandrecord.dtmfterm"
          title="dtmfterm">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">dtmfterm</ttcol>
            <c>Description</c>
            <c>Indicates whether recording can be
    terminated by DTMF input
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.boolean"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid Boolean value. A value of
    true indicates that recording can be terminated by DTMF. A value of
    false indicates that recording cannot be terminated by DTMF.</c>
            <c>Default</c>
            <c>true</c>
          </texttable>


          <texttable anchor="promptandrecord.maxtime"
          title="maxtime">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">maxtime</ttcol>
            <c>Description</c>
            <c>The maximum duration of the recording
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>15s</c>
          </texttable>

          <texttable anchor="promptandrecord.finalsilence"
          title="finalsilence">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">finalsilence</ttcol>
            <c>Description</c>
            <c>The interval of silence that indicates
            end of speech
        </c>
            <c>Direction</c>
            <c>input</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.timedesignation"/>
            </c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid TimeDesignation value. </c>
            <c>Default</c>
            <c>5s</c>
          </texttable>



          <texttable anchor="promptandrecord.status"
          title="status">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">status</ttcol>
            <c>Description</c>
            <c>A status code indicating success or failure of the
    promptandrecord dialog</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.nonneginteger"/>
            </c>
            <c>Optional</c>
            <c>No</c>
            <c>Possible Values</c>
            <c>1 for success; otherwise an error code (600, 601, 603). 
               See <xref target="allstatuscodes"/>
                </c>
            <c>Default</c>
            <c>none</c>
          </texttable>


          <texttable anchor="promptandrecord.reason"
            title="reason">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">reason</ttcol>
            <c>Description</c>
            <c>A textual description providing a reason
        for the status code; e.g. details on an error</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c><xref format="title" target="defn.string"/></c>
            <c>Optional</c>
            <c>Yes</c>
            <c>Possible Values</c>
            <c>A valid String value</c>
            <c>Default</c>
            <c>Empty string</c>
          </texttable>

          <texttable anchor="promptandrecord.result"
          title="result">
            <ttcol align="left" width="15%">Name</ttcol>
            <ttcol align="left" width="85%">result</ttcol>
            <c>Description</c>
            <c>A URI referencing the media recording</c>
            <c>Direction</c>
            <c>output</c>
            <c>Type</c>
            <c>
              <xref format="title" target="defn.uri"/>
            </c>
            <c>Optional</c>
            <c>The parameter is mandatory if status is 1;
            otherwise, optional.</c>
            <c>Possible Values</c>
            <c>A valid URI value</c>
            <c>Default</c>
            <c>Empty string</c>
          </texttable>


        <t>In addition to the prompt extensions described in <xref
            target="playannouncement.extensions"/>, 
the following additional parameters are under consideration for a later version.
</t>

        <texttable>
          <ttcol align="left" width="15%">Name</ttcol>
          <ttcol align="left" width="85%">Description</ttcol>
          <c>destination</c>
          <c>URI to send recording using HTTP</c>
          <c>mimetype</c>
          <c>mimetype to use for recording (including media and file formats)  </c>
          <c>beep</c>
          <c>indicates whether a platform-specific beep is
    used immediately prior to recording </c>
          <c>noinputprompts</c>
          <c>prompts to play when there is no user
        input</c>
          <c>successprompts</c>
          <c>prompts to play when recording is
        successful</c>
          <c>failureprompts</c>
          <c>prompts to play when no recording 
        has been made after all the iterations tried</c>
          <c>duration</c>
          <c>duration of the recording
    (output)</c>
          <c>mimetype</c>
          <c>mimetype of the recording
    (output)</c>
          <c>iterationcount</c>
          <c>number of iterations
    (output)</c>
          <c>terminationmode</c>
          <c>indication of why recording
        terminated: e.g. dtmf, maxtime reached, externalevent or finalsilence
        detected (output)
</c>
          <c>promptplayedamount</c>
          <c>duration of initial prompts played if
    prompt interrupted (output)</c>
        </texttable>
      
</section>


    <section title="Status Codes">

<t>The following table describes the codes returned in the status output
    parameter for template dialogs.</t>

       <texttable anchor="allstatuscodes" title="status codes
                for all templates dialogs" >
                <ttcol align="left" width="15%">status</ttcol>
                <ttcol align="left" width="85%">description</ttcol>
                <c>0</c>
                <c>dialog terminated externally</c>
                <c>1</c>
                <c>success</c>
                <c>600</c>
                <c>unspecified error</c>
                <c>601</c>
                <c>invalid input parameter</c>
                <c>602</c>
                <c>no prompts defined (only playannouncement) </c>
                <c>603</c>
                <c>maximum iterations reached without valid input (not playannouncement)</c>
              </texttable>

   </section>



    <section title="Type Definitions">


<t>This section defines types referenced in template parameters. </t>

      <section toc="exclude" anchor="defn.boolean" title="Boolean">
        <t>The value space of boolean is the set {true, false}. </t>
      </section>


      <section toc="exclude" anchor="defn.dtmfchar" title="DTMFChar">

        <t>A DTMF character. The value space is the set
            {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, #, *, A, B, C, D}. 
        </t>
      </section>

      <section toc="exclude" anchor="defn.dtmfstring" title="DTMFString">

          <t>A String composed of one or more <xref format="title" target="defn.dtmfchar"/>s. </t>

      </section>



      <section toc="exclude" anchor="defn.nonneginteger" title="Non-Negative Integer">
        <t>The value space of non-negative integer is the infinite
        set {0,1,2,...}. </t>
      </section>

      <section toc="exclude" anchor="defn.posinteger" title="Positive Integer">
        <t>The value space of positive integer is the infinite
        set {1,2,...}. </t>
      </section>



      <section toc="exclude" anchor="defn.string" title="String">
        <t>A string in the character encoding associated with the XML
        element.
        </t>
      </section>


      <section toc="exclude" anchor="defn.timedesignation" title="Time Designation">

        <t>A time designation consists of a non-negative real number
            followed by a time unit identifier. </t>

        <t>The time unit identifiers are: "ms" (milliseconds) and "s"
            (seconds). </t>

        <t>Examples include: "3s", "850ms", "0.7s", ".5s" and "+1.5s". </t>

      </section>


      <section toc="exclude" anchor="defn.uri" title="URI">
        <t>Uniform Resource Indicator as defined in <xref
        target="RFC2396"/>. 
        </t>
      </section>

      <section toc="exclude" anchor="defn.urilist" title="URIList">

          <t>A list of <xref format="title" target="defn.uri"/>s. </t>

      </section>


    </section>


</section>




<section anchor="examples.protocol" title="AS-MS Interaction Examples">

<t>The following example assume a control channel has been established
    as described in the SIP Control Framework <xref target="SIPCF"/>.
    </t>

<t>The XML messages are in angled brackets; the REPORT status is
    in round brackets. Other aspects of the protocol are omitted for
    readability.
</t>

<section title="Starting an IVR dialog">

<t>An IVR dialog is started successfully, and dialogexit notification
    <event> is sent from the MS to the AS when the dialog exits
    normally.  </t>

<figure>
<artwork><![CDATA[

          Application Server (AS)                   Media Server (MS)
             |                                             |
             |       (1) CONTROL: <dialogstart>            |
             |  ---------------------------------------->  |
             |                                             |
             |       (2) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (3) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (4) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (5) REPORT: <response status="200"/>  |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (6) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (7) REPORT:<event name="dialogexit"/> |
             |                   (notify)                  |
             |  <----------------------------------------  |
             |                                             |
             |       (8) 200                               |
             |  ---------------------------------------->  |
             |                                             |
]]></artwork>
</figure>

</section>


<section title="IVR dialog fails to start">

<t>An IVR dialog fails to start due to an unknown template. 
</t>

<figure>
<artwork><![CDATA[

          Application Server (AS)                   Media Server (MS)
             |                                             |
             |       (1) CONTROL: <dialogstart>            |
             |  ---------------------------------------->  |
             |                                             |
             |       (2) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (3) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (4) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (5) REPORT: <response status="409"/>  |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (6) 200                               |
             |  ---------------------------------------->  |
             |                                             |
]]></artwork>
</figure>

</section>


<section title="Preparing and starting an IVR dialog">

<t>An IVR dialog is prepared and started successfully, and then the
    dialog exits normally.  </t>

<figure>
<artwork><![CDATA[

          Application Server (AS)                   Media Server (MS)
             |                                             |
             |       (1) CONTROL: <dialogprepare>          |
             |  ---------------------------------------->  |
             |                                             |
             |       (2) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (3) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (4) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (5) REPORT: <response status="200"/>  |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (6) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (7) CONTROL: <dialogstart>            |
             |  ---------------------------------------->  |
             |                                             |
             |       (8) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (9) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (10) 200                              |
             |  --------------------------------------->   |
             |                                             |
             |       (11) REPORT: <response status="200"/> |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (12) 200                              |
             |  ---------------------------------------->  |
             |                                             |
             |       (13) REPORT:<event name="dialogexit"/>|
             |                   (notify)                  |
             |  <----------------------------------------  |
             |                                             |
             |       (14) 200                              |
             |  ---------------------------------------->  |
             |                                             |
]]></artwork>
</figure>

</section>

<section title="Terminating a dialog immediately">

<t>An IVR dialog is started successfully, and then terminated
    immediately by the AS. No dialog notification <event>s are sent
    back to the AS. </t>

<figure>
<artwork><![CDATA[

          Application Server (AS)                   Media Server (MS)
             |                                             |
             |       (1) CONTROL: <dialogstart>            |
             |  ---------------------------------------->  |
             |                                             |
             |       (2) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (3) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (4) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (5) REPORT: <response status="200"/>  |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (6) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (7) CONTROL: <dialogterminate>        |
             |  ---------------------------------------->  |
             |                                             |
             |       (8) 200: <response status="200"/>     |
             |  <----------------------------------------  |
             |                                             |
]]></artwork>
</figure>

<t>Note that in (8) the response to the <dialogterminate/> request is
    carried on a framework 200 response. 
</t>

</section>

<section title="Terminating a dialog non-immediately">

<t>An IVR dialog is started successfully, and then terminated
    non-immediately by the AS, allowing the MS to send a dialogexit
    notification <event> with information collected during the dialog.
   </t>

<figure>
<artwork><![CDATA[

          Application Server (AS)                   Media Server (MS)
             |                                             |
             |       (1) CONTROL: <dialogstart>            |
             |  ---------------------------------------->  |
             |                                             |
             |       (2) 202                               |
             |  <---------------------------------------   |
             |                                             |
             |       (3) REPORT: (pending)                 |
             |  <----------------------------------------  |
             |                                             |
             |       (4) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (5) REPORT: <response status="200"/>  |
             |                   (terminate)               |
             |  <----------------------------------------  |
             |                                             |
             |       (6) 200                               |
             |  ---------------------------------------->  |
             |                                             |
             |       (7) CONTROL: <dialogterminate>        |
             |  ---------------------------------------->  |
             |                                             |
             |       (8) 200: <response status="200"/>     |
             |  <----------------------------------------  |
             |                                             |
             |       (9) REPORT:<event name="dialogexit"/> |
             |                   (notify)                  |
             |  <----------------------------------------  |
             |                                             |
             |       (10) 200                              |
             |  ---------------------------------------->  |
             |                                             |
]]></artwork>
</figure>

<t>Note that in (8) the response to the <dialogterminate/> request is
    carried on a framework 200 response. 
</t>

</section>



</section>


<section anchor="examples.templates" title="Template Dialog Examples">

<t>The following examples show how playannouncement, promptandcollect
    and promptandrecord template dialogs are used with
    <dialogprepare>, <dialogstart> and <event>
    elements. </t>

    <t>The examples do not specify all messages between the AS and MS. </t>

<section title="playannouncement">

        <t>This example prepares an announcement composed of two
    prompts. </t>

<figure>
<artwork><![CDATA[
  
<dialogprepare src="playannouncement">
    <data>
       <item name="prompts" 
             value="http://www.example.com/media/Number_09.wav 
                    http://www.example.com/media/Number_11.wav"/>
       <item name="iterations" value="2"/>
    </data>
</dialogprepare>
    
]]></artwork>
</figure>

<t>If the dialog is prepared successfully, a dialogprepared message is
    returned:</t>

<figure>
<artwork><![CDATA[
  
<response status="200" dialogid="vxi78"/>
    
]]></artwork>
</figure>

<t>The prepared dialog is then started on a conference playing the
    prompts twice:</t>

<figure>
<artwork><![CDATA[
  
<dialogstart prepareddialogid="vxi78" conf-id="conference11"/>
    
]]></artwork>
</figure>



<t>In the case of a successful dialog, the output is provided in
    <event>; for example </t>

        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi78">
    <data>
       <item name="status" value="1"/>
    </data>
</event>
    
]]></artwork>
        </figure>

<t>In this example, the dialog is started on a sip dialog connection,
   but no <data> is specified:</t>

        <figure>
          <artwork><![CDATA[
  
<dialogstart src="playannouncement" 
             connection-id="7HDY839~HJKSkyHS~HUwkuh7ns"/>
    
]]></artwork>
        </figure>
      

  <t>and an error message is returned:</t>

        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi79">
    <data>
       <item name="status" value="602"/>
       <item name="reason" value="prompts not defined"/>
    </data>
</event>
    
]]></artwork>
        </figure>
</section>

<section title="promptandcollect">
        <t>This example plays no prompts and just waits for input from the
    user: </t>
        <figure>
          <artwork><![CDATA[
  
<dialogstart src="promptandcollect" 
             connection-id="7HDY839~HJKSkyHS~HUwkuh7ns"/>
    
]]></artwork>
        </figure>
        <t>If the dialog is successful, then "dialogexit" 
          <event> contains the
            dtmf collected in its result parameter: </t>
        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi80">
    <data>
       <item name="status" value="1"/>
       <item name="result" value="12345"/>
    </data>
</event>
    
]]></artwork>
        </figure>
        <t>In this example, a prompt is played and then we wait for 3 hours for
    a two digit sequence:</t>
        <figure>
          <artwork><![CDATA[
  
<dialogstart src="promptandcollect" 
             connection-id="7HDY839~HJKSkyHS~HUwkuh7ns">
 <data>
  <item name="prompts" value="http://www.example.com/prompt1.wav"/>
  <item name="timeout" value="1080s"/>
  <item name="maxdigits" value="2"/>              
  <item name="iterations" value="1"/>
 </data>
</dialogstart>
    
]]></artwork>
        </figure>
        <t>If no user input is collected within 3 hours, then following would
    be returned:</t>
        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi81">
    <data>
       <item name="status" value="603"/>
    </data>
</event>
    
]]></artwork>
        </figure>
        <t>And finally in this example, one of the input parameters is
    invalid: </t>
        <figure>
          <artwork><![CDATA[
  
<dialogstart src="promptandcollect" 
             connection-id="7HDY839~HJKSkyHS~HUwkuh7ns">
 <data>
   <item name="prompts" value="http://www.example.com/prompt1.wav"/>
   <item name="iterations" value="two"/>
   <item name="cleardigitbuffer" value="true"/>
   <item name="bargein" value="true"/>
   <item name="timeout" value="4s"/>
   <item name="interdigittimeout" value="2s"/>
   <item name="termtimeout" value="0s"/>
   <item name="maxdigits" value="2"/>              
 </data>
</dialogstart>
    
]]></artwork>
        </figure>
        <t>The error is reported in a dialogexit <event>:</t>
        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi82">
    <data>
       <item name="status" value="601"/>
       <item name="reason" value="iterations invalid: two"/>
    </data>
</event>
    
]]></artwork>
        </figure>
 </section>

<section title="promptandrecord">

        <t>In this example, the user is prompted, then their input is
    recorded for a maximum of 30 seconds.</t>


        <figure>
          <artwork><![CDATA[
  
<dialogstart src="promptandrecord" 
             connection-id="7HDY839~HJKSkyHS~HUwkuh7ns">
    <data>
       <item name="prompts"
             value="http://www.example.com/media/sayname.wav 
                    http://www.example.com/media/beep.wav"/>
       <item name="dtmfterm" value="false"/>
       <item name="maxtime" value="30s"/>
    </data>
</dialogstart>
    
]]></artwork>
        </figure>

<t>If successful, the following is returned in a dialogexit
<event>:</t>

        <figure>
          <artwork><![CDATA[
  
<event name="dialogexit" dialogid="vxi83">
 <data>
  <item name="status" value="1"/>
  <item name="result" value="http://www.example.com/recording1.wav"/>
 </data>
</event>
    
]]></artwork>
        </figure>
 </section>


</section>



<section anchor="schema" title="Formal Syntax">

    <t>[Editors Note: A later version of the XML schema will provide
    more constraints as expressed in the textual definitions; for
    example, single occurrence of <data> elements, co-occurence
    on attributes, etc.]</t>

<figure>
<artwork><![CDATA[

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="urn:ietf:params:xml:ns:msc-ivr-basic" 
xmlns:fw="urn:ietf:params:xml:ns:control:framework-attributes"
elementFormDefault="qualified" 
xmlns="urn:ietf:params:xml:ns:msc-ivr-basic" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

 <xsd:annotation>
  <xsd:documentation>Basic IVR 1.0 schema (20061019)</xsd:documentation>
 </xsd:annotation>

   <xsd:import 
    namespace="urn:ietf:params:xml:ns:control:framework-attributes" 
   schemaLocation="framework.xsd"/>

 <xsd:element name="dialogprepare">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="data"/>
    <xsd:element ref="subscribe"/>
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="src" type="URI.datatype" use="required"/>
   <xsd:attribute name="dialogid" type="dialogid.datatype"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>

 </xsd:element>

 <xsd:element name="dialogstart">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="stream"/>
    <xsd:element ref="data"/>
    <xsd:element ref="subscribe"/>
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="src" type="URI.datatype"/>
   <xsd:attribute name="dialogid" type="dialogid.datatype"/>
   <xsd:attribute name="prepareddialogid" type="dialogid.datatype"/>
   <xsd:attributeGroup ref="fw:framework-attributes"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="dialogterminate">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="dialogid" type="dialogid.datatype" 
       use="required"/>
   <xsd:attribute name="immediate" type="boolean.datatype" 
       default="false"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>


 <xsd:element name="response">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="status" type="status.datatype" 
       use="required"/>
   <xsd:attribute name="reason" type="xsd:string"/>
   <xsd:attribute name="dialogid" type="dialogid.datatype"/>
   <xsd:attributeGroup ref="fw:framework-attributes"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>


 <xsd:element name="event">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="data"/>
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="name" type="eventname.datatype" 
       use="required"/>
   <xsd:attribute name="dialogid" type="dialogid.datatype" 
       use="required"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>



 <!-- DATATYPES -->

    <xsd:simpleType name="URI.datatype">
        <xsd:restriction base="xsd:anyURI"/>
    </xsd:simpleType>

    <xsd:simpleType name="dialogid.datatype">
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>

 <xsd:simpleType name="boolean.datatype">
  <xsd:restriction base="xsd:NMTOKEN">
   <xsd:enumeration value="true"/>
   <xsd:enumeration value="false"/>
  </xsd:restriction>
 </xsd:simpleType>


 <xsd:simpleType name="eventname.datatype">
  <xsd:restriction base="xsd:NMTOKEN">
   <xsd:pattern value="[a-zA-Z0-9\.]+"/>
  </xsd:restriction>
 </xsd:simpleType>

 <xsd:simpleType name="status.datatype">
  <xsd:restriction base="xsd:NMTOKEN">
   <xsd:pattern value="[0-9][0-9][0-9]"/>
  </xsd:restriction>
 </xsd:simpleType>

 <xsd:simpleType name="media.datatype">
    <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>

 <xsd:simpleType name="label.datatype">
    <xsd:restriction base="xsd:string"/>
 </xsd:simpleType>

 <xsd:simpleType name="direction.datatype">
  <xsd:restriction base="xsd:NMTOKEN">
   <xsd:enumeration value="sendrecv"/>
   <xsd:enumeration value="sendonly"/>
   <xsd:enumeration value="recvonly"/>
  </xsd:restriction>
 </xsd:simpleType>


 <!-- SHARED ELEMENTS -->

 <xsd:element name="data">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="item"/>
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="item">
  <xsd:complexType>
   <xsd:attribute name="name" type="xsd:string" 
       use="required"/>
   <xsd:attribute name="value" type="xsd:string" 
       use="required"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>


 <xsd:element name="stream">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:any namespace="##other" processContents="strict"/>
   </xsd:choice>
   <xsd:attribute name="media" type="media.datatype" 
       use="required"/>
   <xsd:attribute name="label" type="label.datatype"/>
   <xsd:attribute name="direction" type="direction.datatype"
                  default="sendrecv" />
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>


 <xsd:element name="subscribe">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="unbounded">
    <xsd:element ref="notify"/>
   </xsd:choice>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>

 <xsd:element name="notify">
  <xsd:complexType>
   <xsd:choice minOccurs="0" maxOccurs="1">
    <xsd:element ref="data"/>
   </xsd:choice>
   <xsd:attribute name="name" type="xsd:string" use="required"/>
   <xsd:anyAttribute namespace="##other" processContents="strict"/>
  </xsd:complexType>
 </xsd:element>

</xsd:schema>


]]></artwork>
</figure>

</section>

<!-- Formal Syntax: XML Schema  -->
		

<section title="Security Considerations">
			
    <t>Security Considerations to be included in later versions of this document.</t>
		
</section>

		<!-- Security Consideration -->
		

<section anchor="sec:IANA_Considerations" title="IANA Considerations">

<t>This document registers a new SIP Control Framework Package and a new
XML namespace.</t>

<section anchor="sec:Control_Package_Reg" title="Control Package Registration">

<t>Control Package name: msc-ivr-basic/1.0</t>
		     
</section>


<section anchor="sec:URN_Reg" title="URN Sub-Namespace Registration">

 <t>XML namespace: urn:ietf:params:xml:ns:msc-ivr-basic</t>	

</section>

</section>


<section title="Change Summary">



<t> The following are the major changes between the -02 of the draft and the
-01 version.

<list style="symbols">

    <t>added version 1.0 to package name </t>
    <t>separate section for element definitions</t>
    <t>dialogterminate treated as request rather than notification</t>
    <t>simplified responses: single element <response> </t>
    <t>removed response elements: <dialogprepared>, <dialogstarted>,
       <errordialognotprepared>,  <errordialognotstarted> </t>
    <t>simplified event notifications to single <event> element
    carried in a REPORT  </t>
    <t><dialogexit> element replaced with <event name="dialogexit"></t>
    <t>removed <dialoguser> element </t>
    <t>added <stream> element as child of <dialogstart></t>
    <t>removed 'type' attribute from <dialogprepare> and <dialogstart></t>
    <t>added dialogid attribute to <dialogprepare> and
    <dialogstart></t>
    <t>removed template "Sample Implementation" section</t>

    <t>renamed <namelist> to <data> </t>

    <t>re-organized so that template details after general package
        framework and element description. </t>
</list>

</t>

<t>
The following are the primary changes between the -01 of the draft and
the -00 version. 

<list style="symbols">

    <t>Removed requirement for VoiceXML dialog support</t>
    <t>Added requirement for template dialog support</t>

</list>

</t>



</section>


<section title="Acknowledgments">

<t> The authors would like to thank Adnan Saleem of Convedia and Gene
   Shtirmer of Intel for useful review of this work.  
</t>

</section>

	</middle>

	<back>
		
		<references title="Normative References">
      		&rfc2119;
    
		</references>
		
		<references title="Informative References">
		&rfc2616;
		&rfc3261;
		&rfc3262;
		&rfc3263;
		&rfc3264;
        &rfc2396;
        &rfc4240;
        &rfc2897;
        &rfc4574;

      <reference anchor="H.248.1">
        <front>
          <title>Gateway control protocol: Version 3</title>
          <author>
            <organization/>
          </author>
        </front>
        <seriesInfo name="ITU-T Recommendation" 
                    value="H.248.1"/>
      </reference>

      <reference anchor="H.248.9">
        <front>
          <title>Gateway control protocol: Advanced media server packages</title>
          <author>
            <organization/>
          </author>
        </front>
        <seriesInfo name="ITU-T Recommendation" 
                    value="H.248.9"/>
      </reference>

      <reference anchor="KPML">
        <front>
          <title>A Session Initiation Protocol (SIP) Event Package for  Key Press
                            Stimulus (KPML)</title>
		<author initials="E." surname="Burger">
            <organization>Brooktrout Technology, Inc.</organization>
          </author>
		<author initials="M." surname="Dolly">
            <organization>AT&T Labs</organization>
          </author>
        <date month="July" year="2006" />
        </front>
        <seriesInfo name="IETF Internet-Draft" 
                    value="draft-ietf-sipping-kpml-08"/>
      </reference>

      <reference anchor="MSCML">
        <front>
          <title> Media Server Control Markup Language (MSCML) and Protocol</title>
		<author initials="J." surname="Van Dyke">
            <organization>Brooktrout Technology, Inc.</organization>
          </author>          
		<author initials="E." surname="Burger">
            <organization>Brooktrout Technology, Inc.</organization>
          </author>
		<author initials="A." surname="Spitzer">
            <organization>Brooktrout Technology, Inc.</organization>
          </author>
        <date month="June" year="2006" />
        </front>
        <seriesInfo name="IETF Internet-Draft" 
                    value="draft-vandyke-mscml-09"/>
      </reference>

      <reference anchor="SRGS">
        <front>
          <title>Speech Recognition Grammar Specification Version
        1.0</title>
		<author initials="A." surname="Hunt">
			<organization>ScanSoft</organization>
		</author>
		<author initials="S." surname="McGlashan">
			<organization>Hewlett-Packard</organization>
		</author>
        <date month="March" year="2004" />
        </front>
        <seriesInfo name="W3C" value="Recommendation" />
      </reference>

   <reference anchor="SIPCF">
        <front>
            <title>A Control Framework for the Session Initiation
        Protocol (SIP) </title>

		<author initials="C." surname="Boulton">
			<organization>Ubiquity Software Corporation</organization>
		</author>
		<author initials="T." surname="Melanchuk">
			<organization>BlankSpace</organization>
		</author>
		<author initials="S." surname="McGlashan">
			<organization>Hewlett-Packard</organization>
		</author>
		<author initials="A." surname="Shiratzky">
			<organization>Radvision</organization>
		</author>
 
        <date month="October" year="2006" />
        </front>
        <seriesInfo name="IETF Internet-Draft" value="draft-boulton-sip-control-framework-04" />
    </reference>


   <reference anchor="CCXML10">
        <front>
            <title>Voice Browser Call Control: CCXML Version 1.0</title>
            <author initials="R J" surname="Auburn">
        <organization> </organization>
        </author>
            <date month="June" year="2005" />
        </front>
        <seriesInfo name="W3C" value="Working Draft (work in progress)" />
    </reference>


   <reference anchor="MSML">
        <front>
            <title>Media Session Markup Language (MSML)</title>

        <author initials='A' surname="Saleem">
            <organization>Convedia</organization>
        </author>

        <author initials='G' surname="Sharratt">
            <organization>Convedia</organization>
        </author>

        <date month="June" year="2006" />
        </front>
        <seriesInfo name="IETF Internet-Draft" 
            value="draft-saleem-msml-01" />
    </reference>

   <reference anchor="MSCP">
        <front>
            <title>Media Server Control Protocol (MSCP)</title>

        <author initials='S.' surname="McGlashan">
            <organization>Hewlett-Packard</organization>
        </author>

        <author initials='R. J.' surname="Auburn">
            <organization>Voxeo</organization>
        </author>

        <author initials='D.' surname="Burke">
            <organization>Voxpilot</organization>
        </author>

        <author initials='E.' surname="Candell">
            <organization>Comverse</organization>
        </author>

        <author initials='R.' surname="Surapaneni">
            <organization>Tellme Networks</organization>
        </author>

        <date month="July" year="2006" />
        </front>

        <seriesInfo name="IETF Internet-Draft"
        value="draft-mcglashan-mscp-02" />
    </reference>

   <reference anchor="XML">
        <front>
            <title>Extensible Markup Language (XML) 1.0 (Third Edition) </title>
            <author initials="T" surname="Bray">
        <organization> </organization>
        </author>
            <author initials="J" surname="Paoli">
        <organization> </organization>
        </author>
            <author initials="C M" surname="Sperberg-McQueen">
        <organization> </organization>
        </author>
            <author initials="E" surname="Maler">
        <organization> </organization>
        </author>
            <author initials="F" surname="Yergeau">
        <organization> </organization>
        </author>
            <date month="February" year="2004" />
        </front>
        <seriesInfo name="W3C" value="Recommendation" />
    </reference>



	
 		</references>
	</back>
</rfc>

PAFTECH AB 2003-20262026-04-24 02:58:33