SaveDynamicGrammar

Metreos.MediaControl.SaveDynamicGrammar

Summary

Saves the string representation of a grammar to file.

Usage

The SaveDynamicGrammar action allows a script to dynamically create a grammar as a string, and save it to file in a location on the Cisco Unified Application Server that is HTTP-accessible. The action returns this HTTP-accessible URI, which can then be used by VoiceRecognition and ManageGrammar when specifying the grammar name.

Remarks

Files created with this action can either be application-bound or script-bound. By being application-bound, the grammar will only be cleaned up when the application is updated or re-installed; therefore putting the responsibility of cleaning up application-bound files to the application. Script-bound files, on the other hand, are created in a folder that exists only for the duration of the script. Once the script ends, the folder is deleted, along with any files within it.

If a file already exists of the same name, it will be overwritten by the specified DynGrammar content.

Action Parameters
Parameter Name.NET TypeDefaultDescription
TimeoutSystem.Int32The Timeout property specifies to the Application Runtime Environment how long to wait for a response from the provider for the current action. The ReturnValue returned in this case is Timeout. The value must be a literal value in milliseconds.
DynGrammarNameSystem.StringThe name of the grammar file. If not specified, the file will be automatically named HOUR_MINUTE_SECOND.grxml.
DynGrammar *System.StringThe content of the grammar file.
IsScriptBound *System.BooleanDetermines whether the file is script-bound or application-bound.
Result Data
Parameter Name.NET TypeDescription
DynamicGrammarUriSystem.StringThe HTTP-accessible URI of the dynamic grammar. This can then be used by VoiceRecognition and ManageGrammar when specifying the grammar name.
ResultCodeSystem.StringA numeric code indicating the result status of the operation. A '0' indicates success; a positive number indicates an error. Please reference the Media Control Error Codes table for descriptions on specific error codes.

Branch Conditions 

Success

No description.

Failure

No description.

Timeout

No description.