I'm trying to write a VXML app that will allow me to say or spell a system name on my network and then allow me to ping it, or read me the uptime of the system, or perform some basic operations on said system.
Computer names 9 times out of 10 are not dictionary based words, so recognizing system names like appsrv1 or COW15 will not work.
I understand that alphanumeric recognition is not the most accurate in the world, but I atleast want to test and try it out.
None of my computer names are longer then 10 characters, so after searching this board and other sites, I put together the following grammar which I am trying to get working. The system returns an error "A Serious Error, error.grammar, has occured."
Here is the external grammar file I am using:
Code: Select all
<grammar type="application/srgs+xml" root="alphanum" mode="voice">
<rule id="alphanum" scope="public">
<item repeat="1-10">
<item>
<one-of>
<item><ruleref uri="#alphabet"/></item>
<item><ruleref uri="#digit"/></item>
</one-of>
</item>
</item>
</rule>
<rule id="alphabet">
<one-of>
<item>A</item>
<item>B</item>
<item>C</item>
<item>D</item>
<item>E</item>
<item>F</item>
<item>G</item>
<item>H</item>
<item>I</item>
<item>J</item>
<item>K</item>
<item>L</item>
<item>M</item>
<item>N</item>
<item>O</item>
<item>P</item>
<item>Q</item>
<item>R</item>
<item>S</item>
<item>T</item>
<item>U</item>
<item>V</item>
<item>W</item>
<item>X</item>
<item>Y</item>
<item>Z</item>
</one-of>
</rule>
<rule id="digit">
<one-of>
<item>0</item>
<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>
</one-of>
</rule>
</grammar>
My VXML to use this grammar is just very basic right now as I am trying to get it working.
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<property name="sensitivity" value="0.3"/>
<property name="recordcall" value="false"/>
<property name="voice" value="jill"/>
<form>
<field name="system">
<prompt>
Please spell any ten character word.
</prompt>
<grammar src="../SysGrammar/alphanum.grxml" type="application/srgs+xml"/>
<filled>
You said
<value expr="system"/>
</filled>
<nomatch>
<prompt>
I'm sorry that is not a valid system.
</prompt>
<reprompt/>
</nomatch>
<noinput>
<reprompt/>
</noinput>
</field>
</form>
</vxml>
Thanks,
Steve