Input Block
Contents
- 1 Input Block
- 1.1 Input Block Exception Events
- 1.2 Name Property
- 1.3 Block Notes Property
- 1.4 Exceptions Property
- 1.5 Language Property
- 1.6 Condition Property
- 1.7 Logging Details Property
- 1.8 Log Level Property
- 1.9 Enable Status Property
- 1.10 Output Result Property
- 1.11 Clear Buffer Property
- 1.12 Interruptible Property
- 1.13 Prompts Property
- 1.14 Security Property
- 1.15 Timeout Property
- 1.16 Grammar Type Property
- 1.17 Input Grammar Dtmf Property
- 1.18 Input Grammar Voice Property
- 1.19 Input Mode Property
- 1.20 Slot Property
- 1.21 Input Termination Character Property
- 1.22 Inter Digit Timeout Property
- 1.23 Maximum Input Digits Property
- 1.24 Minimum Input Digits Property
- 1.25 Get Shadow Variables Property
- 1.26 Number Of Retries Allowed Property
- 1.27 Retry Prompts Property
- 1.28 Use Last Reprompt Indefinitely Property
- 1.29 Use Original Prompts Property
- 1.30 Use Single Counter For Nomatch And Noinput Property
The Input block accepts DTMF or speech input from callers. It differs from the Menu block in that it enables taking input that might not belong to a simple choice list (as for the Menu block). It can be used to collect numerical data; for example, phone numbers, account numbers, amounts, or speech data, such as a Stock name. It uses speech or DTMF grammars to define the allowable input values for the user responses. Built-in system grammars are available for data, such as dates and amount.
In case of user input blocks (Menu, Input, Record, Transfer), Composer adds a global variable of type "Block" to the variables list. You can conveniently use this variable for accessing the user input value. Also see Menu Block, Number of Allowed Attempts Exceeded. The Input block has the following properties:
Input Block Exception Events
The Input block has eight exception events:
- error
- error.noresource
- maxspeechtimeout
- noinput
- nomatch
- error.badfetch.grammar.uri
- error.badfetch.grammar.syntax
- error.badfetch.grammar.load
Name Property
Please find this property's details under Common Properties.
Block Notes Property
Can be used for both callflow and workflow blocks to add comments.
Exceptions Property
Find this property's details under Common Properties.
Language Property
The language set by this property overrides any language set by the Set Language block, the Project preferences, or the incoming call parameters. The property takes effect only for the duration of this block, and the language setting reverts back to its previous state after the block is done. In the case of the Input block, this property affects the language of grammars of TTS output:
- Click under Value to display a down arrow.
- Click the down arrow and select English - United States (en-US) or the variable that contains the language.
Condition Property
Find this property's details under Common Properties for Callflow Blocks.
Logging Details Property
Find this property's details under Common Properties for Callflow Blocks.
Log Level Property
Find this property's details under Common Properties for Callflow Blocks.
Enable Status Property
Find this property's details under Common Properties for Callflow Blocks.
Output Result Property
You must use the Output Result property to assign the collected data to a user-defined variable for further processing.
- Select the Output Result row in the block's property table.
- In the Value field, click the down arrow and select a variable.
For more information, see Upgrading Projects/Diagrams.
Clear Buffer Property
Use the Clear Buffer property for clearing the DTMF digits in the key-ahead buffer. If it is not set to true, the DTMF digits entered are carried forward to the next block. It is commonly used for applications with multiple menus, enabling the caller to key ahead the DTMF digits corresponding to the menu choices. To assign a value to the Clear Buffer property:
- Select the Clear Buffer row in the block's property table.
- In the Value field, select true or false from the drop-down list.
Interruptible Property
This property specifies whether the caller can interrupt the prompt before it has finished playing. To assign a value to the Interruptible property:
- Select the Interruptible row in the block's property table.
- In the Value field, select true,false,or DTMF (for DTMF barge-in mode support) from the drop-down list.
Prompts Property
Find this property's details under Common Properties.
Security Property
When the Security property is set to true, data for this block is treated as private. GVP will consider the data associated with this block as sensitive and will suppress it in platform logs and metrics. Composer uses the com.genesyslab.private property for the Security property of callflow blocks. For more information see the GVP 8.1 Voice XML Help.
To assign a value to the Security property:
- Select the Security row in the block's property table.
- In the Value field, select true or false from the drop-down list.
Timeout Property
The Timeout property defines the length of the pause between when the voice application plays the last data in the list, and when it moves to the next block. To provide a timeout value:
- Select the Timeout row in the block's property table.
- In the Value field, type a timeout value, in seconds.
Grammar Type Property
To assign a value to the Grammar Type property:
- Select the Grammar Type row in the block's property table.
- In the Value field, select one of the following from the drop-down list:
- builtinBoolean
- builtinCurrency
- builtinDate
- builtinDigits
- builtinNumber
- builtinPhone
- builtinTime
- externalGrammar
builtinBoolean
Valid inputs include affirmative and negative phrases appropriate to the current locale. DTMF 1 represents " yes," and 2 represents "no." The result is ECMAScript true for yes or false for no. The value is submitted as the string true or the string false.
builtinCurrency
Valid spoken inputs include phrases that specify a currency amount. For DTMF input, the asterisk (*) character acts as the decimal point. The result is either a string with the format UUUmm.nn, where UUU is the three-character currency indicator according to ISO standard 4217:1995, or null if not spoken by the caller.
builtinDate
Valid spoken inputs include phrases that specify a date, including a month, day, and year. DTMF inputs are: four digits for the year, followed by two digits for the month, and then two digits for the day. The result is a fixed-length date string with format yyyymmdd--for example, 20000704. If the year is not specified, yyyy is returned as ????; if the month is not specified mm is returned as ??; and if the day is not specified dd is returned as ??.
builtinDigits
Valid spoken or DTMF inputs include one or more digits, 0--9. The result is a string of digits.
builtinNumber
Valid spoken inputs include phrases that specify numbers--for example, one hundred twenty-three, or five point three. Valid DTMF input includes positive numbers entered using digits and the star (*) character (to represent a decimal point). The result is a string of digits from 0-9 and that can optionally include a decimal point (.), and/or a plus sign (+) or minus sign (-).
builtinPhone
Valid spoken inputs include phrases that specify a phone number. DTMF star (*) represents x. The result is a string that contains a telephone number consisting of a string of digits and optionally, the character x to indicate a phone number with an extension--for example, 8005551234x789."
builtinTime
Valid spoken inputs include phrases that specify a time, including hours and minutes. The result is a five-character string in the format hhmmx, where x is either a for AM, p for PM, h to indicate a time specified according to the 24-hour clock, or ? to indicate an ambiguous time. Because there is no DTMF convention for specifying AM/PM, in the case of DTMF input, the result is always end with h or ?. If the field value is subsequently used in a prompt, the value is spoken as a time appropriate to the current locale.
externalGrammar
The application can also define an external grammar. The grammars can be written using the GRXML Editor, or GRXML files can be imported into the Composer Project. Look at the User Input Project voice application template in Composer for an example of the use of an external grammar file. Note for Voice Application Developers When developing a VoiceXML application, you must set the web server connection timeout so that it is appropriate to the task that the application performs. It should be greater than one or all of the following callflow applications:
- Maximum talk time
- Maximum recording time
- Maximum wait time for a user input
Input Grammar Dtmf Property
Use the Input Grammar Dtmf (Dual Tone Multi-Frequency as described below) property to specify the DTMF Grammar for the Input Block. The DTMF Grammar is processed and handled by GVP. In the case of external grammars, this specifies the actual path of the grammar file / resource for DTMF Grammars. This is only valid when the Grammar Type is externalGrammar and Input Mode is dtmf or hybrid. To assign a value to the Input Grammar Dtmf property:
- Select the Input Grammar Dtmf row in the block's property table.
- In the Value field, select a value from the drop-down list. >br>
Values are the Voice Application Variables described under the Variables You can specify multiple grammars by separating the grammars with the "|" character.
Multiple Inputs:
Single Input:
About Dual Tone Multi Frequency (DTMF) Signaling
DTMF signaling is used for telecommunication signaling over analog telephone lines in the voice-frequency band between telephone handsets and other communications devices and the switching center. The version of DTMF used for telephone tone dialing is known by the trademarked term, Touch-Tone.
There are some situations where the interpreter (NGI) cannot accept DTMF keypresses immediately as input. In these situations, the keypresses are stored in the DTMF input buffer, for possible later use as input. Throughout the execution of the application, the interpreter must decide whether to save the current contents of the DTMF input buffer (and use them at the next input state), or to discard them. Buffering DTMF input can be useful in allowing typeahead, where users input DTMF for multiple fields rapidly, separated by the termchar. Whatever input is left after the first termchar, may be used in subsequent fields, meaning that the user does not have to wait to hear each prompt.
Input Grammar Voice Property
Use the Input Grammar Voice property to specify the Voice Grammar for the Input block. If you are writing hybrid applications that allow both DTMF and Speech input, specify both the DTMF and Voice grammars. The Voice Grammar is sent to the ASR Engine for processing, whereas the DTMF grammar is processed by GVP. As a result, you need two separate grammars for Voice and DTMF in the case of hybrid applications that allow both Voice and DTMF inputs. In the case of external grammars, this specifies the actual path of the grammar file / resource for ASR Grammars.. This is only valid when Grammar Type is externalGrammar and Input Mode is voice or hybrid. To assign a value to the Input Grammar Voice property:
- Select the Input Grammar Voice row in the block's property table.
- In the Value field, select a value from the drop-down list. You can specify multiple grammars by separating the grammars with the "|" character.
Values are the Voice Application Variables described under the Variables Property.
Multiple Inputs:
Single Input:
Input Mode Property
To assign a value to the Input Mode property:
- Select the Input Mode row in the block's property table.
- In the Value field, select one of the following from the drop-down list:
DTMF
The DTMF format indicates the menu option mode of input will be via the telephone keypad.
Voice
The Voice format indicates the menu option mode of input will be a voice phrase.
Hybrid
The Hybrid menu mode will handle both DTMF and Voice inputs, that is via telephone keypad and voice phrase.
Slot Property
The Slot property enables you to specify the slot name of the return value from the grammar. If the slot name is not specified, it is assumed that the grammar will return the value of a slot having the same name as the INPUT block itself. To provide a slot name:
- Select the Slot row in the block's property table.
- In the Value field, type a slot name that conforms to the restrictions above.
Input Termination Character Property
The Input Termination Character property defines any character that callers can input in order to indicate that they have finished entering data. For example, the prompt given to the caller may say "Enter your account number, and then press the pound key." The pound key is the input-ending character. To provide a value for the input termination character:
- Select the Input Termination Character row in the block's property table.
- In the Value field, type a value for a character to represent the end of the input string.
A typical value that is often used, as indicated above, is: # Example:
- To use # or * then type the value as # or *
Inter Digit Timeout Property
The Inter Digit Timeout property defines the longest wait time between input characters before a timeout is generated. This is mandatory if dtmf is selected as the Input Mode. Note: Inter Digit Timeout property is applicable only for DTMF input. To provide an Inter Digit timeout value:
- Select the Inter Digit Timeout row in the block's property table.
- In the Value field, type a timeout value, in seconds.
Maximum Input Digits Property
The Maximum Input Digits property defines the maximum number of characters that the caller may input. If the input is variable, an input character such as pound sign (#) should be used to terminate the input. This is mandatory if dtmf is selected as the Input Mode. To provide a value for the maximum number of input digits:
- Select the Maximum Input Digits row in the block's property table.
- In the Value field, type a value for the maximum number of input digits.
Minimum Input Digits Property
The Minimum Input Digits property defines the minimum number of characters that the caller must input. This is mandatory if dtmf is selected as the Input Mode. To provide a value for the minimum number of input digits:
- Select the Minimum Input Digits row in the block's property table.
- In the Value field, type a value for the minimum number of input digits.
Get Shadow Variables Property
Shadow variables (optional) provide a way to retrieve further information regarding the value of an input item. By setting this property to true, it will expose the block’s shadow variable within the callflow. When enabled, the shadow variable will be included in the list of available variables. (For example, the Log block’s Logging Details will show Input1$.) A shadow variable is referenced as blockname$.shadowVariable, where blockname is the value of the input item's name attribute, and shadowVariable is the name of a specific shadow variable, for example: Input1$.duration. Shadow variables can provide platform-related information about the interaction/input. For example, for speech recognition, this may be the confidence level the platform receives from the ASR engine about how closely the engine could match the user utterance to specified grammar. To assign a value to the Get Shadow Variables property:
- Select the Get Shadow Variables row in the block's property table.
- In the Value field, select true or false from the drop-down list.
Number Of Retries Allowed Property
The Number Of Retries Allowed property determines how many opportunities the user will be provided to re-enter the value. If Use Last Prompt Indefinitely is set to true, this property has no effect; otherwise, the error.com.genesyslab.composer.toomanynomatches or error.com.genesyslab.composer.toomanynoinputs errors will be raised on reaching the maximum retry limit. To provide a value for the number of retries allowed:
- Select the Number Of Retries Allowed row in the block's property table.
- In the Value field, type a value for the number of retries that will be allowed.
Retry Prompts Property
Find this property's details under Common Properties.
Use Last Reprompt Indefinitely Property
If you set the Use Last Reprompt Indefinitely property to true, the application uses your last reprompt as the prompt for all further retries. In this case the NoMatch and NoInput exception handlers will never get executed, as the retry loop keeps executing forever. To assign a value to the Use Last Reprompt Indefinitely property:
- Select the Use Last Reprompt Indefinitely row in the block's property table.
- In the Value field, select true or false from the drop-down list.
Use Original Prompts Property
If you set the Use Original Prompts property to true, in the event of an error requiring a retry, the application first plays back the retry error prompt, and then plays back the original prompt for the block (as specified in the Prompts property). To assign a value to the Use Original Prompts property:
- Select the Use Original Prompts row in the block's property table.
- In the Value field, select true or false from the drop-down list.
Use Single Counter For Nomatch And Noinput Property
If you set the Use Single Counter For Nomatch And Noinput property to true, the application maintains a single combined counter for the nomatch and noinput errors. For example, if the block has three nomatch retry messages and three noinput retry messages, the user gets three retry attempts. If you do not select this option, the application generates a total of six retries; and the user gets up to six retry attempts while not exceeding three of each type -- noinput or nomatch.
To assign a value to the Use Single Counter For Nomatch And Noinput property:
- Select the Use Single Counter For Nomatch And Noinput row in the block's property table.
- In the Value field, select true or false from the drop-down list.