$number
= Accept ( [prompt], [count], [retry], [delay], [mask]
)
Accepts input from the telephone keypad.
Parameters
<prompt> The wave file to be played as a prompt.
[count] Maximum number of
digits the user can enter through the dial-pad. By default, it is one digit.
[retry] The number of retries allowed for inputs. Default value is 3.
[delay] The duration of seconds to wait for further inputs. By default, it allows 4 seconds delay.
[mask]
This filters the input. The default mask is "0123456789".
Return Value
Remarks
- All are
optional parameters.
- The Accept() function will accept
a maximum of [count] digits entered on the telephone keypad by the user by waiting for a duration of [delay] seconds in between the inputs. The entered value is stored into the specified variable, $number.
Example
MAIN:
Answer
Play "Welcome.wav"
//Please enter your user ID
$uid = Accept("UserId.wav",5,4)
//Please enter your account number
$accno = Accept("AccountNum.wav",5,4)
;......
;......
Hangup
goto MAIN