Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: clemouk on June 27, 2012, 05:48:02 PM
-
Hi all,
I seem to be having problems with a DTMF grammar definition, basically it is to accept dtmf input of 6 to 15 digits, using any digit from 0-9. However, MCP reports the error:
2012-06-27T18:40:12.759 Trc 40013 INFO 010800FE-1001EF81 1462426496 0C0003F5 Error starting DTMF Recognizer due to GRAMMAR_DEFINE_ERROR in grammar 0; throwing error back to interpreter
2012-06-27T18:40:12.760 Int 50025 010800FE-1001EF81 1460419456 input_end ERROR|||||
2012-06-27 18:40:12.760 DBUG 010800FE-1001EF81 1460419456 0C000000 InputItemRuntime.cxx:1588 HandleThrownEvent() Started for event [error.badfetch.grammar.syntax]
2012-06-27 18:40:12.760 DBUG 010800FE-1001EF81 1460419456 0C000000 InputItemRuntime.cxx:1594 Handling event [error.badfetch.grammar.syntax]
2012-06-27T18:40:12.760 Int 50034 010800FE-1001EF81 1460419456 event error.badfetch.grammar.syntax:1|DTMF grammar syntax error
The grammar file contains the following:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN"
"http://www.w3.org/TR/speech-grammar/grammar.dtd">
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/06/grammar
http://www.w3.org/TR/speech-grammar/grammar.xsd"
version="1.0" mode="dtmf" tag-format="semantics/1.0" root="fixed">
<rule id="fixed">
<tag>out = "";</tag>
<one-of>
<item>
<item repeat="6-15">
<ruleref uri="#digit"/>
<tag>out += meta.latest().text;</tag>
</item>
</item>
</one-of>
</rule>
<rule id="digit">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>0</item>
</one-of>
</rule>
</grammar>
I have checked this with the W3C [url=http://www.w3.org/TR/semantic-interpretation/]http://www.w3.org/TR/semantic-interpretation/[/url] and cannot see any problems with the above. Can anyone see something wrong with the above?
Also, can anyone recommend any good quality reference books/tutorials for writing both DTMF/ASR GRXML grammars?
Thanks,
Lee
-
Not sure this is the cause of your issue, but this is what I've found in Genesys VXML help, among known issues/recommendations:
==
Application developers should either make sure they explicitly specify the grammar type (for example, "application/grammar+xml") using the type attribute, or configure their application servers to return the correct MIME types for grammar files. Otherwise, GVP will consider the grammar to be invalid.
==
Fra
-
Although everything appeared to be configured correctly with grammars, MIME types and all other attributes (I had other grammars of the same format that worked), I wasn't able to resolve this. In the end, I changed the application to use an existing grammar that matched the profile I needed.
-
If the infomation you posted above is an exact copy of the file, you are missing the leading "<" in the xml statement at the top of the file.