| Article ID: | 203 |
| Last updated: | November 02, 2006 |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
SUMMARY
This article explains a necessary workaround if the VoiceInput class's constructor is used to set the value of a menu choice. This class is used only in custom voice elements.
SYMPTOMS
Developer is creating a custom voice element that will include a menu, and would like to use the VoiceInput class's constructor to set the value of each of the menu options. However, if the Audium application is called and the caller uses voice to provide input, the DTMF value of the option will be stored. For example, if this code is used to initialize a VoiceInput object:
VoiceInput("1", "name", "bob", "bob", "name", "bob")
and the caller says "bob", then the value "1" will be stored as the caller's choice. The developer would expect that the value "bob" would be stored (as per the Audium Java API Javadocs).
RESOLUTION
Although this constructor should properly set the value of the caller's choice, it does not. However, there is a simple workaround. In addition to using this constructor, the developer should call the setOptionValue method on the VoiceInput object. For example:
vo.setOptionValue("bob");
Calling this method will ensure that regardless of whether the caller uses DTMF or voice to provide input, the desired value will be stored when the menu choice is made.
We have logged this problem in our internal issue-tracking system, and will investigate the possibility of including a fix for it in future releases. To track the status of this issue, please refer to issue number AC-237.
|