[asterisk-users] how to flush user input before READ()

D'Arcy J.M. Cain darcy at Vex.Net
Tue Jan 19 11:53:36 CST 2016


On Tue, 19 Jan 2016 09:02:30 -0800 (PST)
Steve Edwards <asterisk.org at sedwards.com> wrote:
> >>> How about a read() to a dummy variable with a 1 second timeout to 
> >>> consume the octothorpe and password?
> 
> If 1 second is too long, you could write an AGI to use the 'wait for 
> digit' AGI command which allows the timeout to be specified in 
> milliseconds.

If I understand it the OP has un-consumed input and is just looking for
the shortest possible time to read it.  Would a read with a timeout of
zero do the job or would Asterisk optimize away the call?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net
VoIP: sip:darcy at Vex.Net



More information about the asterisk-users mailing list