<nuance:recordasync-stop>
Indicates to stop asynchronous recording. See <nuance:recordasync-start>.
Attributes
This section describes the attributes you can set for this element.
|
Name |
Data type |
Default |
|---|---|---|
|
CDATA |
none, required |
name
The name attribute specifies the name of the variable to hold the asynchronous recording. It uses a pre-defined object type for the recording. The object, which could be a file or buffer, for example, is only created if the size of the recording is greater than 0 bytes. The type of object is based on the type of recording created:
- URL file—Creates a file. The behavior is the same as the name attribute for the <record> element. The object can be played back using the <prompt> element and submitted to a web server using the <submit> or <data> elements.
- Transfer encoded—No file is created. The object cannot be played back. It can only be submitted to a web server using the <submit> or <data> elements. See the transferencoding attribute.
If the size of the recording is 0, the variable is undefined. You can check the variable for details about the size.
Shadow variables
The following table lists the shadow variables, which are set after the recording has completed. The variables apply to both URL and transfer encoded recordings, except where noted.
| Shadow variable | Description |
|---|---|
| name$.duration |
The duration of the recoding. Note: This variable does not apply to transfer encoded recordings. |
| name$.maxtime | A Boolean value: true or false. Indicates whether the recording terminated due to reaching the maximum record time specified for the maxtime attribute (true) or not (false). |
| name$.size | The size of the recording, in bytes. |
| name$.status |
Provides details about how the recording ended. Possible values are:
Note: Executable elements do not implement form input handlers as children, e.g. <nomatch>, <noinput>, <filled>. |
Children
None
Parents
Sample code
This sample code shows an application implementation. It specifies the following:
- Start the asynchronous recording, using transfer encoding.
- Enter a form field input that consumes ~4 seconds of the recording.
- Exit the form input.
- Stop the recording and, if the size is greater than 0 bytes, send the transfer-encoded data to a web server.
<vxml>
<form id="f1">
<block>
<nuance:recordasync-start timeout="60s" maxtime="60s" transferencoding="8bit"/>
<goto next="#f2"/>
</block>
</form>
<form id="f2">
<field name="yesno">
<grammar src="builtin:grammar/boolean"/>
<prompt bargein="false" timeout="1s">
Play a short prompt, no more than 4 seconds, to generate a small recording.
</prompt>
<catch event="noinput nomatch filled">
<goto next="#f3"/>
</catch>
</field>
</form>
<form id="f3">
<block>
<nuance:recordasync-stop name="tap"/>
<if cond="tap$.size > 0">
<data name="tapanalysis" namelist="tap" src="analyze_tap.pl"
method="post" enctype="multipart/form-data"/>
<else/>
<prompt>Cannot post recording, since there is no recorded data.</prompt>
</if>
</block>
</form>
</vxml>