CCXML 1.0 Development Guide Home  |  Frameset Home


<dialogprepare>  element

The <dialogprepare> element is used to prepare a VoiceXML dialog, or audio resource for execution via the <dialogstart> element. While the usage of this element as a precursor to a dialog exection is entirely optional, best practices dictate that this is included in CCXML front-end applications that utilize VoiceXML content for finer-grained control. Of course, the dialog will execute in a thread that is entirely seperate execution thread, and will not block the execution of CCXML events that occur during the session.

When a dialog has been successfully readied for execution, a dialog.prepared event is thrown to the CCXML application. In the event that the dialog cannot be prepared for any reason, an error.dialog.notprepared event is sent to the CCXML session.

Be aware that if the prepareddialogid attribute is specified and a conferenceid attribute was specified on the prior <dialogprepare> element, specifying a different conferenceid on the <dialogstart> element will incur an error.dialog.notstarted event being thrown to the CCXML session.



usage
<dialogprepare conferenceid="(ECMAScript Expression)" dialogid="(variable name)" enctype="(ECMAScript Expression)" maxage="CDATA" maxstale="CDATA" mediadirection="(both/dialogtransmit/dialogreceive)" method="(GET|POST)" namelist="STRING" src="(ECMAScript Expression)" type="(application/voicexml+xml|audio/wav)">


attributes
conferenceid Data 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.
dialogid Data Type: (variable name) Default: Optional
The dialogid attribute is used to reference a predefined value that equates to the dialog identifier value for the dialog to be launched.
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
The namelist attribute denotes the space-separated list of variable names to be sent along with the fetch. The variables will then be available as a variable/value pair in the resultant URI querystring that is sent to the server.
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.
type Data Type: (application/voicexml+xml|audio/wav) Default: Optional
The type attribute specifies the MIME type of the resource to be prepared, and inherently invokes the appropriate dialog manager environment which is to be used to execute the resource. Allowable values are:
  • application/voicexml+xml: This MIME type would request a VoiceXML interpreter instance.

  • audio/wav:This MIME type would request a dialog manager that merely plays wave files.



parents
none


children
none


code samples
none


additional links
none


  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