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

Steve Edwards asterisk.org at sedwards.com
Tue Jan 19 11:02:30 CST 2016


>>> On Mon, 18 Jan 2016, Ethy H. Brito wrote:
>>>
>>>>> how to flush user input before READ()?

>> On Mon, 18 Jan 2016 09:38:52 -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?

On Tue, 19 Jan 2016, Ethy H. Brito wrote:

> To close the thread, the solution did "flush" the input as a side effect 
> of the short timeout.

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.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST



More information about the asterisk-users mailing list