| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| enctype | Data Type: CDATA | Default: application/x-www-form-urlencoded |
| The enctype attribute specifies the MIME type encoding for any data submitted via the namelist attribute. The two possible vales for this attribute are ‘x-www-form-urlencoded’, (default), or ‘multipart/form-data’, (for binary data submissions, such as recorded audio). When submitting recorded data, this value must be explicitly set to ‘multipart/form-data’ and the method attribute to 'POST.' | ||
| expr | Data Type: CDATA | Default: Optional |
| The expr attribute evaluates to an ECMAScript value that defines the target URI. Either expr or next may be specified for the element, but not both. | ||
| 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. | ||
| fetchhint | Data Type: (prefetch|safe) | Default: safe |
Fetchhint is used to specify when the resource should be fetched during application execution. The possible values and their descriptions are:
Note that the Voxeo platform will always *not* prefetch content by default. As such, a developer should specify a value of ''prefetch" if resources are to be made available prior to execution of application content. | ||
| fetchtimeout | Data Type: CDATA | Default: 5s |
| (Ignored attribute) 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. | ||
| 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 next or expr attributes. Note that if the namelist attribute is left unspecified, then all input-item variables will be submitted to the destination URI. | ||
| next | Data Type: CDATA | Default: Optional |
| The next attribute specifies the literal URI, or URI fragment of where to transition the caller. The value can be a full URI: <submit next=”http://MyServer.com/MyFile.vxml”/> or a relative URI: <submit next=”MyFile.vxml”/> In addition, it can also indicate a particular form within the current document, where the pound sign precedes the form item name: <submit next=”#AnotherForm”/> Or lastly, it can indicate a specific form in another document: <submit next=”AnotherDocument.vxml#AnotherForm”> | ||
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <block> <var name="SomeCoolVar" expr="'SomeCoolMoeDeeValue'"/> <submit next="MyDestinationPage.jsp" namelist="SomeCoolVar" method="post"/> </block> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <block> <var name="Destination" expr="'MyDestinationPage.jsp'"/> <var name="AnotherCoolVar" expr="'SomeCoolValue'"/> <submit expr="Destination" namelist="AnotherCoolVar" maxage="5000" maxstale="5000" enctype="application/x-www-form-urlencoded"/> </block> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <block> <var name="SomeCoolVar" expr="'SomeCoolValue'"/> <prompt> preparing to submit. </prompt> <submit next="MyDestinationPage.jsp" method="get" fetchhint="safe" fetchaudio="MySoundFile.wav"/> </block> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
Asier
|
|
| Hello there,
I want know, how can i receive variables, from a php file Plase put some sample of code. Asier Thank you very much. |
|
MattHenry
|
|
| Asier,
In short, this is done in the very same manner as we would do with HTML. However, let's take a closer look at this: <form> <block> <?php //define a PHP variable $myVar1 = 'Asier'; ?> <!-- import it to VXML context --> <var name="myXMLvar" expr="<?=$myVar1?>"/> <log expr="'*** myXMLVar1 = ' + myXMLVar"/> </block> </form> Hope this helps, ~Matt |
|
Asier
|
|
| Hello there,
How can i receive a variable into of a document called??? i have: <submit next="vxmleng/bienvenida.vxml" namelist="hora"/> in the document bienvenida.vxml: i try receive the variable with: <var name="hora"/> I do it for receive any variable from a subdialog, but with the submit tag, not work. Thanks in advance, Asier. |
|
MattHenry
|
|
|
Asier, I think your question is answered in the following section of our documentation: http://www.voicexmlguide.com/qs_vars.htm Regards, ~Matt |
|
igor555
|
|
| Hi!
i want to pass a get/post variable to my vxml script: 1st script is: <vxml> <var name="myVar" expr="some data"/> <form> <block> <submit next="script2.vxml" namelist="myVar" method="get"/> </block> </form> </vxml> script2.vxml script is: <vxml> <form> <block> <var name="myVar"/> <prompt> my variable is <value expr="myVar"/> </prompt> </blocK> </form> </vxml> the result: myVar is empty i read http://www.voicexmlguide.com/qs_vars.htm and found no solution for such problem there. please advice thanks |
|
mikethompson
|
|
| Hey Igor,
The reason you are getting undefined is because using the namelist element is actually attaching that variable to your URI as a parameter (script2.vxml?MyVar=parameterValue). So when you are reaching this new document, you would need to use server-side scripting to pull the parameter value from the querystring. If you simply wish to use variables across document, you need to invoke an application root document. Basically, you have your main document that declares all of your "application" scoped variables so that they may be accessed anywhere in your leaf document. I could continue to explain, but it would be more beneficial to check out an example of a "root" document and accessing the root variables from a leaf document. -----root.xml----- <vxml version="2.0"> <property name="termtimeout" value="1"/> <var name="Var_1" expr="'foobar'"/> </vxml> -------leaf.xml------ <vxml version="2.0" application="root.xml"> <form> <block> <log expr=" '******Var_1:' + application.Var_1"/> <prompt> The value of Var 1 is now <value expr="application.Var_1"/> </prompt> <goto next="#F2"/> </block> </form> </vxml> NOTICE: The leaf document must reference the application root document via the "application" attribute in the vxml element. Also, as a matter of good practice, I try not to execute actual content in my root document. I usually use it strictly for storing variables that I want to be accessable via the entire application. As such, I typically map my application to hit the leaf document first and simply reference the application root document from there. This way, you don't have to hit your root document just to issue a <goto>. Let me know if you have additional questions. Regards, Mike Thompson Voxeo Extreme Support |
|
igor555
|
|
| for some reasons i cant use multi-document application here.
is there any way to pass variables from one vxml script to another without multi-document and server-side scripting(ASP, perl, PHP, etc.)? it does not matter what method to use - GET or POST |
|
MattHenry
|
|
|
Greetings Igor, To clarify on our erlier responses, there are two available methods of passing variables to a VXML document: 1 - <submit> the variables to a dynamic document, (ASP/JSP/etc), which has the abaility to parse dynamic querystring data. 2 - Use application-scoped variables, as Mike suggested VoiceXML, being a static markup, has no ability to read querystring data and import it back into the VXML context. Hope that this makes things clear, ~Matthew Henry |
|
khaled
|
|
| Hello,
I want know, how can i receive variables, from a php file to vxml file. khaled Thank you very much. --------------------------------- <?php include ("conn.php"); $p=0; conn(); //function to connect to database $sql = "select passwd from client"; $req = mysql_query($sql); if ($data = mysql_fetch_array($req)) {$p=$data['passwd'];} disconn(); ?> --------------------------------- <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC '-//Voxpilot/DTD VoiceXML 2.0//EN' 'http://dtd.voxpilot.com/voice/2.0/voxpilot_voicexml-2.0.dtd'> <vxml version="2.0" xml:lang="en-GB"> <form id="get_password_db"> <block> <submit next="http://adresseserver/11.php" method="get" fetchhint="safe"/> </block> <block> <prompt> Your password from database is <sayas class="digits"> <value expr="p"/> </sayas> <break msecs="400"/> Bye </prompt> <goto next="#exit"/> </block> </form> </vxml> ------------------------------------ |
|
mikethompson
|
|
| Hi Chihaoui,
Our documentation actually has a tutorial explaining how to retrieve variables from the querystring (when passing them in via server-side) and use them in the VXML context. You can check out that tutorial right here: http://www.voicexmlguide.com/qs_vars.htm Hope this helps, Mike Thompson Voxeo Extreme Support |
|
bankapp
|
|
| I saw a lot of example on how to send/retrieve variables and what confuses me is:
If I want to use a php file that is on some other server, how do I connect it with the .vxml application on evolution.voxeo.com??? More precisely I want to be able to retrieve and store information in mysql database that is hosted on some other server. I know that voxeo does not support .php, .asp etc. Can I embed some dynamic language into my xml application, or is it other way around??? I got no problem with sending to remote .php file. The question is how do I retrieve the result of some computations??? |
|
jbassett
|
|
| Hello,
On voxeo's hosted staged environment, you can simply map your app to an external URL. You can even host the XML file yourself. You can map you app to any URL you like. Currently only XML, WAV and .GRAMMAR file extensions will work on our free developer platform, that is why we allow you point to your own hosted app so you can test with your own server side languages. As far as PHP, you can embed ou XML right into the PHP file. Go to this link http://www.voicexmlguide.com/qs_vars.htm and find Getdigits.php example. You will see an example of how to do this. Thanks Jesse Bassett Voxeo Support |
|
amalsafd
|
|
| Hello all;
First of all, thank you very much for this great site. I am using nuance V-Builders to build vxml application. I have Apachi server. my problem that after submitting any data to cgi perl program on the server and saving it into database. when I'm going back to my vxml application through <goto next="...."/>, it forget all the previous taken information. here is the code and details: First: root.vxml <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC "-//Nuance/DTD VoiceXML 2.0//EN" "http://voicexml.nuance.com/dtd/nuancevoicexml-2-0.dtd"> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:nuance="http://voicexml.nuance.com/dialog" version="2.0"> <meta name="Generator" content="V-Builder 2.0.0"/> <!-- here I defined my global variables--> <var name="AdultCount" /> <var name="ChildCount" /> <var name="InfantCount"/> </vxml> Second: main.vxml <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC "-//Nuance/DTD VoiceXML 2.0//EN" "http://voicexml.nuance.com/dtd/nuancevoicexml-2-0.dtd"> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:nuance="http://voicexml.nuance.com/dialog" version="2.0" application="root.vxml"> <meta name="Generator" content="V-Builder 2.0.0"/> <form id="FlightSearch"> <field name="AdultNo" > How many Adults we have? <grammar src="NonZeroDigits.grammar"/> <filled> <assign name="AdultCount" expr="AdultNo"/></filled> </field> <field name="ChildNo"> How many children are traveling ? <grammar src="NonZeroDigits.grammar"/> <filled> <assign name="ChildCount" expr="ChildNo"/></filled> </field> <block name="summary"> There are <value expr="AdultCount"/> adult passengers, <value expr="ChildCount"/> children, are going in this trip./> <submit next="http://localhost:8080/cgi-bin/count.cgi" method="post" namelist="AdultCount ChildCount"/> </block> </form> <form id="AdultDetails"> <block> Adult equal <value expr="AdultCount"/></block> <field name="AdTitle"> What is the title, please? <grammar> [mister mrs. miss] </grammar> </field> </form> </vxml> Third: count.cgi #!c:/Perl/bin/perl.exe -w use strict; use CGI qw(:standard); use Win32::ODBC; my $q = CGI->new(); my $adults = $q->param('AdultCount'); my $child = $q->param('ChildCount'); my $phrase = $q->param(''); $phrase = "The adults count is $adults while children are $child and finally infants are $infants"; my $db = new Win32::ODBC("IDDB"); $db->Sql("INSERT INTO Count (NoAdults, NoChildren) VALUES ('$adults', '$child');"); $db->Close(); print qq* <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC "-//Nuance/DTD VoiceXML 2.0//EN" "http://voicexml.nuance.com/dtd/nuancevoicexml-2-0.dtd"> <vxml version="2.0"> <form id="response"> <var name="phrase" expr="'$phrase'"/> <block> <prompt>Data has been saved. <value expr="phrase"/></prompt> <goto next="http://STUDY-COMPUTER:8081/myApp/dialogs/main.vxml#AdultDetails"/> </block> </form> </vxml> *; Everything is going fine, the data will be submitted to the cgi file and will be saved in the database and will go to the form "AdultDetails" in the vxml file. The problem starts there when I found that the variable "AdultCount" and "AdultChild" in this example which is assigned before submitting to the cgi, is now getting again "undefined"! Can you help me with this please? Thanks Alot Amal |
|
sidvoxeo
|
|
| Hi there,
We would highly appreciate if you do not post server side script on the Voxeo Documentation Post. You may want to use the Forum posting or the support ticketing system to post server side scripts in the future. Let me explain your question "The problem starts there when I found that the variable "AdultCount" and "AdultChild" in this example which is assigned before submitting to the cgi, is now getting again "undefined"!" So when you go back from the CGI script to the Form id AdultDetails in the main vxml page the reference of the variables "AdultCount" and "AdultChild" are not within the scope of this form you are visiting. If you look back at code the "AdultCount" and "AdultChild" field variables are held within the form scope of FlightSearch. So I suggest you that you re-submit the variables with the value back to a server side script which will output the required vxml. Or you may want to use the variable scoping in order to address this issue. Hold the reference of those two variables outside the form scope and use it in another form. This may need you to re-structure your vxml code. Have a look at the documentation for http://docs.voxeo.com/voicexml/2.0/frame.jsp?page=varscoping.htm Let us know if you have any other questions. Thanks Sid |
|
amalsafd
|
|
| hi;
Thanks for your reply. You said: " If you look back at code the "AdultCount" and "AdultChild" field variables are held within the form scope of FlightSearch. So I suggest you that you re-submit the variables with the value back to a server side script which will output the required vxml. " If you looked again at my root.vxml, you'll find that I declared these variables there, so its scope is application itself not only the form FlightSearch scope. I didn't understand your suggestion clearly. Can you give me example? Let my question be more general, take this scinario: 1) In VXML dialog I declared variable in the root and assigned value to it. 2)I submit these variables (or even any other variables) to cgi file on the server and made some operations on the serever. 3) I used the <goto> to return back to my vxml dialog. Now my question: Is the normal and default thing that my dialog will forget any previous operation and start as from scratch? I have alos another question about retrieving data from server side: this is the cgi script: #!c:/Perl/bin/perl.exe -w use strict; use CGI qw(:standard); use Win32::ODBC; my $q = CGI->new(); my $adults = $q->param('AdultCount'); my $phrase = $q->param(''); $phrase = "The adults count is $adults "; my $db = new Win32::ODBC("IDDB"); $db->Sql("INSERT INTO Count (NoAdults) VALUES ('$adults');"); $db->Close(); print qq* <?xml version="1.0"?> <vxml version="2.0"> <form id="response"> <var name="phrase" expr="'$phrase'"/> <block> <prompt>Data has been saved. <value expr="phrase"/></prompt> <goto next="http://STUDY-COMPUTER:8081/myApp/dialogs/main.vxml#AdultDetails"/> </block> </form> </vxml> *; Here in the vxml part of the cgi I prompt the variable "Phrase". How I can send the value of this variable to the dialog in the vxml file I'm going to in <goto next...> to be able to use it in other stuffs not only prompting it in the cgi part? I wish that my question are clear and forgive me for my bad english. Thanks alot Amal |
|
sidvoxeo
|
|
| Amal,
To clarify on our earlier responses, there are two available methods of passing variables to a VXML document: 1 - <submit> the variables to a dynamic document, (ASP/JSP/etc), which has the abaility to parse dynamic querystring data. 2 - Use application-scoped variables. Now lets analyse the following snippet of code: <?xml version="1.0"?> <vxml version="2.0"> <form id="response"> <var name="phrase" expr="'$phrase'"/> <block> <prompt>Data has been saved. <value expr="phrase"/></prompt> <goto next="http://STUDY-COMPUTER:8081/myApp/dialogs/main.vxml#AdultDetails"/> </block> </form> </vxml> In this vxml document you are doing a goto next to main.vxml and to the form id AdultDetails correct? And you want to pass the variable "phrase" back to the main.vxml. Inorder to do this set a variable in the root document for example: root.vxml <?xml version="1.0"?> <!DOCTYPE vxml PUBLIC "-//Nuance/DTD VoiceXML 2.0//EN" "http://voicexml.nuance.com/dtd/nuancevoicexml-2-0.dtd"> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:nuance="http://voicexml.nuance.com/dialog" version="2.0"> <meta name="Generator" content="V-Builder 2.0.0"/> <!-- here I defined my global variables--> <var name="AdultCount" /> <var name="ChildCount" /> <var name="InfantCount"/> <var name="MyPhrase"/> </vxml> And change the following code to <?xml version="1.0"?> <vxml version="2.0" application="root.vxml> <form id="response"> <var name="phrase" expr="'$phrase'"/> <assign name="application.MyPhrase" expr="phrase"/> <block> <prompt>Data has been saved. <value expr="phrase"/></prompt> <goto next="http://STUDY-COMPUTER:8081/myApp/dialogs/main.vxml#AdultDetails"/> </block> </form> </vxml> Now in the Main.vxml page you can reference application.MyPhrase. Let me know if this posting makes sense. Thanks Sid |
|
amalsafd
|
|
| Thank you very much. I really apperiate your help.
It was clear step and finally I can pass variables to vxml. It works very fine. However the first problem is still there. I lose any variable that I assigned before going to cgi. In my previous example, I lose the value assigned to AdultCount when I return back to my main vxml eventhough I use now application.AdultCount and declared it in the root file and assigned a value to it before submitting it to cgi. eventhough that I added "application="root.vxml" in the vxml part of the cgi file. so again is that normal and i have to retrieve these data from the saved database everytime I want to use it? Thanks alot Amal |
|
MattHenry
|
|
|
Amal, As this problem is application scoped, it might be best to create a seperate account ticket tat contains application debugger logs so that we can make an assessment as to where the problem lies with your incarnation of the code: http://docs.voxeo.com/voicexml/2.0/gettingsupport.htm Standing by, ~Matthew henry |
|
sildev6
|
|
| Hello,
When I <submit> a form using method="POST" and namelist="var1 var2....", are *all* the form variables submitted or just the variables specified in the "namelist" attribute? Thanks |
|
MattHenry
|
|
|
If a namelist is specified, then only the variables denoted will be POSTed to the submit destination. If the namelist attribute is left unspecified, then all input-item variables will be submitted to the destination URI. Cheers, ~Matt |
|
sildev6
|
|
| Thanks for your reply, Matt!
But I am seeing a different behaviour. I am submitting a page to itself with a submit tag similar to <submit method="POST" namelist="var1 var2...." next="same_page"> and I get a semantic error saying "<form> has a duplicate form item named "abc". The item "abc" is a <field> item in the form and it is *not* part of the namelist attribute. So basically, I have something like <form> <field name="abc" type="boolean"> <prompt> Are you sure?</prompt> <filled> <if cond="abc==true"> <var name="var1" expr="'1'"/> <var name="var2" expr="'2'"/> <submit method="post" namelist="var1 var2" next="same_page"> </if> </filled> </field> </form> I am testing on VoiceCenter 5.5. Any idea why I get the semantic error? Thanks! |
|
sildev6
|
|
| Hello,
Re: my last post about duplicate <form> item. Problem fixed. Thanks! |
|
terriblecow
|
|
| So I'm startin to get the hang of this vxml thing and i like it :)
I do have a question that you guys out there may be able to answer for me though. I'm writing a generic recordMessage page and the vxml I'm using is below. It's based off another example here on the site. Here's the question: I'm using the fetchhint="safe" attribute of the submit tag to ensure that this submit happens after the prompt telling the user that its gonna happen. But I'm consistently seeing the form submit to the server before the prompt has even started? Am I misusing the attribute? or am I missing something else? Any pointers or clues would be appreciated. Thanks <?xml version="1.0" encoding="UTF-8" ?> <vxml version="2.1" xmlns="http://www.w3.org/2001/vxml" > <form id="main"> <record name="CallersMessage" beep="true" maxtime="60s" finalsilence="2500ms" type="audio/wav"> <prompt> Record your message after the beep. </prompt> </record> <field name="eraseMessage" type="boolean"> <prompt> This is your recording: <value expr="CallersMessage" /> Do you want to erase it and try again? Say yes or no. </prompt> <filled> <if cond="eraseMessage"> <goto next="#main"/> <else/> <goto nextitem="save"/> </if> </filled> <noinput> <goto nextitem="wantrecord" /> </noinput> </field> <block name="save"> <prompt> Okay, we'll save your recording. Your recording was excellent. Thank you. </prompt> <goto nextitem="submitData" /> </block> <block name="submitData"> <submit next="RecordMsg.aspx?askName=james" method="post" namelist="CallersMessage" enctype="multipart/form-data" fetchhint="safe" fetchaudio="sounds/fetchaudio.wav"/> </block> </form> <form id="wantrecord"> <field name="b" type="boolean"> <prompt> I didn't hear you say anything. Do you want to try again? Say yes or no.</prompt> <filled> <if cond="b"> <goto next="#main" /> <else /> <goto next="#norecord" /> </if> </filled> </field> </form> <form id="norecord"> <block> Okay, you don't have to record anything if you don't want to. </block> </form> </vxml> |
|
jbassett
|
|
| Hello,
I have opened a ticket # 340036 on your account so we can dive into your issue. You will receive updated on the ticket to the email address you signed up with. Thanks, Jesse Bassett Voxeo Support |
|
jorgeivanmm
|
|
| hi, i am working with voxeo prophecy, and i am doing an application but i have a problem. i am making dinamic pages using JSP, and i have made a folder inside the Webapps folder of Voxeo. but the problem is for the submit element. when i run the first file, using the SIP PHONE the file runs well but it say me that there is a error in the submit element but i don't know what the problem is. somebody help me.
the file is the next and is inside a folder name VXML: <?xml version="1.0"?> <%@ page import="java.util.*" %> <%@ page import="java.lang.*" %> <%@ page import="tesis.*" %> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml"> <form id="usuario"> <property name="inputmodes" value="voice"/> <field name="nmb" modal="false"> <prompt> Please say your name </prompt> <grammar mode="voice" root="name" tag-format="semantics/1.0"> <rule id="name" scope="public"> <one-of> <item tag="carlos"> carlos </item> <item tag="ivan"> ivan </item> <item tag="jorge"> jorge </item> <item tag="andres"> andres </item> </one-of> </rule> </grammar> <nomatch count="1"> Sorry, No Match! <reprompt /> </nomatch> <noinput count="1"> You didn't say anything <reprompt /> </noinput> <filled> <prompt bargein="false"> Looks like you said <value expr="nmb" /> </prompt> </filled> </field> <form id="confirmation"> <field name="res" modal="false"> <prompt> the information collected is correct? </prompt> <grammar mode="voice" root="con"> <rule id="con" scope="public"> <one-of> <item tag="yes"> yes </item> <item tag="not"> not </item> </one-of> </rule> </grammar> <filled> <prompt> you said <value expr="res"/> </prompt> <if cond="res=='not'"> <goto next="#usuario"/> <else/> <goto next="#envio"/> </if> </filled> </field> </form> <form id="envio"> <block> <submit next="Validacion.jsp" namelist="nmb" method="post"/> </block> </form> </vxml> the file runs well but the error are in the submit element, what is the error??? i don't know, please help. the file Validacion.jsp are inside the folder VXML along with the previos file. what is the error in the submit??? |
|
mikethompson
|
|
| Hi there,
Initially reviewing your code, I do not see any glaring issues. This being said, the next best step is to provide us with the output from the Prophecy LogViewer. 1) Open the Prophecy debugger window 2) Call the application, and reproduce the error 3) Select all logger output, (Ctrl+A) 4) Copy log output to a .log file, (Ctrl+V) 5) Attach the log file to the ticket With this information in-hand, we can offer you an accurate, speedy resolution to the coding problem: http://docs.voxeo.com/voicexml/2.0/gettingsupport.htm If you have personal information in your logs which you do not wish to be exposed in a public forum, let me know and we can open a private account ticket for this issue. Regards, Mike Thompson Voxeo Corporation |
|
sowmya.saravanan
|
|
| hello there,
I wanna know how to pass the variables from the ccxml file to a jsp page.i need some sample code to proceed with my application.please help. ~sowmya Thanks |
|
mikethompson
|
|
| Hello Sowmya,
Our CCXML documentation illustrates how one can send CCXML variables over to a server-side document, then pull those variables via server-side scripting. It is illustrated in PHP, but it should give you the right idea regarding the best process. http://docs.voxeo.com/ccxml/1.0-final/appendixg_ccxml10.htm Hope this helps, Mike Thompson Voxeo Corporation |
|
MattHenry
|
|
|
One point of confusion that comes up when using fetchaudio is how this affects prompt queuing and document fetching. Note that prompt queueing and prompt execution are two entirely separate hings, and it is strongly advised that developers who are interested in this topic closely read the specification for clarity on the difference: http://www.w3.org/TR/voicexml20/#dml4.1.8 As this topic has come up a few times, it seemed as if we should illustrate this in a little greater detail, so here goes: When you declare the fetchaudio property, this will clear the prompt queue, and thus play the <prompt> within your block that does the submit prior to the submission. One thing that is important to remember here is that this can cause some confusion when executing TTS and audio resources. For instance, assume the following document that submits data: <form> <field name="F1"> <audio src="audio_1.wav"/> .. <filled> <audio src="standby.wav"/> <submit next="target.jsp" namelist="F1" fetchaudio="pulse.wav"/> </filled> </block> </form> And further take into account that the XML output of "target.jsp" looks like this: <form> <block name="B2"> <audio src="audio_2.wav"/> <exit/> </block> </form> The chronological order of audio execution in this case will be as follows: 1) audio_1.wav 2) user input is gathered 3) standby.wav 4) document fetch occurs 5) pulse.wav (fetchaudio) 6) audio_2.wav But what happens is we take out the 'fetchaudio' attribute from the <submit> in our invoking document? Here is where things get a little confusing, but bear in mind that this order of execution is per the specification: 1) audio_1.wav 2) user input is gathered 3) document fetch occurs 4) standby.wav 5) audio_2.wav I hope that this will help to proactively save some time & frustration for our developers as applications are in the formative stages, rather than finding out about this at the last minute. ~Matt |
|
chuchoomar
|
|
| the audio file does not need a special characteristic in duration? or once the submitt element is executed and entered to the next page provided by the attribute next the sistem finished the audio file and continue with the other vxml file(the next page) ..... as it works internally? | |
VoxeoDustin
|
|
| Hey Chuchoomar,
If I understand what you're asking, you'll want to use the 'fetchaudiominimum' property to set how long the fetchaudio file should be played: <property name="fetchaudiominimum" value="10s"/> This example will tell the VXML browser to play the audio file for 10 seconds, regardless of how long the fetch takes. This allows you to mask the fetch event with, for example, an advertisement or information and know that your message will not be cut off. Cheers, Dustin |
|
jaffar
|
|
| <block>
<submit next="mypage1.jsp"> <goto nextitem="day"> </block> IF I SUBMIT TO A JSP PAGE FROM A VXML .COLLECT THE DATA FROM JSP... HOW CAN I COME BACK TO OUR SAME VXML...FROM THE JSP... IS THERE ANY ELEMENT TO TAKE BACK THE DATA.. PLZ GIVE ME SOME EXAMPLES... THANK YOU |
|
jefo12
|
|
| how to submit a recorded file to a jsp plz giv me an example...
<record name="R_1" beep="true" dtmfterm="true"> <prompt> here you will hear a beep indicating that you should start your recording. </prompt> <prompt> after you are finished, you may press any DTMF key to indicate that you are done recording. </prompt> I hav to submit this recording to a jsp.and stored it into the database.... plz give me suggestion |
|
VoxeoDustin
|
|
| Hey Jefo,
I unfortunately do not have an example of doing this with JSP, but I do have one using PHP that should give you an idea of how to get started and I've attached the example below. Cheers, Dustin |
|
jefo12
|
|
| <vxml>
<var name="callerid" expr="session.callerid"/> <form id = "callerid"> <field name="caller"> <grammar type= text/gsl mode="dtmf"> [dtmf-1 dtmf-2] </grammar> <prompt> if you are a new user press 1 else if u hav already an appointment press 2 </prompt> <filled> <block> <If cond="caller=='dtmf-1'"> <goto next="F1"> <else/ > <goto next ="welcome"> </filled> <form id="welcome"> <field name="cancelres"> <grammar type="text/gsl"> [cancel reschedule]</grammar> <prompt > wat do u want to cancel or reschedule the appointment </prompt> <filled> <block> <subdialog name="getdetails" src="mydoc.jsp"/> //WHERE TO STORE THE VALUES COMING FROM JSP AND HOW TO PLAY THE CORRESPONDING DATE AND TIME.. </block> </field> </form> <form id ="newapp"> <field name="consult"> <prompt bargein="false"> welcome to abc phone appointmentscheduling.please request the date for your appointment. To request an appointment this week you can say today,tomorrow ,day after tomorrow or a specific day such as this Friday.you can also request the day next week such as next Friday.plz make ur request now Such as today,tomorrow,day after tomorrow,this Friday or next Friday. </prompt> <grammar type="text.gsl"> [today tomorrow dayaftertommorrow Sunday Monday Tuesday Wednesday Thursday Friday Saturday (next Sunday) (next Monday) (next Tuesday) (next Wednesday) (next Thursday) (next Friday) (next Saturday) morning afternoon evening] </grammar> //IS THERE ANY EASY WAY WITHOUT WRITING ALL THESE DAYS... //IF THE USER SAYS A SPECIFIC DATE SUCH AS MARCH 2ND HOW TO INCLUDE GRAMMAR FOR THAT <filled> <block> <goto nextitem="day"> </block> <filled> <field name="day"> <grammar type="text.gsl"> [morning evening] </grammar> <prompt>please indicate your time facult by saying morning or afternoon</prompt> <filled> <subdialog name="availabletimes" src="mypage.jsp">//HOW TO play all available timings on that date.. </subdialog> <field name="confirm" type="boolean"> </filled> <block> <if cond="confirm=='yes'"> Then play the exact appointment day,date and time.. <elseif cond="confirm='no'"> <goto nextitem="day"> </block> </field> </form> </vxml> ABOVE IS THE CODE FOR APPOINTMENT SCHEDULING PLZ VERIFY WHETHER IT IS VALID OR NOT ..IF NOT GIV ME THE EFFICIENT VXMLCODE. |
|
VoxeoDustin
|
|
| Hey Jefo,
Attached is grammar that supports date entry, including day of the week, day, month and year. You can implement this grammar by using the following syntax: <grammar src="SRGS_date.xml" type="application/grammar+xml"/> Give this a try and let us know if it's what you're looking for. Cheers, Dustin |
|
azeta_ambrose
|
|
| Hello All and Voxeo team,
I wrote and uploaded a peice of voicexml code to submit username and password from voicexml document to a php file hosted in an apache web server with http link below, but what i am getting is "internal error in gateway software", when execution get to the submit statement. I hosted the voicexml file in voxeo network and it ask me for username and password, but when i supply the username and then the password, all i hear is this error - internal error in gateway software. Please forum members, has body succeeded in sending some variables from vxml document hosted in voxeo network to a php file in a publicly hosted apacher web server? if yes please give me some sample code and guideline for both the voicexml and php. The php file sould send the data to amysql server. I have hosted the php file and created the mysql database. voxeo, pls can one use submit command in your network? for months i have been trying to use submit command on your network but it keep giving me this error. i thought a submit command should be able to execute a valid url. This url is valid, because i can access when entered through an internet browser, but in voicexml hosted in voxeo network, it give the above message. pls help. everyone pls. partial code ============= vxml code ============ . . <submit next="http://www.autosp.byethost13.com/p1.php" method="POST" namelist="username password"/> php code ======== .. |
|
voxeo_chris
|
|
| Hello,
This typically refers to a XML parse error in the document. Whenever you perform a submit in VoiceXML, it actually transitions to the document and the VoiceXML browser attempts to parse it. Make sure that when your document performs the submit, that the only data returned is valid VoiceXML. Any other data in there will definitely cause a parse error. Regards, Chris |
|
azeta_ambrose
|
|
| Hello
Thanks for the response. Would you kindly place some sample code to demonstrate valid VoiceXML data that can be passed from vxml to php and vice visa. Azeta |
|
voxeojeremyr
|
|
| Hi,
We have some good examples of passing variables to and from different server side scripting languages in our tutorial documentation at this URL: http://docs.voxeo.com/voicexml/2.0/qs_vars.htm Thanks, Jeremy Richmond Voxeo Support |
|
wilhelm
|
|
| Hi,
I have a quick question when using submit, I am using the submit variable to connect to a different server. I was wondering is there any way in which I can catch if the server has not responded, down or something like that. While I am writing here I have another question with the submit tag, in playing with the voxeo developers I was able to put a condition on the response of the external site but I have not been able to find out any documentation on how to do this, could you please give me a place to look. Regards Wilhelm |
|
voxeojohnq
|
|
| Hello,
In order to catch a badfetch event, all you need to do is add a <catch event="error.badfetch"> section. When a submit does not successfully fetch a document, execution will move into the <catch> section where you will be able to handle the exception. For example: <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.1"> <form id="frm_main"> <block> <!-- submit to a bad document --> <submit next="badxmldoc.xml" /> </block> </form> <catch event="error.badfetch"> <!-- Execution moves here after the submit fails --> <log expr="'***** BAD FETCH '" /> </catch> </vxml> I'm not exactly sure what you are asking in your second question. If you are asking how to send variables to the remote server, you would use the "namelist" attribute which accepts a space-delimited list of valid variables. I hope this helps, if you have any further questions, please don't hesitate to ask. Regards, John Quinn Voxeo Support |
|
wilhelm
|
|
| Thank you, that does help, I am going to go and read the catch documentation right now. What i was really asking with my second question was can one use the result from a submit to determine the next step in the document ie.
if submit > 10 goto greatTen else goto lessTen If that makes any sense. Regards Wilhelm |
|
voxeoJeffK
|
|
| Hi,
With a <submit> you're are transitioning to a new document altogether. The only way you stay in the current document is if there is an error, as John showed above. If you want to have a logic flow you can either <submit> to a server-side language that will output appropriate VXML based on the namelist variables submitted, or if you want to stay with static pages you can use logic in your VXML document to decide which new page to <submit> to. Hope that helps, Jeff K. |
|
Vijeth
|
|
| Hi, I had struck here. I'm using a VXML file to take the number from user as dtmf input. then i'll transfer that number using <submit>. There i'll check the inputted number with an given number, if the number is incorrect then i've to prompt INVALID NUMBER and have to transfer control to previous vxml file.
this is my vxml file. ---------------------------------------------------------------------- <vxml xmlns="http://www.w3.org/2001/vxml" xml:lang="en-IN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <form> <field name="cell" type="digits"> <prompt> Enter your number to check the balance</prompt> <noinput><reprompt/></noinput> <nomatch><reprompt/></nomatch> <filled> <submit next="http://localhost:8080/NewEx1/bal1" namelist="cell"/> </filled> </field> </form> </vxml> --------------------------------------------------------------------- This is my Servlet file import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class bal1 extends HttpServlet{ public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException { PrintWriter out=response.getWriter(); String s=request.getParameter("cell"); int num=1234567890; int input=Integer.parseInt(s); int balance=1234; RequestDispatcher rd=request.getRequestDispatcher("/balance.vxml"); if(num==input) {out.println("<vxml xmlns=\"http://www.w3.org/2001/vxml\" xml:lang=\"en-IN\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \t xsi:schemaLocation=\"http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd\" version=\"2.0\">" + " <meta name=\"maintainer\" content=\"YOUREMAILADDRESS@HERE.com\"/> <form><block><prompt> your balnce is "+balance+"</prompt></block></form></vxml>"); } else {out.println("<vxml xmlns=\"http://www.w3.org/2001/vxml\" xml:lang=\"en-IN\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \t xsi:schemaLocation=\"http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd\" version=\"2.0\">" + " <meta name=\"maintainer\" content=\"YOUREMAILADDRESS@HERE.com\"/> <form><block><prompt>invalid number</prompt></block></form></vxml>"); } } } --------------------------------------------------------------------- But when i enter any other number like "1234#", the transfer going bak to vxml file with prompting INVALD NUMBER. Is compiler overlooking the out.println()? Please help me out. |
|
Vijeth
|
|
| Sorry previous code needed another forward statement. Please help me.
Hi, I had struck here. I'm using a VXML file to take the number from user as dtmf input. then i'll transfer that number using <submit>. There i'll check the inputted number with an given number, if the number is incorrect then i've to prompt INVALID NUMBER and have to transfer control to previous vxml file. this is my vxml file. ---------------------------------------------------------------------- <vxml xmlns="http://www.w3.org/2001/vxml" xml:lang="en-IN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" version="2.0"> <form> <field name="cell" type="digits"> <prompt> Enter your number to check the balance</prompt> <noinput><reprompt/></noinput> <nomatch><reprompt/></nomatch> <filled> <submit next="http://localhost:8080/NewEx1/bal1" namelist="cell"/> </filled> </field> </form> </vxml> --------------------------------------------------------------------- This is my Servlet file import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class bal1 extends HttpServlet{ public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException { PrintWriter out=response.getWriter(); String s=request.getParameter("cell"); int num=1234567890; int input=Integer.parseInt(s); int balance=1234; RequestDispatcher rd=request.getRequestDispatcher("/balance.vxml"); if(num==input) {out.println("<vxml xmlns=\"http://www.w3.org/2001/vxml\" xml:lang=\"en-IN\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \t xsi:schemaLocation=\"http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd\" version=\"2.0\">" + " <meta name=\"maintainer\" content=\"YOUREMAILADDRESS@HERE.com\"/> <form><block><prompt> your balnce is "+balance+"</prompt></block></form></vxml>"); } else {out.println("<vxml xmlns=\"http://www.w3.org/2001/vxml\" xml:lang=\"en-IN\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \t xsi:schemaLocation=\"http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd\" version=\"2.0\">" + " <meta name=\"maintainer\" content=\"YOUREMAILADDRESS@HERE.com\"/> <form><block><prompt>invalid number</prompt></block></form></vxml>"); rd.forward(request,response); } } } --------------------------------------------------------------------- But when i enter any other number like "1234#", the transfer going bak to vxml file with prompting INVALD NUMBER. Is compiler overlooking the out.println()? Please help me out. |
|
voxeoJeffK
|
|
| Hi,
While debugging Java is definitely outside the scope of this forum I did notice something. In your assignments you have: String s=request.getParameter("cell"); int num=1234567890; int input=Integer.parseInt(s); int balance=1234; and in your test you have: if(num==input) so unless you enter 1234567890 it is always going to hit the "else" block, and return INVALD NUMBER. hope that helps, Jeff K. |
|
Vijeth
|
|
| It helped.Thank you Jeff K | |
Vijeth
|
|
| Hi,
How can i send a variable value in one form to another form? And how to get it in other form? Eg: there is variable select=1234 in form(id=n) i want to use this variable in another form(id=m). how can i? Remember select is an inputted value in form(id=n) |
|
voxeoJeffK
|
|
| Hi,
A variable is in Dialog scope when declared within a form. You will need to assign to the higher Document scope to transfer that value between forms. <var name="highVar"/> <form id="one"> ... <assign name="highVar" expr="localVar"/> <goto next="#two"/> </form> hope that helps, Jeff K. |
|
Vijeth
|
|
| Thank you Jeff, I cleared that.
Again another problem... Can i transfer the control from a file(servlet or vxml) to a a particular form in a particular vxml file?? |
|
Vijeth
|
|
| Thank you Jeff, I cleared that.
Again another problem... Can i transfer the control from a file(servlet or vxml) to a a particular form in a particular vxml file?? |
|
VoxeoDustin
|
|
| Hey Vijeth,
You can, in fact, transfer directly to a form with the submit and goto elements like so: <submit next="AnotherDocument.vxml#AnotherForm"> <goto next="AnotherDocument.vxml#AnotherForm"> Cheers, Dustin |
|
Vijeth
|
|
| Thank you Dustin.... This helped me a lot.... | |
Vijeth
|
|
| Hi, I want to send a variable from one vxml doc to another vxml, for this i can use
<submit next="next.vxml" namelist="myVar"/>. I want use this myVar value.How can i assign it's value to a variable anotherVar in next.vxml???? |
|
voxeoJeffK
|
|
| Hi,
Variables included under namelist in <submit> are passed as query-string parameters which are not available to a vxml document. Usually variables passed this way are processed with server-side language, or are accessed via ccxml and passed to a vxml dialog. What you can do is utilize application scoped variables that are accessible from all leaf vxml documents. In the root vxml document you declare the variable in the standard fashion: <var name="ApplicationVar" expr="'application'"/> and then in leaf documents you prepend "application" to the variable name to reference it: <value expr="application.ApplicationVar"/> hope that helps, Jeff K. |
|
Vijeth
|
|
| Hi Jeff,
Thank you for your time and help. You are helping me a lot. Thank you. |
|
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 submit element?? if not... what element is related to this problem?? Is it possible?? Please help... |
|
jdyer
|
|
| Hi,
I think the element you are looking for here is the [url=http://docs.voxeo.com/voicexml/2.0/send.htm]<Send>[/url] element. The [b]<submit>[/b] element is designed to transfer control to a new document, where as the [b]<send>[/b] element is designed as more of a "fire and forget" type of element keeping control in the invoking document. Hope that clears that up for you , please let us know if there are any other questions. We are certainly always more then happy to help our developers! Regards, John Customer Engineer |
|
feel012
|
|
| Thank you for your help...john..
But I don't understand. Is it possible that execute dll function in vxml using send element?? I don't know right way.. 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 |
|
Magician
|
|
| Greetings & Salutations!
I'm trying to get an important trick to work. Perhaps you can tell me how to get this rabbit out of the hat: I record a message using the <record> tag. I know that this is working as I use the recorded message within subsequent steps to paly it back to the caller. So I know I have a recorded message within my variable. I attempt to save the message to an outside server. I have tried three different methods: <data> using an <assign>, <submit>, and <send>. The last method <send> seems to actually post an empty file to the external server. I am investigating this. In the meantime, could you please be so kind as to provide an example of recording a message, and posting it to an external server. I expect there are other voice magicians out there that also need to perform this amazing feat. Thank you in advance. Magician |
|
voxeoJeffK
|
|
| Hi,
Call recordings are saved to Voxeo's servers. You will need to employ some server-side processing to fetch the recordings off. We have a full set of tutorials that shows how to accomplish this in a variety of server-side languages here: http://docs.voxeo.com/voicexml/2.0/recording.htm Regards, Jeff K. |
|
MattHenry
|
|
|
Hi there, I wanted to add to Jeff's posting and advise that the <send> element for *VoiceXML* is not a w3c-compliant element, and is unsupported on our platform. Of course, <send> for CCXML is a w3c-compliant element, which is indeed supported by our platform software. Hope this helps to clear up some of the mystery, ~Matt |
|
mtatum111
|
|
| Is it safe to say that the main differences between the submit and goto are that the submit sends a namelist whereas goto does not.
Thanks for any additional information. |
|
voxeoblehn
|
|
| Hello,
In essence, that is the fundamental difference between the two, as a submit allows the developer to submit a space-delimited list of variables to the destination document whereas the <goto> element does not. Cheers, Brian L. Voxeo Support |
|
joeselvaraj
|
|
| <var name="__SomeCoolVar" expr="'SomeCoolValue'"/>
Is there any limitations on how to name the application variables. For example, can the application variable start with __ (double underscore) Thanks Joe S |
|
VoxeoDustin
|
|
| Hey Joe,
You can follow ECMAScript variable naming conventions: http://www.codelifter.com/main/tips/tip_020.shtml As well, you'll want to avoid any Javascript or Java reserved words: http://www.quackit.com/javascript/javascript_reserved_words.cfm Cheers, Dustin |
|
shawnaslam1
|
|
| hello,
Following is the submit query in which i want to call the Voxeo clear cache API. My question is how could i incorporate my URL in this string as my sting contain EXT which is variable and has value. I am doing in the following way and getting problem can anyone correct it. <submit next="cachemanager-api.voxeo.net/caching/2.0/management?action=clearcache&accountGUID=5BE6545B-B573-4F62-8740-37003C178AEB&url=../../GENIE/tlsp_cna/SigmaVoiceEmails/&Ext&/&Greeting.wav>http://cachemanager-api.voxeo.net/caching/2.0/management?action=clearcache&accountGUID=5BE6545B-B573-4F62-8740-37003C178AEB&url=../../GENIE/tlsp_cna/SigmaVoiceEmails/&Ext&/&Greeting.wav" method="get" enctype="multipart/form-data" /> Regards, Shawn |
|
VoxeoDustin
|
|
| Hey Shawn,
The <submit> element of VoiceXML will actually parse the fetched document as VoiceXML and attempt to transition execution to it. The Cache Manager API does return valid VoiceXML, so this will throw a parse error when attempting to submit to it. If absolutely need this functionality from within an application, you would need to make use of CCXML and its <send> element: http://docs.voxeo.com/ccxml/1.0-final/send.htm Let me know if we can be of further assistance. Cheers, Dustin |
|
shawnaslam1
|
|
| Its mean we can't hit Voxeo clear cache API through our VXML and we need to use send of CCXML to accomplish the task.if ths is right then dont we have any alternate?
Shawn |
|
VoxeoDustin
|
|
| Hey Shawn,
This is correct. The caching API is not intended to be accessed from within an application, so there is no method provisioned for that. Typically we recommend using a cron job and scripting to handle any form of automated cache clearing and setting. Cheers, Dustin |
|
amarar
|
|
| I need to pass namelist variables or as a query string from one vxml app to another vxml app. Could someone please tell me the best way to do that? Thanks. | |
voxeojeff
|
|
| Hi there,
This can be done using the following syntax, assuming the second application is located at "http://myAppServer.com/mySecondApp.vxml" <submit next="http://myAppServer.com/mySecondApp.vxml" method="post" namelist="var1 var2 var3"/> If you do not intend on transitioning to the second application, then you'll want to use a <data> instead: http://www.w3.org/TR/voicexml21/#sec-data. Regards, Jeff Menkel Voxeo Corporation |
|
martinkimber
|
|
| Hello.
Maybe an obvious question: can one use SSL, e.g. <submit next="https://myserver.com:4321/my/app.vxml" method="post"/> to encrypt the traffic from the VXML host to myserver.com and back again? What happens if there is a certificate problem (self-signed, etc)? I'm just thinking about possible architectures, I haven't tried this, maybe I should... Martin |
|
voxeojeremyr
|
|
| Hello Martin,
Yes, you can use SSL. However, you cannot use self signed certificates. If you are using our Hosted solution, Verisign is supported and also our recommended SSL certificate provider. If you are using a local version of Prophecy, it comes with the standard Java SDK Keystore version 1.5, so as long as the key is in that keystore, SSL should work without issue. If you have any questions or run into any issues, please let us know. Regards, Jeremy Richmond Voxeo Support |
|
GMan2XS
|
|
| Hi, I'm trying to do a submit with 2 parameters on the QueryString of the form:
expr="'http:xxx/yyy.asp?a='+b+'&c='+d" But I keep getting XML parsing errors. I've tried putting CDATA tags round it but still no joy, what am I doing wrong? |
|
voxeoJason
|
|
| Hi,
We can certainly assist in this regard, however I would like to clarify that when using VXMLs <submit> tag, you're attempting to pass two defined perimeters in the QueryString, but are getting parse errors, correct? In this case Would it be possible to open an account ticket on evolution.voxeo.com so and link or post your code so that we may review it in order to deduce the exact cause of that parsing error? Regards, Jason Voxeo Support |
|
yliang18
|
|
| Hi,
In my VXML application I am trying to collect some scores from the user and send it to an aspx page on another server for processing. I am using the following syntax: <submit next="http://SomeServerUrl/Users/SetScore.aspx" method="post" namelist="objUserData timeVar dateVar"/> The data can be received and processed successfully, however I encounter an error at run-time: VoiceException: error.badfetch Could not compile document: http://SomeServerUrl/Users/SetScore.aspx Is this because the Voxeo server is trying to compile an aspx page which it does not support? Is there a way to suppress this error so the user does not hear the message while using the application? Thank you, Yuan |
|
VoxeoDustin
|
|
| Yuan,
When using <submit>, the called document must output valid VoiceXML, as <submit> will transfer execution to the fetched document. If you do not wish to transfer execution, you may want to try the <data> element instead. http://www.vxml.org/data.htm Let me know if we can be of further assistance. Regards, Dustin |
|
yliang18
|
|
| I have tried to use the data element to pass the variables using the following way:
<data srcexpr="http://SomeServerUrl/Users/SetScores.aspx" namelist="objUserData timeVar dateVar" method="get" /> but it seems that it is not passing the variables as parameters in the destination url. Could you clarify how the called document need to output a valid VoiceXML? In my case, does the voice app wait to receive a VoiceXML response from the server after the <submit> call in order to return success? Thanks. Yuan |
|
VoxeoDante
|
|
| Hello Yuan,
It looks like you are using <data> in the example, but are looking at <submit> as well. When using <submit> you will need to return valid VXML before the application will continue execution. The <submit> tag is used to transfer execution of that application to a new document. <data> on the other hand simply lets you send some information to the back end, and retrieve some XML without having to transfer execution to a new document. I hope this clarifies your request. Regards, Dante Vitulano |
|
asis1988
|
|
| thanks john!! it helps me!! now i can pass vars to my php file.
Now im tryng to pass the execution to another php file to generate a xml grammar. Iīve created this php and the xml grammar is readed by voxeo without problem, but my professor tell me that the grammar have been created dinamically when the voxeo aplication starts. I think i must do this with the "goto" element like this: <goto next="http://astrar.homeftp.net/info.php"/> but the aplication says me that theres an error. I suppose that this post must be in the goto page,im sorry. THANKS FOR EVERYTHING! |
|
voxeoJeffK
|
|
| Hello,
Is it you want to reference a dynamically generated external grammar from a VXML file? You can set the "src" to that PHP document that creates the grammar: <field name="F_1"> <grammar src="DynamicGrammar.xml" type="application/grammar-xml" /> or is it you want move to a VXML document where you are generating the grammar inline? If so you can use either <goto> or <submit>. The real difference between them is that you can pass variable data in <submit> whereas <goto> cannot. Regards, Jeff Kustermann Voxeo Support |
|
asis1988
|
|
| sorry, but i dont explain me good. I generated a valid xml grammar and it works properly. I did this:
<field name="origen"> <grammar src="http://astrar.homeftp.net/lista.xml" type="application/grammar-xml"/> The problem is that to generate this grammar, I must execute the http://astrar.homeftp.net/info.php, that generate this grammar. So i need call the info.php file before to call the grammar. And I canīt do it, because when i do : <goto next="http://astrar.homeftp.net/info.php"/> it dont generate the xml grammar, because it seems that the php file isnīt good called. By other side, iīve got a problem with the data sending. I do this at the end of the vxml document: <var name="myTarget" expr="'http://astrar.homeftp.net/pasarDatos.php'"/> <data srcexpr="myTarget" namelist="origen destino day hour minutes" method="post"/> The problem is that the php file doesnīt retrieve any data. I want to know if the problem is due to the vars in namelist are defined in other forms, and at the end of the vxml document, they dont exist. THANKGS |
|
VoxeoDustin
|
|
| Hello,
If the variables are initialized in a different form (using <var>), then they are only available in that form. If they are initialized via <var> at the <vxml> level, then assigned values using the <assign> tag at any scope, then they will maintain that value throughout the document. You may want to try defining your variables at the root <vxml> scope to ensure they maintain their value when you call the <data> tag. Regards, Dustin Hayre Solutions Engineer Voxeo Corporation |
|
personetics
|
|
| Hi
I am trying posting my server in each step I am doing in the IVR. Unsuccessfully... I think it might happen cause my POST data is causing it to fail this is the post data : cmd={%22type%22:%22startSession%22,%22partyId%22:%22P6002%22,%22testerEmail%22:%22.@1%22,%22bankInfo%22:{%22reasonHints%22:[],%22contextHints%22:{%22confirmedReason%22:%2216000%22,%22confirmedTransaction%22:%22P6002C011%22}},%22clientCapabilities%22:{%22canGenerateSysBubbles%22:true,%22canGenerateUserBubbles%22:true},%22lang%22:%22en%22,%22channel%22:%22Web%22,%22livePersonChatId%22:null} I tried to do this : <submit expr="http://myServer.com?cmd= ...." namelist="" maxage="5000" maxstale="5000" enctype="application/x-www-form-urlencoded"/> but it keeps failing. Can you please advise on how can POST this data inside a form ? Thanks Itay |
|
voxeoJeffK
|
|
| Hello Itay,
Rather than add to the query-string yourself, simply use the "namelist" attribute. Also, if you want the data as Post rather than Get you can set it in the "method" attribute: <submit expr="http://example.com/myScript.jsp" namelist="cmd" method="post"/> Regards, Jeff Kustermann Voxeo Corporation |
|
personetics
|
|
| Hi again :)
Still having trouble with POST I did what you said but it seems my php is not running. when I run this link http://ellinsys.com/personetics/startSession.php from a browser is works good, but then I am trying to make it run on the vxml and my server show no logs (like the script doesnt run) here is a part of the xml -: <?xml version="1.0"?> <vxml version = "2.1"> <meta name="maintainer" content="YOUREMAILADDRESS@HERE.com"/> <form id="sharonOutbound"> <field name="guess"> <grammar type="text/gsl"> [one dtmf-1 sharon] </grammar> <submit expr="http://ellinsys.com/personetics/startSession.php" namelist="" method="get"/> <prompt> <audio src="http://ellinsys.com/personetics/audiofiles/wavesurfer/3.wav"/> </prompt> . . . Can you please advise ? Thanks Itay |
|
voxeoTonyT
|
|
| Hello,
Try entering the variable you are trying to POST in the 'namelist' attribute. [code]<submit expr="http://example.com/myScript.jsp" namelist="cmd" method="post"/> [/code] Let us know if this helps. Regards, Tony Taveras Customer Engineer Voxeo Support |
|
personetics
|
|
| Hi
Well unfortunately the submit did not work for me, also when using the namelist vat. But : I find a work around (it is not a pretty site at all but it works :) When I writing this line of xml code : <audio src="http://MyServer.com?action=startSession"/> It works ! It is not a recommended solution, and it has it's side effects. (e.g: if you return something - it will play a strange sound) Do you have any idea why the submit would not work and this line would? The problem is, I cant use it in the future cause I want to build my vxml dynamically on my server, e.g :Application starts --> getting root vxml --> user will choose an option --> POSTing result to myServer --> myServer returns a new vxml. In addition : I will really appreciate if you could send me a reference to a sample code or documentarians that shows how to get a new vxml from a server dynamically. Thank you Itay |
|
VoxeoGarret
|
|
| Hello,
There could be something incorrect with the submit when it is made, the best way to determine what the issue would be to see a set of the logs. The audio tag will play the audio file as long as you specify the correct path so it is more of the direct solution than a work around :). For the dynamic generation of the Vxml, are you looking to grab different files from your server pending on the choice of the user? If this is the case you can easily set a grammar that returns a specified path that later in your code you would use to do a submit or subdialog to a new Vxml example. Something along the lines of creating a grammar with: <item> philly <tag>out.F_1="New/Vxml/File/To/Execute.xml";</tag> </item> This can then be stored and referenced with the submit by using: <submit next="MyFile.vxml"/> Which would be the stored literal of the grammar output: <submit next="GrammarInterpretationVariable"/> Regards, Garrett King Customer Support Engineer Voxeo Corporation |
|
baber
|
|
| Hello there,
I want to submit caller id to the restful service directly, here is what i am trying to do http://MyserviceAddress/service.svc/IntiateApp/{Callerid} this is the service address now here is fun part <submit next="http://MyserviceAddress/service.svc/IntiateApp" namelist="CallerID" method="get"/> which is clearly not working |
|
voxeoJeffK
|
|
| Hello,
In the <submit> use the expr attribute instead of next: <submit expr="'http://MyserviceAddress/service.svc/IntiateApp/' + CallerID" method="get"/> Regards, Jeff Kustermann Voxeo Corporation |
|
mababneh
|
|
| Hi,
I am using <submit> to pass values from one jsp server side to another jsp. The first one uses a loop to get <field> input from the user and when <filled> is supposed to <submit> the value to the second for more processing. In my case saving to a file. The problem is that when the first <submit> happens and the second jsp executes successfully, the dialogue terminates and it doesn't return back to the first to continue entry of values and then processing more entries. I'll appreciate your help fixing this. mababneh |
|
VoxeoErnest
|
|
| Hello,
Thanks for contacting Voxeo Customer Support. It's somewhat difficult to completely understand what issues you're having with server side programming based solely on the information you've provided. All of your account's applications appear to have been constructed using Voxeo Designer. Please clarify if this is a new or existing named application. We'd also like to review the full construct of the server side and application programming thru text file(s) attached to your response if possible. If you could create a separate customer support ticket through your account that would be greatly appreciated. We are standing by to help you resolve this issue. Best regards, Ernest Munoz [b]Customer Support Engineer[/b] US Support support@voxeo.com [image=http://www.voxeo.com/images/top/logo.gif /] |
| login |