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

"McGlashan, Scott" <> Sat, 02 October 2010 14:55 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 13DC93A6C65 for <>; Sat, 2 Oct 2010 07:55:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -105.932
X-Spam-Status: No, score=-105.932 tagged_above=-999 required=5 tests=[AWL=0.667, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id wCqIY4aVxgGN for <>; Sat, 2 Oct 2010 07:55:48 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 16B883A6C17 for <>; Sat, 2 Oct 2010 07:55:47 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 74FAE1C49D; Sat, 2 Oct 2010 14:56:38 +0000 (UTC)
Received: from ( by ( with Microsoft SMTP Server (TLS) id; Sat, 2 Oct 2010 14:52:36 +0000
Received: from ([]) by ([]) with mapi; Sat, 2 Oct 2010 14:52:35 +0000
From: "McGlashan, Scott" <>
To: Jean-Francois Bertrand <>, "" <>
Date: Sat, 02 Oct 2010 14:52:31 +0000
Thread-Topic: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar
Thread-Index: ActiQXLsDfAUlno6T1Kr8U7cZLpbEA==
Message-ID: <>
In-Reply-To: <D64134C7765B58448BEF1C5E0B4BBB1514AB216ACA@EXMBXCLUS01.citservers.local>
Accept-Language: en-US
Content-Language: en-US
user-agent: Microsoft-MacOutlook/
acceptlanguage: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [MEDIACTRL] msc-ivr XSD not allowing to use an inlined custom grammar
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Media Control WG Discussion List <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 02 Oct 2010 14:55:49 -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?



From: Jean-Francois Bertrand <<>>
Date: Fri, 23 Jul 2010 18:12:10 +0000
To: "<>" <<>>
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">
                           <media loc="file:///var/www/media/en/SomeMessagePart1.wav"/>
                           <media loc="file:///var/www/media/en/SomeMessagePart2.wav"/>
                     <collect cleardigitbuffer="false" timeout="86400000ms" termchar="" interdigittimeout="5000ms">
                          <grammar type="application/mgcp-digitmap">(*|*[0-9])</grammar>

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]''

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.