| VoiceXML 2.1 Development Guide | Home | Frameset Home |
<data> element.| fetchaudio | Data Type: CDATA | Default: Optional |
| The fetchaudio attribute specifies the URI of the .wav file to play to the caller in the event of an extended document fetch. Essentially, while the fetch is being made, it allows the developer to play some filler music to the caller rather than presenting only silence. | ||
| fetchtimeout | Data Type: CDATA | Default: 5s |
| The ‘fetchtimeout’ attribute is used to indicate how long, (in seconds or milliseconds), the interpreter should attempt to fetch the content before throwing an error.badfetch exception. See Appendix C for further information. | ||
| maxage | Data Type: CDATA | Default: Optional |
| The maxage and maxstale attributes replace the VXML 1.0 caching attribute for compliance to the w3c vxml 2.0 specification. The value for this attribute specifies the maximum acceptable age, 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 replace the VXML 1.0 caching attribute for compliance to the w3c vxml 2.0 specification. The value for this attribute specifies 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. | ||
| 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: NMTOKEN | Default: Optional |
| The namelist attribute specifies a space-separated list of variables to send to the URI indicated by the uri or uriexprattributes. Note that if the namelist attribute is left unspecified, then all input-item variables will be submitted to the destination URI. | ||
| uri | Data Type: CDATA | Default: Required |
| The uri attribute defines the target page of the send element. Note that this target page must return valid ECMAScript, else an error will be thrown to the browser. | ||
| uriexpr | Data Type: CDATA | Default: Optional |
| The uriexpr allows the developer to specify a dynamic value as the target for a send operation. Note that this target page must return a valid ECMAScript value, else an error will be thrown to the browser | ||
| <?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0"> <catch event="sendMe"> <send uri="MottyCatcher.cfm" namelist="F_1" method="get" fetchaudio="Filler.wav" fetchtimeout="15s"/> </catch> <var name="F_1" expr="'some value'"/> <form id="F1"> <block> <throw event="sendMe"/> </block> </form> </vxml> |
|
<cfheader name="Cache-Control" value= "no-cache"> <cfheader name="Expires" value="#Now()#"> <cfoutput> <!--note that the below ECMA statement is 100% necessary for each variable you need to output: var [variablename] = '[variablevalue]'; --> Var = '#url.F_1#' <cffile action="APPEND" file="c:\MyDir\MyFile.txt" output="#url.F_1#"/> </cfoutput> |
| ANNOTATIONS: EXISTING POSTS |
MattHenry
|
|
| From Sir Mho Salim comes a snippet of code representing a sample 'target page' that satisfies a send tag for a Java servlet:
/* Put this code in your servlet catcher page, either as-is in a jsp file, or as part of a servlet's doGet/doPost methods (servlet code will obviously need to setup the 'request' and 'out' objects...). If your namelist looks like: namelist="country state city" This code might produce the following output: country='USA'; state='FL'; city='Orlando'; */ java.util.Enumeration en = request.getParameterNames(); while (en.hasMoreElements()) { String paramName = (String)en.nextElement(); out.println(paramName + "='" + request.getParameter(paramName) + "';"); } |
|
Marquet
|
|
| I have a few problems sending data from my .vxml file to a jsp archive. My platform doesn't accept the <send> tag, and if I use the <submit> tag, the application goes to another URI (the one that is in the submit tag), and I want to rest in the previous document. Is there any option to solve this problem?
Thank you for your help. Marc |
|
MattHenry
|
|
|
Hi Marc, I think what you will want to use is the <data> tag, which is w3c compliant, (as opposed to the <send> tag, which is Nuance-specific, and no longer supported). Check the below link for an example of using this to blindly shove off data to an external source, without actually transitioning your callers to a new dialog: http://www.vxml.org/t_17mot.htm ~Matt |
|
feel012
|
|
| Hi~~
I have a question.. Because I want to send packet to another server using socket communication.. I want to execute dll function in vxml. Is it related to send element?? if not... what element is related to this problem?? Is it possible?? If then, I need a sample code... Please help... |
|
voxeoJeffK
|
|
| Hi feel012,
Low level socket communication is not encompassed in the VoiceXML spec. That would really have to be handled server-side. You would do a <submit> to a server-side script that would then handle dll execution. We have a tutorial with sample code on communicating with server-side languages here: http://docs.voxeo.com/voicexml/2.0/qs_vars.htm hope that helps, Jeff Kustermann Voxeo Support |
|
adarsh
|
|
| Hi,
i need to know how to use HTML in VXML. pls provide a small example. and also can we use this code "<input type="file" name="file" id="file" />" inside VXML , if yes how ? this is the code to take files from user end. |
|
voxeoJeffK
|
|
| Hello,
VoiceXML is executed on a voice-browser whereas HTML is executed on a web-browser so they are not able to be co-mingled. There wouldn't be a way to upload a file via a voice phone connection. If perhaps you could give us some details on what your goal is we may be able to offer advice. Regards, Jeff Kustermann Voxeo Support |
| login |