VoiceXML 2.1 Development GuideHome  |  Frameset Home


<field>  element

The field element facilitates a dialog which allows the interpreter to collect information from the user. Caller utterances are matched against any active grammars, until the element’s filled condition is executed.


usage
<field cond="CDATA" expr="CDATA" modal="(true|false)" name="NMTOKEN" slot="NMTOKEN" type="CDATA">


attributes
condData Type: CDATADefault: Optional (true)
The cond attribute specifies a Boolean expression, which must equate to ‘true’ in order for the content to be visited and executed. (Additionally, the expr attribute must also be set to ‘undefined’, see below).
exprData Type: CDATADefault: Optional
The expr attribute specifies the initial value of  the element; if this value is ‘undefined’, (default), then the element will be visited by the FIA and executed. If  this attribute has a  value other than ‘undefined’, then the element will not be visited until explicitly set to 'undefined', by use of the clear element.
modalData Type: (true|false)Default: Optional (false)
The modal attribute is a Boolean value that allows fine grained control of active grammars within the field. When the modal attribute is set to false (default), then all higher scoped grammars are enabled, (i.e., form-level document/dialog scoped grammars) while a user is within the field.  If the modal attribute is set to true, then only field grammars are enabled and all other grammars are temporarily disabled.
nameData Type: NMTOKENDefault: Optional
The name attribute defines the ECMAScript variable name that declares the field-item variable for the dialog. A successful grammar recognition will hold the resultant value in this namespace when executing any filled elements. Each field name within a document must be unique, else a fatal error.badfetch will be thrown.
slotData Type: NMTOKENDefault: Optional (defaults to <i>field</i> name if unspecified)
The slot attribute specifies the name of a grammar slot which is used to populate the field item variable. If no value is specified, then the interpreter will assume it to be the same as the field name. The slot attribute allows the developer to reuse slot/value grammar constructs in multiple fields whose names differ from one another.See the grammar documentation for further information.
typeData Type: CDATADefault: Optional
The type attribute can specify any of the platform-defined built-in grammars. The Nuance browser offers support for all built-in grammars defined in the w3c specification. Note that no additional grammar constructs are needed within the field when a built-in type is specified, although any document or dialog scoped grammars will still be considered active. See the documentation for the built in grammars for further information.



shadow variables
none


parents
<form>


children
<audio> <catch> <enumerate> <error> <filled> <grammar> <help> <link> <noinput> <nomatch> <option> <prompt> <property> <value>


code samples
<Field cond-expr> sample
<?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">

  <field name="F_1" expr="'SomeValue'" cond="false">
    <grammar type="text/gsl">[garbage]</grammar>
    <prompt>
      note that the expression is NOT set to undefined,
      and the condition is set to false. therefore,  this
      field will never be visited
    </prompt>
  </field>

  <field name="F_2" expr="" cond="false">
    <grammar type="text/gsl">[garbage]</grammar>
    <prompt>
      since the condition is set to false,
      this field will never be visited
    </prompt>
  </field>

  <field name="F_3" cond="true" expr="">
    <grammar type="text/gsl">[garbage]</grammar>
    <prompt>
      note that the expression is set to undefined,
      and the condition is set to true. Therefore, this
      field will be visited. You may now say garbage with
      impunity.
    </prompt>
  </field>

  <filled namelist="F_3">
    <prompt> you said garbage, potty mouth </prompt>
  </filled>

</form>

</vxml>


<Field modal> sample
<?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">

  <grammar type="text/gsl">
    <![CDATA[
                  [estrada]          {<F_1 "estrada">}
    ]]>
  </grammar>

  <field name="F_1" modal="false">
    <grammar type="text/gsl"> [( garbage dckegewvbd)] </grammar>
    <prompt> try saying estrada here. </prompt>

    <filled>
      <prompt> very good </prompt>
    </filled>
  </field>

  <field name="F_2" modal="true">
    <grammar type="text/gsl">[garbage] </grammar>
    <prompt>
      try saying estrada here. when that doesnt
      work, try saying garbage.
    </prompt>

      <filled>
        <prompt> bravo!</prompt>
      </filled>
    </field>

</form>

</vxml>


<Field type> sample
<?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">
<!-- ***************************************************************** -->
<!-- for purposes of simplicity, we will use the built-in boolean type -->
<!-- note that no grammar construct is needed -->
<!-- ***************************************************************** -->

  <field name="F_1" type="boolean">
    <prompt> say yes or no here to test the built in boolean grammar </prompt>

      <filled>
        <prompt> you said <value expr="F_1"/>. </prompt>
      </filled>
  </field>

</form>

</vxml>

<Grammar.gsl> sample
;GSL2.0
MYRULE [

[moe]          {<MySlot "moe">}
[larry]        {<MySlot "larry">}
[curley]        {<MySlot "curley">}
]

<Field slot> sample
<?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">

  <field name="F_1" slot="MySlot">
    <grammar src="Grammar.gsl#MYRULE"/> 
    <prompt> who is the coolest of the three stooges? </prompt>

      <filled>
        <prompt>you said <value expr="F_1"/> </prompt>
      </filled>
  </field>


  <field name="F_2" slot="MySlot">
    <grammar src="Grammar.gsl#MYRULE" type="text/gsl"/> 
    <prompt> who is the lamest of the three stooges? </prompt>

    <filled>
      <prompt>you said <value expr="F_2"/> </prompt>
    </filled>
  </field>

</form>
</vxml>



additional links
W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
moshe
6/7/2004 6:50 PM (EDT)
If you accidentally use

<field id="something>  <!-- wrong!!! -->

instead of the attribute "name":

1. The compiler won't complain
2. <filled> will never be hit

Beware!
grvshr
5/27/2005 1:29 AM (EDT)
Hi

I have used the above samples, it prompts the sentence within <prompt> tag
but then the call hangs up.....i m sending you the last few lines....

Call Terminated on Resource 2.
05/27/05 10:59:29, Resource #2: TranID 9.  Returned resource..
05/27/05 10:59:29, Resource #2: exit_element got "0"
05/27/05 10:59:29, Resource #2: GV_VXML::exit_element()
05/27/05 10:59:29, Resource #2: GV_VXML::executable_element - 15
05/27/05 10:59:29, Resource #2: GV_VXML::execute_content()
05/27/05 10:59:29, Resource #2: GV_VXML::DoEvent(telephone.disconnect.hangup)
05/27/05 10:59:29, Resource #2: GV_VXML::RunInnerLoop - got exception: telephone.disconnect.hangup
05/27/05 10:59:29, Resource #2: TranID 6 completed..
05/27/05 10:59:24, Resource #2: Playing queued segments.  TranID 5.
05/27/05 10:59:24, Resource #2: PromptManager::Play()
05/27/05 10:59:24, Resource #2: GV_VXML::do_recognition()
05/27/05 10:59:24, Resource #2: GrammarManager::EnableGrammar(038C0C78)


Pls guide me....
Thanks!
MattHenry
5/27/2005 11:37 AM (EDT)
Hello grvshr,

As these logs are quite obviously from another platform, I would have no way of deciphering them at all. I can say that the sample code that is listed in our documentaion set does work fine on the Voxeo platform.

I suspect that the getVocal platform is likely not a vxml compliance certified platform, which can cause problems when migrating code:

http://www.voicexml.org/platform_certification/certified_platforms.html

If you'd like to try this code on the Voxeo network, and send us in some specific code details, i would be happy to assist, however.


~Matt
el_oso
12/11/2006 2:54 AM (EST)
Well, I am using the voxeo platform and I have a similar problem as grvshr.

My code just hangs up, and the catch or filled sections are ignored. Could someone point me in the right direction?
Here is the code:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<form id="orderNumber">

  <field name="ordernum" type="digits?length=5">
 
    <prompt>
      <audio src="wavs/please_enter.wav"/>
      <audio src="wavs/5.wav"/>
      <audio src="wavs/digit.wav"/>
      <audio src="wavs/refnum.wav"/>
    </prompt>

   
    <catch event="noinput">
      <prompt>
        <audio src="wavs/noinput_msg.wav"/>
      </prompt>
      <reprompt/>
    </catch>
   
    <catch event="nomatch">
      <prompt>
        <audio src="wavs/noinput_msg.wav"/>

      </prompt>
      <reprompt/>
    </catch>
   
   
    <filled  mode="all">
      <prompt>
        <audio src="wavs/repeat_ref_msg.wav"/>
      <say-as interpret-as="number" format="digits"><value expr="ordernum" /></say-as>.
      </prompt>
      <submit next="playagain.php" method="post" namelist="ordernum"/>

    </filled>
  </field>
</form>
</vxml>


Thanks,
Jorge
mikethompson
12/11/2006 3:04 AM (EST)
Hi Jorge,

At a glance, I can't see anything wrong with your script.  However, real time debugger logs would be extremely helpful to troubleshoot this issue.  All you need to do is call into your application with the real-time debugger window open.  When you are able to reproduce the error and capture the logging for it, please submit the results to us via the "support" tab at the top of the debugger page.  With this in hand, we will be able to troubleshoot much more effectively.

Best,
Mike Thompson
Voxeo Corporation
sdriscoll
12/20/2006 9:16 PM (EST)
Hey there,
Is there a built in grammer for decimal numbers?
e.g I worked 5.4 hours today

Well I probably didn't even really work that much, having too much fun with this voicexml thing but hey, don't tell my boss.

Thanks,
Simon
VoxeoTony
12/21/2006 12:16 AM (EST)
Hello Simon,

While we do not have built in grammars for decimals at this time, we do have samples of other grammar types that can be modified to suit your needs.  On the evolution site you will see the link to http://evolution.voxeo.com/library/grammar/library.jsp this zip file contains a few sample grammars that will enable you to tweak, or at least give reference in creating your own grammar.

We hope this helps.


Regards,

Tony
8625304
1/15/2007 8:09 AM (EST)
Hi,

I am using following script to prompt user input. But its not working. Please guide me.

<?xml version="1.0"?>
<vxml version = "2.1">

<form id="guessNumber">
<field name="guess">
      <prompt>
        Please Enter a Number.
      </prompt>

      <noinput>
      <prompt>
        I did not hear you. Please try again.
      </prompt>
      <reprompt/>
      </noinput>

      <nomatch>
      <prompt>
        Is that a number? Please try again.
      </prompt>
      <reprompt/>
      </nomatch>

    </field>
    <filled namelist="guess" mode="all">
      <prompt>
        You said <value expr="guess" />.
      </prompt>
      <exit />
    </filled>
  </form>
</vxml>

8625304
1/15/2007 8:24 AM (EST)
Hi,

I need to take dtmf-star and dtmf-pound inputs from user.
Can you recommend, which field type i should take?

I also need to make a functionality in which during the questionnaire (on different levels), at any time user can press pound key to <reprompt> (on sub level menu) questions again or Press the star key to restart from top level menu.

Suggest me a good option.

please guide me.

Thanks.
jbassett
1/15/2007 10:18 AM (EST)
Hello,

The reason that it is not working, is that you would need come type of grammar to accept input from a user. In your case, you have no field type (built in grammars), and no grammar specified by tag. <grammar>

To choose the right field types I would reccomend reading the below link. It is a description of each field type and what it does.

http://docs.voxeo.com/voicexml/2.0/gslbuiltins.htm#start


Also, for jumping around to specific areas of your document, I would recommend getting familiar with the <goto> command. Found here http://docs.voxeo.com/voicexml/2.0/gslbuiltins.htm#start

Let me know if you have any questions after reading through these.

Thanks
Jesse Bassett
Voxeo Support
steve.richert
1/31/2007 11:04 AM (EST)
How do you test true/false for a boolean type field in its filled tag? Do you compare to 'yes' or to 'true' or what? Neither seem to work for me.

<field name="is_ready" type="boolean">
  <prompt>Are you ready?</prompt>
  <filled>
    <if cond="is_ready=='yes'">
      <prompt>Let's begin.</prompt>
    <else />
      <prompt>Okay. I'll wait.</prompt>
    </if>
  </filled>
</field>
MattHenry
1/31/2007 2:52 PM (EST)

In oder to test conditionals with the builtin "boolean" grammar, you do indeed test "true/false". However, you do it NOT as a string, (note: usage of the <log> statement for the lastresult$ return allows you to see exactly what any field returns. As such, I suggest the following in this case:

  <if cond="is_ready== true">

Note the lack of single quotes around the value of "true".

~Matt
danielvinson
3/15/2007 3:13 PM (EDT)
Hi

With the built in 'digits' grammar you can specify length.  Can you do this with letters and words?  My aim is to speed up response times.  Thanks

Regards

Daniel
MattHenry
3/15/2007 6:08 PM (EDT)


Daniel,

In order to do so, you would need to construct your own grammar, and specify that some rules are optional. For instance, assume the rulename "MY_ALPHA" will return one alphabetic character:


TOP_LEVEL_RULE [(
; 1-4 alpha characters
MY_ALPHA
?MY_ALPHA
?MY_ALPHA
?MY_ALPHA
)]

Check our subgrammar docs for additional information on this toopic.

Regards,

~Matthew henry
danielvinson
3/15/2007 8:42 PM (EDT)
Hi Matt

Thanks for your prompt reply.  I think I went a bit over the top asking about words of various length,  I'm more concerned about returning a single character.  Does this still require a top level rule or can I do something like so:

<field name="F_1" length=1>

Examples are much appreciated.

Regards

Daniel
jbassett
3/16/2007 7:42 AM (EDT)
Hi,

<field name="F_1" length=1> would not work as length is not an attribute of the field statement.

Just so everything is clear, you are trying to make an application that has a grammar that is looking to capture a single user utterance and assign a single letter value to it ? Could you please elaborate the exact logic behind your app ?

For instance are you trying to get the user to say a single letter and have it be recognized?

Thanks
Jesse Bassett
Voxeo Support
danielvinson
3/16/2007 2:22 PM (EDT)
.
gotnoname
6/25/2007 11:36 AM (EDT)
2 questions

1. How cand I find out how many dtmf entries the user makes in a response.

2.  Also I have a situation of the following:

<prompt>
Enter the stop id followed by the pound key.  If you don't know, press # and I'll list all the stops ids for you
</prompt>

How do I allow the user use the pound key as an input and also allow the user to use it as a term char?
voxeojeff
6/25/2007 7:25 PM (EDT)
Hi there,

Allow me to address your questions one at a time:

Q: How cand I find out how many dtmf entries the user makes in a response.

[b]A: Here is a simple VXML script which makes use of the String.length javascript property, which will allow you to count the number of DTMF entries:[/b]

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<form id="Form1">

  <field name="F_1" type="digits">

    <prompt>
      Please press some digits, then press pound.
    </prompt>

 
    <catch event="noinput">
      <prompt>
        I'm sorry, I didn't get that.
      </prompt>
      <reprompt/>
    </catch>
 
    <catch event="nomatch">
      <prompt>
        Was that a number?
      </prompt>
      <reprompt/>
    </catch>
 
 
    <filled>
      <prompt>
        Thank you.
      <say-as interpret-as="number" format="digits"><value expr="F_1" /></say-as>
      </prompt>
      <log expr="'Number of DTMF keypresses: ' + F_1.length"/>
    </filled>
  </field>
</form>
</vxml>


Q: Also I have a situation of the following:

<prompt>
Enter the stop id followed by the pound key.  If you don't know, press # and I'll list all the stops ids for you
</prompt>

How do I allow the user use the pound key as an input and also allow the user to use it as a term char?

[b]A: Unfortunately, this is not possible.  You simply cannot have the pound key as a DTMF input and the termchar.  For this, I would suggest changing the termchar property to something different, or changing the "press # and I'll list all stop ids" to "press * and I'll....".[/b]

Best regards,

Jeff Menkel
Voxeo Corporation
gotnoname
6/26/2007 11:30 AM (EDT)
can it be achieved by building a special grammar file?
Thanks for the above answer.
MattHenry
6/26/2007 3:09 PM (EDT)


You can certainly specify a grammar file that lists dtmf-pound as a valid input, but I don't think you can have it as both an input AND a termcharacter.


~Matt
lambchops7
7/17/2007 5:12 PM (EDT)
This code is not working for me.  It hangs up right from the beginning.  It hear the audio when I don't have
<field name="guess"> followed by </field>; but when I insert them in... (and I'm going to need them to receive input from the user) it hangs....Need some assistance

<?xml version="1.0" encoding = "UTF-8"?>
<vxml version="2.1">

<meta name="author" content="Manuel Lam"/>
<meta name="maintainer" content="manuel.lam@gmail.com"/>

<form>
<block>
<field name="guess">
    <grammar type="text/gsl">
        [one two three four five six seven eight nine]
    </grammar>

    <grammar type="text/gsl">
      [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9]
    </grammar>
  <prompt>
    <audio src="audio/1.wav">
  </audio>
  </prompt>
</field>
</block>
</form>
</vxml>
MattHenry
7/17/2007 5:16 PM (EDT)


Note that your <field> is enclosed within a <block>, which is not legal VXML. The ,field> element should be a child of the <form> element only.

Cheers,

~Matthew Henry
crishvi
4/11/2008 8:53 AM (EDT)
hello,
i need to ask about the time gap for the input.i.e, when the field is executed it waits for a time period before it collects the input.for example if i have a field element which takes in a pin code of type digits and say the length is 8 then after entering the 8 digit number it takes some time to execute the filled element.What i wanted to ask is can I alter this time gap?hope my question is clear.please respond asap!!!

Thnx
Rishvi
voxeojeff
4/11/2008 11:20 AM (EDT)
Hello Rishvi,

If you have something like  <field name="XXXXX" type="digits?length=8">, theoretically the filled processing time should be very minimal (~.25s).  You *can* alter this, if you wish, by manually setting the "completetimeout" property.  Per our VXML documentation,
[color=blue]
"The 'completetimeout' property specifies the length of time after a user utterance where the interpreter will consider the utterance complete. Changing the default value of '.25s' upwards offers more reliability in catching a user's complete utterance, at the cost of sacrificing response time. This property will only be active when set to a  lesser value than the incompletetimeout property."
[/color]
That being said, you may set this property by specifying <property name="completetimeout" value="?"/> where '?' is the value you specify.

Hope this helps,

Jeff
crishvi
4/17/2008 3:04 AM (EDT)
Thanx a ton for the quick reply.You guys are doing a gr8 job .

regards,
Rishvi.
crishvi
4/17/2008 3:14 AM (EDT)
Hi, This may sound stupid but where should i change this property?? U mentioned to alter this but where shoudl i do that?

Thanks,
Rishvi
voxeojeremyr
4/17/2008 9:15 AM (EDT)
Hi Rishvi,

You can put in in a couple places depending on the scope of what you would like to change:

If you put it under the <vxml> tag and before your first form it will have the effect of being global for all your forms in that document.  If you put in under the <form> tag it will only be used inside that form.  Once you leave that form, it will go back to the default.

Here is an example:
<?xml version="1.0" encoding = "UTF-8"?>
<vxml version="2.1">
<property name="completetimeout" value=".50s"/>
<form>
<block>
<field name="guess">
    <grammar type="text/gsl">
        [one two three four five six seven eight nine]
    </grammar>

    <grammar type="text/gsl">
      [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9]
    </grammar>
  <prompt>
    <audio src="audio/1.wav">
  </audio>
  </prompt>
</field>
</block>
</form>
</vxml>

If you have any questions, please let us know.

Thanks,
Jeremy Richmond
Voxeo Support
crishvi
4/18/2008 6:02 AM (EDT)
Thanks a lot

Regards
Rishvi
crishvi
4/18/2008 6:36 AM (EDT)
Hello,i've tried doing what u said but it didn't work.Below is the code for which I'm trying to use this property.Please tell me if I'm wrong some where.

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >

<form>

<property name="completetimeout" value=".5s"/>

  <var name="string" expr="''"/>

  <field name="username">

  <grammar type="text/gsl">
    [dtmf-1]
  </grammar>

  <grammar type="text/gsl">
    <![CDATA[
    [
      (dtmf-0)        { return (" ") } 
      (dtmf-2)        { return ("a") }
      (dtmf-2 dtmf-2)    { return ("b")  }
      (dtmf-2 dtmf-2 dtmf-2) { return ("c") }
      (dtmf-3)        { return ("d")}
      (dtmf-3 dtmf-3)    { return ("e") }
      (dtmf-3 dtmf-3 dtmf-3) { return ("f") }
      (dtmf-4)        { return ("g")}
      (dtmf-4 dtmf-4)    { return ("h") }
      (dtmf-4 dtmf-4 dtmf-4) { return ("i") }
      (dtmf-5)        { return ("j")}
      (dtmf-5 dtmf-5)    { return ("k") }
      (dtmf-5 dtmf-5 dtmf-5) { return ("l") }
      (dtmf-6)        { return ("m")}
      (dtmf-6 dtmf-6)    { return ("n") }
      (dtmf-6 dtmf-6 dtmf-6) { return ("o") }
      (dtmf-7)        { return ("p")}
      (dtmf-7 dtmf-7)    { return ("q") }
      (dtmf-7 dtmf-7 dtmf-7) { return ("r") }
      (dtmf-7 dtmf-7 dtmf-7 dtmf-7) { return ("s") }
      (dtmf-8)        { return ("t")}
      (dtmf-8 dtmf-8)    { return ("u") }
      (dtmf-8 dtmf-8 dtmf-8) { return ("v") }
      (dtmf-9)        { return ("w")}
      (dtmf-9 dtmf-9)    { return ("x") }
      (dtmf-9 dtmf-9 dtmf-9) { return ("y") }
      (dtmf-9 dtmf-9 dtmf-9 dtmf-9) { return ("z")}

    ]
      ]]>
    </grammar>
    </field>

    <filled namelist="username">
         
        <if cond="username=='end'||username=='1'">
          <goto nextitem="finish"/>

        <else/>
          <prompt><value expr="username"/>.<break time="500"/> 
            </prompt>
          <assign name="string" expr="string + username"/>
            <clear namelist="username"/>
            <goto nextitem="username"/>
        </if>

    </filled>

  <block name="finish">
    <prompt> You entered <value expr="string"/> <break time="500"/>.
      </prompt>
    </block>   


    </form>
    </vxml>


In the above code I'm trying take alphabets' string from the user through keypad.But I'm trying to take the string, alphabet by alphabet.Each time the user types an alphabet, the alphabet is repeated and then only the user can enter the next alphabet.
                    Now, the problem is the time gap between the user typing the alphabet and repeating that alphabet.For alphabets like 'r' ,'s','z' ...it's instant but for others like 'a','d' the time gap is more,the user had to wait for 4 or 5 secs.So How can i cut down that time gap??.

Please reply asap.It'll be of great help.

Thank You,
Rishvi
voxeojeremyr
4/18/2008 10:17 AM (EDT)
Hi Rishvi,

You can try setting the incompletetimeout property.  It looks like this:

<property name="incompletetimeout" value=".5s"/>

Here are the details for incompletetimeout:
Details: The 'incompletetimeout' property allows you to change the setting of when, after a caller pauses in mid-utterance, the interpreter will start to process said utterance. After the period of time specified, (2s default), the interpreter will process the utterance and return either a valid grammar match, or a 'nomatch' condition.


You can find more about all the properties at this link:
http://docs.voxeo.com/voicexml/2.0/w3cprops.htm#start

The one thing that you have to be careful is that if the caller means to enter 'v' and they pause a bit after pressing 8 8, it will be taken as 'u'. So it may take some tuning to dfind out what is too short of a delay versus too long a delay.

Another tactic that I have seen people use is to use the pound sign as a terminator.  So the caller would press 8 8 # and the '#' would stop the ASR engine from gathering any more information, and the grammar would just return 'u'.

If you have any questions, just let us know. 

Thanks,
Jeremy Richmond
Voxeo Support
jefo12
6/19/2008 8:58 AM (EDT)
can we write a vxml inside jsp  give some examples...
or giv me a tutorial where should i find it?.
voxeojeremyr
6/19/2008 9:25 AM (EDT)
Hi,

Sure you can write VXML inside JSP.  Here is a link to a tuturial on how you can do that. 
http://docs.voxeo.com/voicexml/2.0/intro_serverside.htm


Please bear in mind that we won't be much help in the matter of coding or debugging your JSP, but if it returns valid VXML it should work.

Thanks,
Jeremy Richmond
Voxeo Support
jefo12
7/14/2008 11:55 AM (EDT)
<vxml>
<var name="timings" expr="'09:00,10:00'"/>
<form id="timeselection">
<field name="appttime" type="time">
<filled>
<if cond="appttime=='timings'">
<assign name="appointmetntime"expr="appttime"/>
<prompt>you have <value expr="appointmetntime"/></prompt>
<else/>
<prompt> </prompt>
</if>
</filled>
</field>
</form>
</vxml>

the 'timings' should be dynamic. i have to match the timings with the build in grammar time..Is it possible..? please suggest..
plz give me the related site...




MattHenry
7/14/2008 12:11 PM (EDT)

Hi there,


I am not totally clear on what it is that you are asking, as your question didn't have much in the way of explicit details. How I am reading this is "how can i make sure that the user utterance matches one of the two values defined in the 'timings' variable?"

If this is correct, then I would think that the following actions would be required:

1 - Use client side scripting to break up the string into 2 separate values: I would think that either the 'slice' method, or perhaps the 'split' method would be a good start:

http://www.devguru.com/Technologies/ecmascript/quickref/string.html

2 - Use conditional logic within the <filled> section of your code to validate whether or not the user utterance matched one, or both of the values within variable name 'timings'

Hope this helps out,

~Matthew Henry



login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site