<www.vxml.co.za>





<training>





<voicexml tutorial>















Caller Interactions

Queries versus Transactions

Queries

In this scenario, a customer calls into a system to retrieve information from a Web-based infrastructure.

The system guides the customer through a series of menus and forms by playing instructions, prompts, and menu choices using prerecorded audio files or synthesized speech.

The customer uses spoken commands or DTMF input to make menu selections and fill in form fields.

Based on the customer's input, the system locates the appropriate records in a back-end enterprise database. The system presents the desired information to the customer, either by playing back prerecorded audio files or by synthesizing speech based on the data retrieved from the database.

Transactions

In this scenario, a customer calls into a system to execute specific transactions with a Web-based back-end database.

The system guides the customer to provide the data required for the transaction by playing instructions, prompts, and menu choices using prerecorded audio files or synthesized speech.

The customer responds using spoken commands or DTMF input. Based on the customer's input, the system conducts the transaction and updates the appropriate records in a back-end enterprise database.

Typically the system also reports back to the customer, either by playing prerecorded audio files or by synthesizing speech based on the information in the database records.

Menus

A menu is essentially a simplified form with a single field.

Menus present the user with a list of choices, and associate with each choice either:

- a URI identifying a VoiceXML page or
- element to visit or an event which will occur if the user selects that choice.

The grammar for a menu is constructed dynamically from the menu entries, which you specify using the <choice> element, - text or
- an external grammar reference.

Note:

The <enumerate> element instructs the VoiceXML browser to speak the text of each menu <choice> element when presenting the list of available selections to the user. If you want more control over the exact wording of the prompts (such as the ability to add words between menu items or to hide active entries in your menu), simply leave off the <enumerate> tag and specify your own prompts.

Get DTMF

Once you have the DTMF...you need to go somewhere with it...

Flow control

When the VoiceXML browser starts, it uses the URI you specify to request an initial VoiceXML document.

Based on the interaction between the application and the user, the VoiceXML browser may jump to another dialog in the same VoiceXML document, or fetch and process a new VoiceXML document.

VoiceXML provides a number of ways for managing flow control.

For example, the <link> element specifies a control common to all dialogs in the link's scope. This is a very nice transition/event handler for a caller's input.

On the next page is an example on how the DTMF grammar is incorporated into the application and how conditions are used to send the call to the form ID which is relevant. The same grammar is relevant for the whole document.



Get DTMF Strings

Herewith a working example of a routine that captures a DTMF string from the caller. The digit length is set to three. This value can be changed as the need changes. Bear in mind that the timeout period in seconds needs to be updated accordingly.

Then there are three possible outcomes; filled, nomatch and noinput.

Filled is visited by the application if the criteria is met in terms of the number of digits in the period of time allotted.

Nomatch is visited if there has been input, but it is less than the digit length or the timeout period expired.

Noinput is visited if there was no input in the allotted period of time.



This working example shows how a form can contain a field which is being used to capture a 10 digit telephone number. The timeout is also set to 10 seconds. The name of the field which can be used to reference the information captured is fldNumber.

The example shows how the noinput element can be used to customize the application response on the first, second and third attempt. Hence custom prompts can be played to the caller. Take note that after the third noinput the caller is played a custom message, and the call is terminated with an exit element.



Herewith the same example, but where the nomatch element is used to ensure that there is a suitable response in cases where there is indeed input, but it does not match the expected input. Again, after the third nomatch, a goodbye message is played and the call is terminated via the exit element.



DTMF String playback

The example below shows a routine where the number entered is captured and played back to the caller. This routine can be changed and reused according to your requirement.





Now we can go to:
Voice Messaging








Copyright 2009 - Computer Assisted Telephony Systems (Pty) Ltd