Use the Call.invokeStateTable() method
to invoke a Blueworx Voice Response for AIX state
table. You can only pass string parameters to the state table, so if your
state table requires numeric parameters, you need to invoke it from another
state table that can accept strings from the Java voice application.
Let’s look at an example. The state table you want to invoke, DBlookup,
retrieves a value from a database. It has three parameters:
- Database name, in this example, a constant
- Customer number, a variable obtained from the caller using Call.playAndGetInput()
- Account balance, returned by the state table and spoken to the caller
using an AudioString MediaType object.
- To invoke a State Table application from a Java application, use the Call.invokeStateTable() method.
- In the first parameter, which is the name property,
specify the name of the state table (DBlookup).
- In the second parameter, which is the entryPoint property
specify the state table entry point.
- In the third parameter, which is the parameters property,
specify in the form of a String array the list of
parameters to pass to the State Table application. You can only pass String parameters
to the state table. You must include the number of parameters that the state
table expects, even if you are not interested in some of the values.
Example:
public void voiceMain() throws WVRException {
.
.
.
// Invoke the state table
StateTableResult result = call.invokeStateTable(DBlookup, entryPoint, [customerNumber, accountNumber]);
.
.
.
}