Wait doesn't read DTMF? Was Re: [Asterisk-Users] Collecting dialed digits

Steven Critchfield critch at basesys.com
Thu Apr 24 15:20:05 MST 2003


On Thu, 2003-04-24 at 16:52, James Hines wrote:
> On Thu, 2003-04-24 at 16:00, Tilghman Lesher wrote:
> > On Thursday 24 April 2003 13:49, JKNUTSEN at UP.COM wrote:
> > > I am trying to set up an auto attendant for the first time,
> > > and am having trouble getting to the submenu.  My
> > > extensions.conf file looks like this:
> > >
> > > [incoming]
> > >
> > > exten=> s,1,Background,menu1
> > > exten=> s,2,Wait,20
> > > exten=> s,3,Goto,s|1
> > >
> > > exten=> 1,1,Playback,option1
> > > exten=> 2,1,Playback,option2
> > > exten=> 3,1,Playback,option3
> > 
> > You should instead take advantage of the timeout.  Asterisk will
> > not receive DTMF during a Wait.
> > 
> 
> 
> Wow, this is not something that I was aware of. I think this might be
> causing some of the "DTMF detection problems"  my users have been
> reporting. I use Wait's in between playing menu options, and after I
> answer. If people are pressing digits during this time they'll get
> hosed. I did some looking and I didn't see a way to do a wait that
> doesn't throw away the digits.. am I missing something, or should I add
> a built-in (Say, "Pause"?) that won't throw away the frames (or is this
> a bug and Wait wasn't really supposed be throwing away data)?

Actually you use a timeout and a timeout extension. 

Basically like this

[incoming]
exten => s,1,Answer
exten => s,2,Wait,1 ; lets the line fully init and the person to have 
		; the phone on the ear
exten => s,3,DigitTimeout,5
exten => s,4,ResponseTimeout,10
exten => s,5,Background,menu-incoming ; note background allows DTMF 
			; detection during playback

exten => 1,1,Background,option1
exten => 2,1,Background,option2
exten => 3,1,Background,option3

exten => t,1,Goto,s|5 ; On timeout loop to menu
exten => i,1,Playback,invalid
exten => i,2,Goto,s|5 ; on invalid notify, and loop

-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list