Read( )

Read( ) Reads DTMF digits from the caller and assign the result to a variable

 Read(   variable   [,   filename   ][,   maxdigits   ][,   option   ][,   attempts   ][,   timeout   ]) 

Reads a # - terminated string of digits a certain number of times from the user into the given variable .

Other arguments include:


Specifies the file to play before reading digits.


Sets the maximum acceptable number of digits. If this argument is specified, the application stops reading after maxdigits have been entered (without requiring the user to press the # key). Defaults to 0- (no limit, wait for the user to press the # key). Any value below means the same. The maximum accepted value is 255 .


Specify skip to return immediately if the line is not answered , or noanswer to read digits even if the line is not answered.


If greater than 1 , that many attempts will be made in the event that no data is entered.


If greater than , that value will override the default timeout.

Returns -1 on hangup or error and otherwise .

 ; 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) 

See Also

SendDTMF( )

Asterisk. The Future of Telephony
Asterisk: The Future of Telephony: The Future of Telephony
Year: 2001
Pages: 380

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: