| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
</vxml>
<field> tag. But this does not necessarily have to be the case. Beneath our <form> tag, we can also use a <block> structure if we want to give basic menu prompts:
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
</form>
<block> or the <field> then non-tagged text is read as TTS. Make sense? <prompt> tag about, and why are we telling the VoiceXML server not to allow "barging in"? This tag is indeed familiar, as we have used it in previous tutorials, but so far, we haven't really explained it. Why, you ask? We like building up suspense, that's why. By default, you can always interrupt audio files or text-to-speech, but sometimes you will want your callers/listeners to hear the entire prompt. To veteran users of an application this can be annoying (because they know how navigate through the menus already), but knowing this attribute gives you greater control over how your prompts will behave.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<link next="#MainMenu">
<grammar type="text/gsl">[main back begin]</grammar>
</link>
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
<field name="MeatOrPlant">
<prompt>
Are you a Carnivore or Vegetarian.
</prompt>
<grammar type="text/gsl">
<![CDATA[[
[vegetarian plant veggie] {<MeatOrPlant "plant">}
[meat carnivore flesh animal] {<MeatOrPlant "meat">}
]]]>
</grammar>
</field>
</form>
<form id="Meat">
<field name="MeatOrPlant">
<prompt>
PETA is coming for you, be afraid.
If you wish to try again, please say Main.
</prompt>
</field>
</form>
<form id="Plant">
<field name="MeatOrPlant">
<prompt>
Protein is the spawn of the devil.
If you wish to try again, please say Main.
</prompt>
</field>
</form>
</vxml>
<link> tag? The <link> element works like a globally scoped grammar, meaning that the grammars nested within it will be active in any voice reco field in the document. By comparison, the other grammars will only be active within their enclosing voice reco fields. Using a <link> allows an easy way for us to allow for a 'top-level' grammar that contains common commands such as 'go back', 'repeat', etc. You will note that both 'BackToMain' fields below do not have any local grammars within them, right? The reason for this, (in case you haven't figured this out already), is that they will be using our <link> grammars.<field> than it does within the <link>, in that there is this funky CDATA stuff enclosing the utterances. This quasi-element is used to escape the non-parseable characters that we have in the grammar. As the <field> grammar defines explicit slots, (unlike the <link> grammars), then enclosing these characters('<', and '{' ), is required for any and all grammars that define slot values.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<link next="#MainMenu">
<grammar type="text/gsl">[main back begin]</grammar>
</link>
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
<field name="MeatOrPlant">
<prompt>
Are you a Carnivore or Vegetarian.
</prompt>
<grammar type="text/gsl">
<![CDATA[[
[vegetarian plant veggie] {<MeatOrPlant "plant">}
[meat carnivore flesh animal] {<MeatOrPlant "meat">}
]]]>
</grammar>
<noinput>
<prompt>
I did not hear anything. Please try again.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt>
I did not recognize that lifestyle choice. Please try again.
</prompt>
<reprompt/>
</nomatch>
</field>
<filled>
<if cond="MeatOrPlant == 'meat'">
<elseif cond="MeatOrPlant == 'plant'"/>
</if>
</filled>
</form>
<form id="Meat">
<field name="BackToMain">
<prompt>
PETA is coming for you, be afraid.
If you wish to try again, please say Main.
</prompt>
</field>
<filled>
<!-- no way this will get hit -->
</filled>
</form>
<form id="Plant">
<field name="BackToMain">
<prompt>
Protein is the spawn of the devil.
If you wish to try again, please say Main.
</prompt>
</field>
<filled>
<!-- no way this will get hit -->
</filled>
</form>
</vxml>
<goto>. Notice that the location of the <goto> is the same name as the id attribute of your various <form> tags; this is important. Also note that within our "meat" and "plant" fields, that there isn't any navigation specified when someone says "Main". Remember, our <link> grammars take care of this, and as such, we don't need redundant code within these form-items. However, we DO need to have these defined as voice recognition <fields>, otherwise, the interpreter wouldn't be listening for any input at all. This is why we don't have "Meat" and "plant" defined as a <block>, and also explains why these form-items do not have local grammars defined :
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<link next="#MainMenu">
<grammar type="text/gsl">[main back begin]</grammar>
</link>
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
<field name="MeatOrPlant">
<prompt>
Are you a "Carnivore" or "Vegetarian".
</prompt>
<grammar type="text/gsl">
<![CDATA[[
[vegetarian plant veggie] {<MeatOrPlant "plant">}
[meat carnivore flesh animal] {<MeatOrPlant "meat">}
]]]>
</grammar>
<noinput>
<prompt>
I did not hear anything. Please try again.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt>
I did not recognize that lifestyle choice. Please try again.
</prompt>
<reprompt/>
</nomatch>
</field>
<filled>
<if cond="MeatOrPlant == 'meat'">
<goto next="#Meat"/>
<elseif cond="MeatOrPlant == 'plant'"/>
<goto next="#Plant"/>
</if>
</filled>
</form>
<form id="Meat">
<field name="BackToMain">
<prompt>
PETA is coming for you, be afraid.
If you wish to try again, please say Main.
</prompt>
</field>
<filled>
<!-- no way this will get hit -->
</filled>
</form>
<form id="Plant">
<field name="BackToMain">
<prompt>
Protein is the spawn of the devil.
If you wish to try again, please say "Main".
</prompt>
</field>
<filled>
<!-- no way this will get hit -->
</filled>
</form>
</vxml>
<prompt> tags to make menus<link> element. | ANNOTATIONS: EXISTING POSTS |
anujsharma
|
|
| In Step 3, within the first <form> and <field> tags, it should be </prompt> over the inline grammar declaration - Line 19! | |
MattHenry
|
|
| Hi there,
Actually, the order of elements listed within the <field> does not matter at all; <prompt> can precede <grammar>, and can even precede the <filled> if you wanted to code it like this. VoiceXML does not work from the 'top-to-bottom', but rather execution is dictated by the Form Interpretation Algorithm. Check the below w3c link for clarification on this point: http://www.w3.org/TR/voicexml20/#dml2.1.6 ~Matt |
|
anujsharma
|
|
| Where is the ending tag </prompt> for the first <prompt> tag?
Is second <prompt> tag really necessary? What's its significance in this example? |
|
MattHenry
|
|
| I'm sorry, but I dont undersand your question. Can you provide some specific details as to this inquiry? I don't know *which* prompt that you are speaking of.......
~Matt |
|
anujsharma
|
|
| Please clarify the role of both the <prompt> tags in the following:
<field name="MeatOrPlant"> <prompt> Are you a Carnivore or Vegetarian. <prompt> <grammar type="text/gsl"> <![CDATA[[ [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> </field> |
|
MattHenry
|
|
| Anuj,
That's a simple typo, which i have rectified on my end. The second instance should be a closing tag, ie: <prompt> Are you a Carnivore or Vegetarian. </prompt> ~ Matt |
|
dgranville
|
|
| <grammar type="text/gsl">
<![CDATA[[ [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> Prior to this example in the tutorial, there hasn't been any discussion of what "CDATA" is nor what what the use of braces "{}" and angle brackets "<>" are for. (Sorry, if it's an obvious XML feature--I'm an HTML guy). |
|
ShaneSmith
|
|
| dgranville,
CDATA is used to escape XML characters that usually would cause a parse error. It's a good idea to use this when using inline grammars, especially if they are generated from a server-side language dynamically. You can check to make sure your documents parse by opening up the page in your web browser (Internet Explorer) and checking for parse errors. Hope that helps. -Shane Smith -Voxeo Corporation |
|
dgeiregat
|
|
| Hello,
2 questions which are maybe answered later in the tutorial. They have to do with the behaviour to the prompts played in <form id="Meat"> or <form id="Plant">. 1) if one remains silent, a timeout mechanism is triggered although not coded for explicitly; same is true if one says something out-of-grammar. Is there some in-built, default functionality for silence and misrecognitions? 2) saying 'back' or 'begin' is valid since belonging to the 'link' grammar. But why does the condition <if cond="BackToMain == 'main'"> evaluate to true if one says 'back' or 'begin' ? (and it works!) I understand the code if one says 'main'. Regards, Dirk |
|
MattHenry
|
|
| Hiya Dirk,
Allow me to clear this up for you: 1) The platform does supply default handlers for Nomatch/Noinput events if left unspecified by the developer; check the spec at: http://www.w3.org/TR/voicexml20/#dml5.2.5 2) I can understand your confusion; the conditional statements within <form id="Meat/Plant"> are remnants of an older code version, where a form-level grammar was used in favor of a <link>. Note that these conditional statements are NOT hit upon an utterance of 'main'; the link grammars take care of this entirely. In any case, i have removed these conditionals from the docs, which should be reflected within the next day or two. Sorry if this caused any head-scratching. =) ~Matt |
|
DaveMorris
|
|
| I'm confused about when to use block, when to use prompt, and when not to use one or the other. For instance in the Step 4 example, the nomatch and noinput responses are not surrounded by prompt tags. In the Step 5 example they are. I have some scripts that seem to want to hang up on me even though they are supposed to be speaking and transferring to other forms, and I suspect it has something to do with my confusion about the prompt tag and what it implies. Does the prompt tag require a response from the caller, or does it just mean "speak this". And if so, what happens if you just omit the prompt tag and put text in a block tag?
Thanks, Dave |
|
MattHenry
|
|
|
Hiya Dave, It appears as if I am fully "busted" for sloppy coding in the tutorials. =^D Step 4 is in need of some correction, in terms of Best Practices: When nesting TTS output in a form item, (such as a block, or field), any platform will usually err on the side of caution, and will render it to the caller as expected. However, it's always best to be compliant to the spec for portability reasons, as my attention to detail in this case clearly lacks, (ha-ha). So sorry about the confusion, and thanks for pointing out this errata; I'll post a correction shortly. Regards, ~Matthew Henry |
|
bericson
|
|
| Within <form id="Meat/Plant">, I'm a bit confused by the purpose/intent of the <field name="BackToMain">. Could you explain that please?
And is the reason the two <filled> tags will not get hit because there is no grammar specified there? Thanks. |
|
MattHenry
|
|
|
Hi there, This is kind of explained in the paragraph just before step 5. In short, we need to have an active reco field within a form in order to make the global <link> grammars active. And you are correct, those <filled> statements will never be executed, as they have no grammar active within them. ~Matt |
|
gregzh
|
|
| Hi
I tried this, always get failed, say "internal error in the script...", Could someone help to check this? I copied the whole script from this tutorial actually. <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <link next="MainMenu"> <grammar type="text/gsl"> [main back again begin]</grammar> </link> <form id="MainMenu"> <block> <prompt bargein="false"> Hello World. This is greg, the first telephone application. Date is May 7, 2006. </prompt> </block> <field name="MeatOrPlant"> <prompt> Are you a carnivore or Vegetarian. </prompt> <grammar type="text/gsl"> <![CDATA[[ [vegetarian plant veggie number] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> </field> <filled> <if cond="MeatOrPlant == 'meat'"> <goto next="#Meat"/> <elseif cond="MearOrPlant == 'plant'"/> <goto next="#Plant"/> </if> </filled> </form> <form if="Meat"> <field name="BackToMain"> <prompt> Protein is the spawn of the devil. If you wish to try again, please say "Main". </prompt> </field> </form> </vxml> |
|
gregzh
|
|
| Hi Matt,
Here is the output in the debugger, for my problem. There is the red color error, but don't know what is the reason. Thanks. Greg ===== 02525 6a86 06:48:20 AM 06:48:20.540: Fetch thread 13579: Failed fetch of URL: http://webhosting.voxeo.net/17840/www/MainMenu. com.mot.icsd.voxml.core.VoiceException: Failed fetch with code: 404 (Not Found), URL: http://webhosting.voxeo.net/17840/www/MainMenu 02526 6a86 06:48:20 AM 06:48:20.540: <perf type="fetch" value="0ms"> http://webhosting.voxeo.net/17840/www/MainMenu 0 bytes </perf> 02527 6a86 06:48:20 AM 06:48:20.556: ECMAScript pseudo-evaluating: dialog = new Object(); 02528 6a86 06:48:20 AM 06:48:20.556: ==> [object Object] 02529 6a86 06:48:20 AM 06:48:20.556: ECMAScript pseudo-evaluating: application = new Object(); 02530 6a86 06:48:20 AM 06:48:20.556: ==> [object Object] 02531 6a86 06:48:20 AM 06:48:20.556: VEC::getCallingNumber(): Calling Number is [gregzhang] 02532 6a86 06:48:20 AM 06:48:20.556: VEC::getCalledNumber(): Called Number is [9990026293] 02533 6a86 06:48:20 AM 06:48:20.556: =========================== An error occurred while executing the following dialog. Initial URL: file:///c:/nuance/callrouting/motnewcall.vxml Current URL: http://webhosting.voxeo.net/17840/www/hello1.xml [click on link for full URL] Calling Number (ANI): gregzhang Called Number (DNIS): 9990026293 Redirecting Number (RDNIS): "" State: MainMenu VoxGateway Version: Load 129 (30 June 2005) Date/Time: 2006/5/8 6:48:20.556 VoiceException: error.badfetch.http.404 Failed fetch with code: 404 (Not Found), URL: http://webhosting.voxeo.net/17840/www/MainMenu Dialog stack trace: State (Dialog) URL (Document) -------------- ------------------------------ MainMenu http://webhosting.voxeo.net/17840/www/hello1.xml?session.calledid=9990026293&session.connection.local.uri=9990026293&session.parentsessionid=6776ddbe4143e9912c3396e6b8aa6a86&session.sessionid=6776ddbe4143e9912c3396e6b8aa6a86&session.connection.remote.uri=gregzhang&session.callerid=gregzhang 02534 6a86 06:48:20 AM 06:48:20.556: JSCEC::getDefaultLocale(): Returning lang=en-US 02535 6a86 06:48:20 AM 06:48:20.556: JSCEC::stopClip(): stopClip called 02536 6a86 06:48:20 AM 06:48:20.556: Grammar is of type [application/x-builtin] 02537 6a86 06:48:20 AM 06:48:20.556: JSCEC::getDefaultLocale(): Returning lang=en-US 02538 6a86 06:48:20 AM 06:48:20.556: JSCEC::setCurrentGrammarLocale(): Setting locale=en-US 02539 6a86 06:48:20 AM 06:48:20.556: Attempting to install as GSL 02540 6a86 06:48:20 AM 06:48:20.556: Grammar src: builtin://.VMLNull-en-US 02541 6a86 06:48:20 AM 06:48:20.556: Grammar: builtin://.VMLNull-en-US 02542 6a86 06:48:20 AM 06:48:20.556: JSCEC::setCurrentGrammarLocale(): Setting locale=null 02543 6a86 06:48:20 AM 06:48:20.556: behavior.calllog.STATE = MainMenu 02544 6a86 06:48:20 AM 06:48:20.556: behavior.calllog.GRAMMAR = builtin://.VMLNull-en-US 02545 6a86 06:48:20 AM 06:48:20.556: Setting client.InputModes=voice,dtmf 02546 6a86 06:48:20 AM 06:48:20.634: HexString [ 0x0054|0x0068|0x0061|0x0074|0x0020|0x0063|0x006F|0x006E|0x0074|0x0065|0x006E|0x0074| 0x0020|0x0069|0x0073|0x0020|0x006E|0x006F|0x0074|0x0020|0x0061|0x0076|0x0061|0x0069|0x006C| 0x0061|0x0062|0x006C|0x0065|0x0020|0x0061|0x0074|0x0020|0x0074|0x0068|0x0069|0x0073|0x0020| 0x0074|0x0069|0x006D|0x0065|0x002E|0x0020|0x0049|0x0020|0x0063|0x006F|0x0075|0x006C|0x0064| 0x006E|0x0027|0x0074|0x0020|0x0066|0x0069|0x006E|0x0064|0x0020|0x0061|0x0020|0x0077|0x0065| 0x0062|0x0020|0x0070|0x0061|0x0067|0x0065|0x002E| ] 02547 6a86 06:48:20 AM 06:48:20.634: DecString [ 84|104|97|116|32|99|111|110|116|101|110|116|32|105|115|32|110|111|116|32|97|118| 97|105|108|97|98|108|101|32|97|116|32|116|104|105|115|32|116|105|109|101|46|32|73| 32|99|111|117|108|100|110|39|116|32|102|105|110|100|32|97|32|119|101|98|32|112|97| 103|101|46| ] 02548 6a86 06:48:20 AM 06:48:20.634: TEXT:[That content is not available at this time. I couldn't find a web page.] 02549 6a86 06:48:20 AM 06:48:20.634: Listen: entering recognize with to=1 02550 6a86 06:48:20 AM 06:48:20.634: recognize: Entering method with bargein=false and timeout=1 02551 6a86 06:48:20 AM 06:48:20.634: playAndRecognize with [.VMLNull-en-US] bargein [false] timeout [1] 02552 6a86 06:48:27 AM 06:48:27.478: recognize: leaving method with result={ dtype=17 type="NO_SPEECH_TIMEOUT" results=[{ dtype=10 text="<timeout>" probability=1 confidence=100 confidenceWithoutFiller=0 wordConfidences=[] interp=[] }] textRecresult="" numFrames=0 firstPassRecognizerInfo="" secondPassRecognizerInfo="" } 02553 6a86 06:48:27 AM 06:48:27.478: Handling ASR 02554 6a86 06:48:27 AM 06:48:27.478: There were [1] possible results 02555 6a86 06:48:27 AM 06:48:27.478: Caught a VoiceException NOSPEECH 02556 6a86 06:48:27 AM 06:48:27.478: ECMAScript evaluating: __ese=__es.pop(); 02557 6a86 06:48:27 AM 06:48:27.478: ==> [object Object] [0ms/0ms 4516 chars] 02558 6a86 06:48:27 AM 06:48:27.478: VEC::close(): Return Variables are: errorReason=Failed+fetch+with+code%3A+404+%28Not+Found%29%2C%0A++++URL%3A+http%3A%2F%2Fwebhosting.voxeo.net%2F17840%2Fwww%2FMainMenu 02559 6a86 06:48:27 AM 06:48:27.494: __AphroditeMsg__: state: terminated 02560 6a86 06:48:27 AM 06:48:27.494: VEC::close() CALL_END: sessionID=6776ddbe4143e9912c3396e6b8aa6a86 parentSessionID=6776ddbe4143e9912c3396e6b8aa6a86 callStartTime=1147070883712 callEndTime=1147070907494 accountID=17840 appID=39655 callType=0 callerID=gregzhang calledID=9990026293 mainURL=http://webhosting.voxeo.net/17840/www/hello1.xml featureFlags=0 calllength=23782 02561 6a86 06:48:27 AM 06:48:27.494: hanging up... 02562 6a86 06:48:27 AM 06:48:27.509: hung up... 02563 6a86 06:48:27 AM 06:48:27.509: URLFetcher::close(): Close exiting... |
|
mikethompson
|
|
| Hey Greg,
Looking at the logs, this is simply a failed fetch from the browser. And to verify, I attempted pulling the following link up in my browser as well: http://webhosting.voxeo.net/17840/www/MainMenu This directory does not actually exist. You'll want to map your application directly to the document URL. When taking a look at your account I noticed the document you were trying to reach is: http://webhosting.voxeo.net/17840/www/hello1.xml simply replace the current URL with the suggest new URL (your xml document) and all should be well. Regards, Mike Thompson Voxeo Extreme Support |
|
bon_thanh
|
|
| Hello,
The following is taken from tbe paragraph directly above Step 5: "However, we DO need to have these defined as voice recognition <fields>, otherwise, the interpreter wouldn't be listening for any input at all. This is why we don't have "Meat" and "plant" defined as a <block>,..." I don't understand this explanation. Bonnie |
|
MattHenry
|
|
|
Bonnie, Sorry for any confusion. To be totally, clear, let's take a look at two examples: -- EX 1: working example -- <link next="#MainMenu"> <grammar type="text/gsl">[main back begin]</grammar> </link> <form id="MainMenu"> [b]<!-- our link grammar will be active here -->[/b] <field name="MeatOrPlant"> <prompt> Are you a Carnivore or Vegetarian. </prompt> </field> </form> -- EX 2: non-working example -- <link next="#MainMenu"> <grammar type="text/gsl">[main back begin]</grammar> </link> <form id="MainMenu"> [b]<!-- our link grammar will NOT be active here -->[/b] <block> <prompt> Are you a Carnivore or Vegetarian. </prompt> </block> </form> In short, if a document doesn't have a voice reco <field> present, then no <link> grammars that are defined will work, as the interpreter needs to be listening for input in the first place. In the second example, there is only form/block/prompt, which will not listen for input at all. ~Matt |
|
ynkrish
|
|
| Hi,
There is a small spelling mistake in the first para, solme should be changed to some :) cheers krish |
|
ynkrish
|
|
| hi,
One more small correction, the first example vxml present in step3 lacks a </vxml> tag. cheers krish |
|
MattHenry
|
|
|
Good catch! I'll have this corrected shortly. Thanks again for noticing this. ~Matt |
|
subhar
|
|
| Hello,
In Step 3: Creating our initial script I am prompted the following ARE you CARNIVORE or VEGETARIAN ? i am saying Vegetarian here but its not going to MeatorPlant =='Plant' Can you help me |
|
voxeojeff
|
|
| Hi there,
In order for us to diagnose the issue here, we're going to need to see the script you are using. Can you provide us with your vxml code that is not working correctly? Thank you, Jeff Menkel Voxeo Corporation |
|
archie172
|
|
| I'm confused by the behavior of the <link> tag in the script below. I would expect that when I say "info" it jumps to the "cid" block and tells me caller ID information. Instead, it says "Thank you. Now initiating nuclear attack on info" even though "info" is not one of the countries listed.
I understand that it recognizes "info" because of the global <link> tag, but I don't understand why it then fills in the field and executes the <filled> tag instead of jumping immediately out of the field and into the "cid" form tag. This seems contrary to http://www.w3.org/TR/voicexml20/#dml2.1.6.2.3 Thanks. <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <link next="#cid"> <grammar type="text/gsl">[info]</grammar> </link> <form id="norad"> <block> <prompt> Hello, you have reached Norad, the control center for the nuclear arsenal of the United States. </prompt> </block> <field name="country"> Please say the country you wish to bomb. <grammar type="text/gsl"> [(north korea) iran iraq russia antartica canada mexico france [england (great britain)] norway sweden italy lebanon libya] </grammar> </field> <noinput> Don't be shy. Just say the name of the country you want us to nuke back to the stone age. <reprompt/> </noinput> <nomatch> I did not recognize that country. Please try again. <reprompt/> </nomatch> <filled namelist="country"> <prompt> Thank you. Now initiating nuclear attack on <value expr="country"/>. </prompt> <exit/> </filled> </form> <form id="cid"> <block> <prompt> caller i d is: <say-as interpret-as="telephone"> <value expr="session.callerid"/> </say-as> called i d is: <say-as interpret-as="telephone"> <value expr="session.calledid"/> </say-as> </prompt> </block> <exit/> </form> </vxml> |
|
VoxeoDustin
|
|
| Hey Archie,
This is a bug that has been addressed and fixed in Prophecy 8 which is available as a free download at http://www.voxeo.com/prophecy/ . It will also be available on our staging platform in the near future. -Dustin |
|
jpw
|
|
| Why is it in this example, if you don't say anything, it continually acts like you chose carnivore, over and over. Eg, it never hangs up, or times out. | |
voxeojeff
|
|
| Hello jpw,
If the user doesn't say anything, then the <noinput> handler should be executed and then the user should be prompted again: <noinput> <prompt> I did not hear anything. Please try again. </prompt> <reprompt/> </noinput> That being said, if this is not the behavior you are experiencing, then please go ahead and submit a private account ticket, with some debugger logs illustrating this issue, along with the code you're using. Specifically, 1) Open the debugger window, (Account => Application Debugger) 2) Call the application, and reproduce the error 3) Click the 'support' tab in the debugger 4) Note any pertinent line numbers in the output that we should focus our attention on Regards, Jeff |
|
danlamb
|
|
| Is there anyway to have variables persist.
For example, In my first form I set: <assign name="deviceName" expr="F_1"/> But then in my second form, I can't do this: <value expr="deviceName"/> I tried using appplication.deviceName, but that did not seem to work either... is the only workaround to use the submit form functionality, or is there another way to maintain variables? |
|
voxeojeremyr
|
|
| Hi danlamb,
Yes, there is a way to make variables persist. It all has do with variable scoping. The key to this is where you define them. If you define or declare them in a form then they will only be available in that form. If however you declare them above that form, say at the document level, they will be available to the entire document. Here is an example of a document scoped variable: <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <var name="tempVar" expr="15"/> <form> <block> <prompt> Hello World. This is my first telephone application. </prompt> </block> </form> </vxml> You can find more information on variable scope here: http://docs.voxeo.com/voicexml/2.0/ Hope this helps, Jeremy Richmond Voxeo Support |
| login |
|