Here is an example of an SRGS format grammar. Note the tag variable name must be the same as the field's name, "check_hotel_name". Also note you can have multiple items match to the same tag.
Code: Select all
<field name="check_hotel_name">
<grammar type="application/srgs+xml" mode="voice" root="hotels">
<rule id="hotels">
<one-of>
<item>Ritz Carlton<tag>check_hotel_name="Ritz-Carlton Los Angeles"</tag></item>
<item>Rich Carlton<tag>check_hotel_name="Ritz-Carlton Los Angeles"</tag></item>
<item>The Rich Carton Hotel<tag>check_hotel_name="Ritz-Carlton Los Angeles"</tag></item>
<item>Riviera<tag>check_hotel_name="Riviera Hotel Las Vegas"</tag></item>
</one-of>
</rule>
</grammar>
<prompt bargein="false">
<audio src="http://audio.plumgroup.com/root/89664471/89664471_67.wav">
Thank you for calling Technical Support. This is Kendra. Can I have the name of the hotel you are staying at?
</audio>
</prompt>
<filled>
<assign name="hotel" expr="check_hotel_name"/>
</filled>
</field>
Plum Support