|
Author
|
Topic: Grammar from an external file
|
univGuy
Junior Member
Member # 3179
Rate Member
|
posted June 16, 2005 03:11 PM
I am simply trying to provide the grammar by using an external file. Here is the code: code:
<field name="name"> <prompt>Please say your real name</prompt> <grammar src="http://studentwebs.colstate.edu/sliwowski_marcin/fpdb/nameGrammar.grammar#UserName" type="application/x-nuance-gsl"/> </field>
What happens is that after the prompt, the phone call is simply disconnected. I am not sure why? Do I need to specify more attributes in the grammar tag? Here is the grammar file: code:
;GSL2.0 UserName:public [Marcin Joe Frank Mike John Steve Paul]
I am using nuance GSL grammar strcuture. Does anyone know why this is not working?
Posts: 1 | From: NJ | Registered: Jun 2005
| IP: Logged
|
|
mheadd
Member
Member # 3181
Member Rated:
|
posted June 17, 2005 03:47 PM
This is just a guess, but are you using the right MIME type with your external grammar file? There is a good discussion of this on the Voxeo developer site at http://docs.voxeo.com/voicexml/2.0/gslhints.htm#start
For example, when I use external grammar files (like those I need to build from a database query), I send back the appropriate MIME type to the VoiceXML browser with the grammar file by setting the response headers as follows (note � I favor PHP for my server side stuff, but the Voxeo site has examples for several other popular languages):
header('Content-type: application/x-nuance-gsl');
Also, for a grammar as small as the one you site in your example, you may just want to use it inline, as opposed to an external file. This might also address the problem.
You might also want to check the logs on your VoiceXML platform -� the error messages recorded in those logs might help you identify the problem. Hope this is helpful.
-------------------- Mark VoiceinGov.org http://www.voiceingov.org
Posts: 45 | Registered: Jun 2005
| IP: Logged
|
|
Voice Enabler
Junior Member
Member # 3156
Rate Member
|
posted July 26, 2005 04:42 AM
Your grammar is not correct. In GSL only rule references may start with a capital letter. Moreover your grammar should fill a natural language slot, which is 'name' in your case.
Posts: 3 | From: Berlin | Registered: May 2005
| IP: Logged
|
|
|