Rss Categories


Reference Number: AA-00756 Views: 1644 0 Rating/ Voters

This function passes a string of digits delimited by whitespace through an active voice grammar and provides a semantic interpretation. Instead of performing speech recognition on audio, this function is used only to evaluate the semantic interpretation of a string of digits against DTMF grammars.

Note that this function does not actually process DTMF -- that is the responsibility of a telephony platform. Its input must be a string of digits, not raw DTMF tones.



  • int DTMFDecode(const char* dtmf_str, unsigned int flags)



A space separated string that may contain the numbers from 0-9, the * sign, or the # sign. This is the string for which you want a semantic interpretation.

flags (bitwise OR flags to set desired options)

Unused in the current implementation.

Return Values

Non-negative number

No errors.


Indicates that dtmf_str is NULL or of 0 length.


The port is not valid (either CreateClient has not been called or DestroyClient has been called prior to this call).


This grammar could not be activated, because the port was shutting down.


Indicates that the license acquired for the decode operation does not permit the use of the current version of the ASR server.


Indicates an error in using an active grammar for the decode operation (eg: there were no words in the compiled grammar).


Indicates that no ASR servers were available to perform the decode.


Indicates that the preceeding decode operation timed out.


An exception occurred while processing the request.


The interpretation is stored in a voice channel called LV_DTMF_CHANNEL. Similar to the Decode function, you may get the interpretation by using GetInterpretationData and GetInterpretationString. You can also callGetNumberOfInterpretations and GetNumberOfParses.

On an error, call ReturnErrorString with the negative result from DTMFDecode to get a description of the error.

See Also