If you have collected digits from a caller and wish to play them back for confirmation, use System Phrase Digits.
EXAMPLE |
You used a GetDigits control named MainMenu to collect the digits. To play back the numbers entered by the user, use the system phrase Digits in subsequent PlayGreeting control, with the parameter %MainMenu.Digits%. |
To add data confirmation to your application:
Add a Visual Basic data control to your form.
Connect it to your database using the DatabaseName and RecordSource properties.
Open the property pages.
Choose Use Data Control in the Database page.
In the Matching page, select the database field that will be used to check the data's validity in the Records where this field drop-down box.
In the matches this data text box, enter the name of the control that contains the data to be verified (for example, %GetDigits1.Digits%).
If the digits match a record in the database, the call proceeds out of the Found node of the DataFind control.
If the digits do not match a record in the database, the call continues out of the Not Found node of the DataFind control.
If there is no match, consider giving the caller another opportunity to enter data. Connect the NotFound output back to the Err input on the GetDigits. This increments the error count in the GetDigits control, plays the error greeting followed by the main greeting, and gives the caller another chance to enter a valid number.
After the maximum number of retries have been made, the call exits through the Invalid output in GetDigits.
VBVoice can find numeric data in a database and vocalize it for a caller.
For example, a database has a field called Quantity.
Use a DataFind control called GetQuantity to access this Quantity field:
Add the Quantity field to the field list Get These Fields. (It should appear in the dialog after clicking the Change button).
In a subsequent control, go to a Greeting property page and add a System Phrase of type Number
To configure the Number phrase, click the Browse button (%%), select the GetQuantity.Quantity field and drag-and-drop the %GetQuantity.Quantity% substitution string to the Number to Say field.
VBVoice can also find and vocalize other types of data in database.
One way to achieve this is to use a System phrase of type VB Phrase. When VBVoice needs to play a VB Phrase, it calls your PlayRequest event procedure. Your code can create a phrase of any type using the Phrase properties and methods.
You can search databases using letter substitution for the numerals on the keypad and cycle through all the entries found. This is useful for directories in voice mail applications.
Set the Alpha digits field in the DataFind control to do a search based on phone key to alphabetic translation.
The VBVFrame Transfer property is useful for transferring data from VB variables into phrases. You can create your own properties to be accessed at runtime. VBVFrame Transfer properties are implemented as arrays of strings indexed by channel number.
To create a property:
Open the VBVFrame property page.
Select the Transfer Properties page.
Click New to create a new transfer property with your desired name.
For example, create MyProp1 in the VBVFrame1 control.
This property can now be added to a phrase or any other VBVoice control dialog that accepts the %control.property% syntax by inserting %VBVFrame1.MyProp1%.
Remember, if you drag the MyProp1 field from the Control List dialog directly into a phrase setup field, the syntax is supplied for you (saving you the typing!).
At runtime you can write to this variable using the syntax:
VBVFrame1.Transfer.MyProp1(channel) = "NewValue"
VBVoice does not have any built-in global variables that can be accessed directly. However, Visual Basic global variables can be used for this purpose.
To make the variable accessible to VBVoicecontrols, set the global variable into a VBVFrame Transfer property. Do this for all channels whenever the variable is updated or for a specific channel when the data is required for that channel.