CCXML 1.0 Development Guide Home  |  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 dialogid="(variable name)" enctype="(ECMAScript Expression)" maxage="CDATA" maxstale="CDATA" mediadirection="(both/dialogtransmit/dialogreceive)" method="(GET|POST)" namelist="STRING" prepareddialogid="(ECMAScript Expression)" src="(ECMAScript Expression)">


attributes
dialogid Data Type: (variable name) Default: none - attribute is required
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.

enctype Data 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.
maxage Data Type: CDATA 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.
maxstale Data Type: CDATA 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.
mediadirection Data 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.

method Data 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’.
namelist Data Type: STRING Default: 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.
prepareddialogid Data 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.
src Data 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.



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" name="evt" state="state_1">
      <assign name="MyCallID" expr="evt.connectionid"/>
      <send data="'MyEvent'" target="session.id"/> 
    </transition>

    <transition event="MyEvent" name="evt">
        <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'" name="evt" state="state_1">
        <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + evt.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



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