Search code examples
dynamicreadfilevoicexml

dynamic voice xml


I want to read a dynamic number of products from a textfile. Then i want to use all these products in my voicexml file.

(use: in a menu for example)

How can I do this?

Is it good to create for each product a form? Or is it better to put all products in an external grammar file? an use those in the .vxml file?

are there any ideas?

thanks in advance


Solution

  • There are a few choices, but all involve adding an application server to the equation.

    1. Generate your VoiceXML page with JSP or ASP and use the implementation language to read the file.
    2. Implement as a servlet (more or less same as #1)
    3. Use the VoiceXML Data element to request the list from an application server as XML. The VoiceXML document can then use Javascript to piece through the data or directly play using the foreach element to enumerate over the values.