Subject: Re: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar

From: "McGlashan, Scott" <[email-masked]>
Date: Sat, 2 Oct 2010 14:52:31 +0000

Hi Jean-Francois,

I checked this with Xerces-J and can't replicate the grammar problem (the schema doesn't impose any constraint on grammar mixed content beyond valid CDATA and well-formed XML). However, your example contains termchar="" which isn't valid  according to the schema. Removing the termchar attribute allows your example  to be validated in Xerces-J.
Can you re-check this with your parser and let me know if there is anything to fix in the IVR spec?

Thanks

Scott

From: Jean-Francois Bertrand <[email-masked]<mailto:[email-masked]>>
Date: Fri, 23 Jul 2010 18:12:10 +0000
To: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>
Subject: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar

Our MediaServer support the digitmap grammar, as defined by MSCML-04f.  An application Server should be able to use this custom grammar by sending a message like this:

<mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
       <dialogstart dialogid="1:1864798348" connectionid="1:1864798348">
              <dialog repeatDur="10s" repeatCount="10">
                     <prompt>
                           <media loc="file:///var/www/media/en/SomeMessagePart1.wav"/>
                           <media loc="file:///var/www/media/en/SomeMessagePart2.wav"/>
                     </prompt>
                     <collect cleardigitbuffer="false" timeout="86400000ms" termchar="" interdigittimeout="5000ms">
                          <grammar type="application/mgcp-digitmap">(*|*[0-9])</grammar>
                     </collect>
              </dialog>
       </dialogstart>
</mscivr>

Note that ‘type’ is used to specify the mimetype of the inline grammar, in this case we are using application/mgcp-digitmap.

When performing a strict XSD validation, our Media Server ends up responding with the following:

<mscivr version="1.0" xmlns="urn:ietf:params:xml:ns:msc-ivr">
  <response status="400" dialogid=""
            reason="error: message:'value '' does not match regular expression facet '[0-9#*A-D]''
line:9
column:119
publicId:unknown
systemId:localhost
"/>
</mscivr>

With strict XSD validation, xerces-c complains that the grammar does not match the regular expression facet '[0-9#*A-D]'.  XSD validation also fails when enclosing the grammar with a CDATA section.   When a custom grammar is specified, the XSD should not attempt to parse the inlined grammar.

The msc-ivr XSD should be updated so that it does not attempt to validate a custom inlined grammar.

Jean-François Bertrand
Sr. Software Designer| BroadSoft, Inc.