" /> GVP8 Grammar Error - Genesys CTI User Forum

Author Topic: GVP8 Grammar Error  (Read 5173 times)

Offline clemouk

  • Newbie
  • *
  • Posts: 39
  • Karma: 0
GVP8 Grammar Error
« on: June 27, 2012, 05:48:02 PM »
Advertisement
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

Offline Fra

  • Hero Member
  • *****
  • Posts: 856
  • Karma: -3
Re: GVP8 Grammar Error
« Reply #1 on: July 02, 2012, 12:44:04 PM »
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

Offline clemouk

  • Newbie
  • *
  • Posts: 39
  • Karma: 0
Re: GVP8 Grammar Error
« Reply #2 on: July 04, 2012, 01:11:12 PM »
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.

Offline rpenney

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 2
Re: GVP8 Grammar Error
« Reply #3 on: July 06, 2012, 10:54:01 PM »
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.