Voicexml how to store input into a global variable
        Posted  
        
            by 
                Tyzak
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Tyzak
        
        
        
        Published on 2011-01-05T14:53:22Z
        Indexed on 
            2011/01/05
            22:53 UTC
        
        
        Read the original article
        Hit count: 311
        
global-variables
|vxml
Hello, I'm creating a voicexml appliacation.
I want to store an user input into a global variable.
I wondered, the input should be stored in the fieldvar. shouldn't it? After I tried it with this, i tried to store it in an global variable:
<assign name="myvar" expr="'myinput'"/>
but somehow it didn't work. I used  value expr="var" as expr.
<?xml version="1.0" encoding="UTF-8"?> 
<vxml xmlns="http://www.w3.org/2001/vxml" 
  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">
<var name="myProdukt" />
<form id="test">
<field name="var">
<prompt bargein="true" bargeintype="hotword" >Sagen Sie ein Produkt</prompt>
<grammar root="main" version="1.0" xml:lang="de-DE">
  <rule id="main" scope="public">
    <one-of>
      <item> p1 </item>
      <item> p2 </item>
      <item> p3 </item>
      <item> p4   </item>
    </one-of>
  </rule>
</grammar>
<filled>
<assign name="myProdukt" expr="<value expr="var"/>"/>
</filled>
</field>
</form>
<<!--[...] Here i want to use the input.-->
</vxml>
thanks in advance
© Stack Overflow or respective owner