An input item that collects media input and stores the recording in the form item variable.
<record
beep = "{true | false}"
cond = "CDATA"
dtmfterm = {true | false}
expr = "CDATA"
finalsilence = "CDATA"
maxtime = "CDATA"
modal = "{true | false}"
name = identifier
type = "CDATA"
vision:bgsrc = "CDATA"
vision:bgexpr = "CDATA"
/>
Attribute |
Data Type |
Required? |
Default |
Description |
beep |
boolean |
no |
no |
Indicates whether to emit a tone prior to recording. Valid values:
|
cond |
CDATA |
no |
NA |
Specifies a Boolean expression that must evaluate to ECMAScript true for the record to execute. |
dtmfterm |
boolean |
no |
yes |
Indicates whether to terminate the recording with a DTMF key press. Valid values:
Note: Associated tones, if any, are not part of the recording. |
expr |
CDATA |
no |
NA |
Initial value for the form item variable. |
finalsilence |
integer |
no |
NA |
Length of the silence that indicates the end of the recording, in seconds (s) or milliseconds (ms). |
maxtime |
CDATA |
no |
NA |
Maximum length of the recording, in seconds (s) or milliseconds (ms). |
modal |
boolean |
no |
NA |
Not currently supported. |
name |
identifier |
no |
NA |
Name of the input item variable that holds the recording. |
type |
CDATA |
no |
NA |
Media format of the resulting recording. This can be one of the audio file formats specified by the VoiceXML specification, or in the case of a video call, can be a 3GP container format. Valid values:
|
<audio>, <enumerate>, <help>, <catch>, <error>, <filled>, <grammar>, <noinput>, <nomatch>, <prompt>, <property>, <value>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<form>
<record name="msg" beep="true" maxtime="10s" finalsilence="4000ms"
dtmfterm="true" type="audio/x-wav">
<prompt timeout="5s">
Record a message after the beep.
</prompt>
<noinput>
I didn't hear anything, please try again.
</noinput>
</record>
<field name="confirm">
<grammar type="application/srgs+xml" src="/grammars/boolean.grxml"/>
<prompt>
Your message is <audio expr="msg"/>.
</prompt>
<prompt>
To keep it, say yes. To discard it, say no.
</prompt>
<filled>
<if cond="confirm">
<submit next="save_message.pl" enctype="multipart/form-data"
method="post" namelist="msg"/>
</if>
<clear/>
</filled>
</field>
</form>
</vxml>