grammarmaxage

grammarmaxage

Default Value: NULL

Tells the platform the maximum acceptable age, in seconds, of cached grammars. Setting “grammarmaxage” to NULL allows the platform to honor expiration time set by the web server.

Example

<?xml version="1.0"?>
<vxml version="2.0">
<property name="grammarmaxage" value="150s"/>
<property name="grammarmaxstale" value="25s"/>
<form id="name">
<field name="last_name" type="lastname">
<prompt>
Say your last name and spell it.
</prompt>
</field>
<block>
<prompt>
Your last name is <value expr="lastname"/>.
</prompt>
</block>
</form>
</vxml>

Explanation

From this example, the “grammarmaxage” value is set to 150 seconds and the “grammarmaxstale” value is set to 25 seconds. This sets a global property that all grammar tags have a maxage value of 150 seconds and a maxstale value of 25 seconds. So, since the file “lastname.php” (remote grammar for the lastname built-in grammar type) is inside of a <grammar> tag, it would have a maxage value of 150 seconds and a maxstale value of 25 seconds because of the “grammarmaxage” and “grammarmaxstale” properties.

Notes

None