Ethy H. Brito
2016-Jan-19 11:53 UTC
[asterisk-users] how to flush user input before READ()
On Mon, 18 Jan 2016 16:09:17 -0200 "Ethy H. Brito" <ethy.brito at inexo.com.br> wrote:> On Mon, 18 Jan 2016 09:38:52 -0800 (PST) > Steve Edwards <asterisk.org at sedwards.com> wrote: > > > On Mon, 18 Jan 2016, Ethy H. Brito wrote: > > > > >> how to flush user input before READ()? > > > > How about a read() to a dummy variable with a 1 second timeout to consume > > the octothorpe and password? > > > It is an odd solution but i'll give it a try.To close the thread, the solution did "flush" the input as a side effect of the short timeout. Thank you mr. Edwards. Cheers Ethy> > Thanx; > > Ethy > > > > > > -- > > Thanks in advance, > > ------------------------------------------------------------------------- > > Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST > > > > -- > > _____________________________________________________________________ > > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > New to Asterisk? Join us for a live introductory webinar every Thurs: > > http://www.asterisk.org/hello > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- > > Ethy H. Brito /"\ > InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML > +55 (12) 3797-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL > S.J.Campos - Brasil / \ > > PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Ethy H. Brito /"\ InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML +55 (12) 3797-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL S.J.Campos - Brasil / \ PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc
Steve Edwards
2016-Jan-19 17:02 UTC
[asterisk-users] how to flush user input before READ()
>>> 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
D'Arcy J.M. Cain
2016-Jan-19 17:53 UTC
[asterisk-users] how to flush user input before READ()
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