The GETDIGITS command retrieves tone digits from a voice channel's digit buffer. The digits can represent one of the following data types:
This command has the following format:
ADDRESS VOX “GETDIGITS CHANNEL(channelhandle) [SYSTEM(sysname)] [COUNT(numtones)] [IDDELAY(maxdelay)] [TERMKEY(keytone)] [PREFIX(varname)] [CMDRESP(destination)] [SINGLESTRING(YES|NO)]”
Specifies the channel handle (channelhandle)-identifying some physical channel-that the GETCHANNEL command returns.
(Optional) Specifies the name of the system running the notification server to which you want to direct the command.
The sysname value can contain up to eight alphanumeric characters.
Default: The local system name
(Optional) Specifies the maximum number of tones to retrieve. Valid values are 0 (zero) through 31.
Note: If you specify COUNT(0), the GETDIGITS command returns only the number of digits in the digit buffer (but no digits).
Default: 1
(Optional) Specifies the maximum time delay allowed between each digit's retrieval (in 1/10-second units).
Default: 30
(Optional) A termination tone digit that the remote party enters on the telephone keypad.
If CA Automation Point detects a tone that you specify, it terminates the GETDIGITS operation. You can specify one or more termination tones.
Valid values are: 0 1 2 3 4 5 6 7 8 9 * # a b c d
Notes:
Default: The pound key (#)
(Optional) Specifies the name of the REXX stem variable (other than the default name) that contains the return information for the command.
For information about changing the default variable name, see ADDRESS VOX Return Information in this chapter.
Default: VOX.GETDIGITS
(Optional) Directs return information to a specific destination. For a list of valid destination values, see ADDRESS VOX Return Information in this chapter.
Default: REXX
(Optional) Specifies whether the GETDIGITS command's return string appears as a single string of digits in one variable (rather than as individual digits in separate variables).
Default: SINGLESTRING(YES)
Return Information:
After the GETDIGITS command executes, it sets the special REXX return code variable RC.
If you specify the optional SINGLESTRING(NO) operand, the GETDIGITS command returns this information in each of the VOX.GETDIGITS variables (VOX.GETDIGITS.1 through VOX.GETDIGITS.n):
|
Field |
Description of Returned Information |
|
1 |
A single digit entered by the remote party or sent by the telephone company. |
|
2 |
The tone type of the digit that was retrieved:
MF-Multi-Frequency |
The value stored in the VOX.GETDIGITS.0 variable represents the number of tone digits that were retrieved.
Example:
The following REXX code illustrates how to use the GETDIGITS command to collect a remote user's personal identification number (PIN) entered from the telephone keypad:
/* Get exclusive access to a specific voice channel. */
/* If the channel is in use, wait up to two minutes */
/* for it to become available. */
address vox 'getchannel channelnum(1) timeout(1200) prefix(handle)'
...
/* Prompt the remote party to enter a PIN. */
address vox 'play channel('handle') file(entrpin.vox)'
/* Collect the PIN digits entered. */
address vox 'getdigits channel('handle') count(8) singlestring(yes) prefix(response)'
...
/* Release the voice channel. */
address vox 'releasechannel channel('handle')
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|