CCXML 1.0-W3C Development GuideHome  |  Frameset Home


<dialogstart>  element

The <dialogstart> element is used to launch a VXML dialog and associate it with a specific call leg. Said dialog executes on an entirely separate thread of execution from the invoking CCXML document, leaving the CCXML script in control to handle incoming events.

If, for any reason, the dialog cannot be started, an 'error.dialog.notstarted' error event is thrown. When the dialog completes, a 'dialog.exit' event is returned to the event queue of the invoking CCXML document. Note that telephony variables, (ANI, DNIS) will be propagated from the call leg to the dialog application. Note that whenever the full string passed down to through the <dialogstart> exceeds 500 characters, the method will inherently be switched to POST. 



usage
<dialogstart conferenceid="(ECMAScript Expression)" connectionid="(ECMAScript Expression)" dialogid="(variable name)" enctype="(ECMAScript Expression)" hints="(ECMAScript Expression)" maxage="(ECMAScript Expression)" maxstale="(ECMAScript Expression)" mediadirection="(both/dialogtransmit/dialogreceive)" method="(GET|POST)" namelist="STRING" parameters="(variable name)" prepareddialogid="(ECMAScript Expression)" src="(ECMAScript Expression)" type="(ECMAScript Expression)">


attributes
conferenceidData Type: (ECMAScript Expression)Default: Optional
Unsupported Attribute
The conferenceid attribute is used to define an ECMAScript identifier of a particular conference bridge. If neither the connectionid or conferenceid is defined, and the dialog had not previously been prepared, the interpreter will deafult to the 'id' indicated in the current event that is being processed. Note that if connectionid and conferenceid are both specified, an error.fetch event must be thrown.
connectionidData Type: (ECMAScript Expression)Default: Optional
The connectionid attribute is used within the context of the <dialogprepare> element as an ECMAScript expression that returns the identifier of a connection. It is required that the connection denoted in this attribute be associated with the dialog being prepared. If this value, and the conferenceid value is left unspecified, then the CCXML interpreter will use the id value of the current event being processed. Also note that either connectionid or confereceid may be specified, but not both.

dialogidData Type: (variable name)Default: none - attribute is optional
The dialogid attribute specifies the value of the session name used to identify the launched dialog. This value is used to reference dialog events, and is used as an identifier when the <dialogterminate> element is invoked.

enctypeData Type: (ECMAScript Expression)Default: application/x-www-form-urlencoded
enctype specifies an ECMAScript string expression that denotes the media encoding type of the submitted document, (when the POST method is used). The only allowable value of this attribute is 'application/x-www-form-urlencoded', which specifies that the indicates that the variables in the namelist attribute must be url-encoded.
hintsData Type: (ECMAScript Expression)Default: Optional
The hints attribute can be used to specify information used by the platform to configure the event processor. The value of this attribute should equate to an object that contains an array property of "headers"; for instance:


<script>
  var Hints = new Object();
  Hints.headers = new Object();
  Hints.headers['x-mySipHeader'] = 'hello world';
</script>


Note that 'hints.headers' stores what headers to add to the sip request, and that only headers starting with an 'x-' prefix are sent.
maxageData Type: (ECMAScript Expression)Default: Optional
The maxage and maxstale attributes specify the maximum acceptable staleness, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes.
maxstaleData Type: (ECMAScript Expression)Default: Optional
The maxage and maxstale attributes specify the maximum acceptable staleness, in seconds, of the resource in question. However, it is strongly advised not to rely on this attribute for cache-control; caching is always best controlled by the hosting server's response headers. If no headers are specified, then no cache control will be present, regardless of the value set for the maxage and maxstale attributes.
mediadirectionData Type: (both/dialogtransmit/dialogreceive)Default: Optional (both)
Unsupported Attribute

The mediadirection attribute specifies the media flow direction between the dialog and connection, (or conference)
  • bothSpecifies a full duplex connection where the media flows in both directions.

  • dialogtransmit: The dialog transmits media to the Connection or Conference but does not receive any media streams.

  • dialogreceive:The dialog receives media from the Connection or Conference but does not transmit any media streams.

methodData Type: (GET|POST)Default: Optional (GET)
The method attribute specifies the HTTP method to use when sending the request. If unspecified, then the value of ‘GET’, (default) is assumed, unless the submission of multipart/form-data is encountered, in which case the implied method will be ‘POST’.
namelistData Type: STRINGDefault: none - attribute is optional
This attribute indicates the space-separated list of variable names to be appended to the dialog URL as parameters. The variables will then be available as a variable/value pair in the resultant URI querystring that is sent to the server.
parametersData Type: (variable name)Default: none - attribute is optional
The parameters attribute specifies a listing of whitespace delimited CCXML variable names which will be sent to the dialog target as a listing of variable/value pairs. Note that these values are formed by converting the referenced ECMAScript variable to string form.
prepareddialogidData Type: (ECMAScript Expression)Default: Optional
The prepredialogid attribute is used to specify an ECMAScript expression that evaluates to the dialog identifier that has been readied by way of the <dialogprepare> element. In the event that the identifier refers to an invalid dialog, or one that has already executed, then an error.dialogwrongstate event will be thrown. Also be aware that this attribute must not be specified in conjunction with the src, type or namelist attributes.
srcData Type: (ECMAScript Expression)Default: none - attribute is required
The src attribute indicates the URL of the VoiceXML dialog to be started. Also note that with the Voxeo dialog extensions, this can also be used to indicate playable audio files or dtmf tones to be output. In addition, this can also hold the value of a TTS string, and/or valid dtmf termdigit entries that can be accepted from the caller. Also allowed is a URI address specifying where a recorded audio stream is to be sent. See the 'Appendix D: Dialog Extensions' section for further details of this usage.
typeData Type: (ECMAScript Expression)Default: application/voicexml+xml
Specifies the MIME type of the requested resource.  This value is used to determine and initiate the appropriate dialog system.

Standard Values:
  • application/voicexml+xml: Requests a VoiceXML interpreter instance.
  • audio/wav: Requests a dialog system to play a simple audio prompt.
Additional Voxeo-specific Extension Values:
(see 'Appendix D' for additional details)
  • application/x-texttospeech: Requests a dialog system to render a Text-To-Speech (TTS) prompt.
  • application/x-recordaudio: Requests a dialog system to execute a simple audio recording dialog.
  • application/x-fetchdigits: Requests a dialog system to execute a simple dialog to capture DTMF key-presses.
  • application/x-senddtmf: Requests a dialog system to render DTMF tones.

NOTE: The type attribute should not be used in conjunction with the prepareddialogid attribute.



parents
none


children
none


code samples
<1.0 dialogstart - src-type> sample
<ccxml version="1.0">

  <var name="initState" expr="'state_1'"/>
  <var name="MyCallID"/>

  <eventprocessor statevariable="initState">

    <transition event="connection.alerting" state="state_1">
      <assign name="MyCallID" expr="event$.connectionid"/>
      <send name="'MyEvent'" target="session.id"/> 
    </transition>

    <transition event="MyEvent">
        <accept connectionid="MyCallID"/>     
    </transition>

    <transition event="connection.connected" state="state_1">
      <log expr="'***** CALL WAS ANSWERED *****'"/>
      <dialogstart src="'dialog.vxml'" type="'application/voicexml+xml'"/>
    </transition>
   

    <transition event="error.dialog.notstarted" state="state_1">
        <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + event$.name"/>
    </transition>


    <transition event="dialog.exit">
      <log expr="'***** CALL EXITING *****'"/>
      <exit/>
    </transition>

  </eventprocessor>
</ccxml>

<:dialog.vxml>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">

  <form id="F1">
    <block>
    <prompt>
      Welcome to my voice X M L dialog.
      Goodbye
    </prompt>
    </block>
  </form>
</vxml>



additional links
W3C Specification


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site