Name
Read() — Reads DTMF digits from the caller and assigns the result to a variable
Synopsis
Read(variable[,filename[,maxdigits[,option[,attempts[,timeout]]]]])
Reads a #-terminated
string of digits from the user in to the given
variable.
Other arguments include:
filenameSpecifies the file to play before reading digits.
maxdigitsSets the maximum acceptable number of digits. If this argument is specified, the application stops reading after
maxdigitshave been entered (without requiring the user to press the#key). Defaults to0(no limit, wait for the user to press the#key). Any value below0means the same. The maximum accepted value is255.optionZero or more of the following options:
sReturn immediately if the line is not answered.
iInterpret the filename as an indication tone setting from indications.conf.
nRead digits even if the line has not been answered.
attemptsIf greater than
1, that many attempts will be made in the event that no data is entered.timeoutIf greater than
0, that value will override the default timeout.
; read a two-digit number and repeat it back to the caller
exten => 123,1,Read(NUMBER,,2)
exten => 123,2,SayNumber(${NUMBER})
exten => 123,3,Goto(1)