UserInput command
The Userinput command executes commands in the current API extension call specified between nodes by the time it waits for the user to press DTMF keys. It is widely used to make IVR-s. You can add menu entries to it and give different commands to be executed by entering different menu entries. You can build multi level IVR menu systems by nesting more Userinput commands into eachother.
Parameters
Parameter name | Example value | Description | Mandatory |
BackKey | * | DTMF key to return to the upper menu level if this UserInputCommand is nested in another UserInputCommand. Otherwise the remaining commands will after this will be executed. | no |
Digits | 1 | Specified number of digits to wait for the user to input. If this parameter is omitted, the default digits will be 1. | no |
ExecuteSQL | The SQL query to be executed when the user entered the specified number of digits. | no | |
ForwardToURL | This URL (if not empty) will be requested when the user entered the specified number of digits, and these digits are not specified as key parameter in the Input sections. | no | |
MaxDigits | 1 | Specified maximum number of digits to wait for the user to input. If this parameter is omitted, the default digits will be 1. | no |
MinDigits | 1 | Specified minimum number of digits to wait for the user to input. If this parameter is omitted, the default digits will be 1. | no |
Repeat | false | If set to true, repeats the initial commands after the timeout, when the user is not pressnig any of the DTMF keys. | no |
Timeout | 10 | Timeout in seconds to repeat the initial commands or exit from the current user input command when repeat is not set. | no |
OzML example
This example is a great demonstration of how to use the UserInput command. First, as you can see, the command set to repeat the initial commands in every ten seconds if there is no user intersaction. The InitialCommands is a set of Speak commands, which informs the user how to use the functions of the IVR. Next, the Inputs waits for the key presses, and call the right Input tag depends on which key was pressed.
<?xml version="1.0"?> <Response> <UserInput timeout="10" repeat="true"> <InitialCommands> <Speak>Welcome to the Ozeki 10 Phone System IVR.</Speak> <Speak>To send an SMS, press 1.</Speak> <Speak>To do nothing, press 2.</Speak> <Speak>To transfer the call to 101, press 3.</Speak> </InitialCommands> <Inputs> <Input key="1"> <Speak>A test SMS will be sent.</Speak> <SendSms recipient="45026467">Hello from Ozeki 10 Phone System!</SendSms> </Input> <Input key="2"> <Speak>You pressed button 2. You did nothing.</Speak> </Input> <Input key="3"> <BlindTransfer>102</BlindTransfer> <Speak>Sorry, but blind transfer failed to extension 101.</Speak> </Input> </Inputs> </UserInput> </Response>
More information
- AttendedTransfer command
- BlindTransfer command
- Call command
- ForwardCall command
- ListCallHistory command
- Hangup command
- Hold command
- ListActiveCalls command
- ListExtensions command
- ListExtensionTypes command
- Play command
- Record command
- Request command
- SendDTMF command
- Speak
- Unhold command
- ReceiveMessage command
- SendEmail command
- SendMessage command
- SendSMS command
- Array command
- Beep command
- Delay command
- DeleteFile command
- ForEach command
- GoTo command
- MoveFile command
- Reject command
- Route command
- SendAlarmNotification command
- SendMsg command
- UserInput command
- Var command
- WaitForMsg command
- CallSetup command
- Exit command
- ListAddressbokkContacts
- ListAddressbookNames command
- ReceiveAlarmNotification