I have set up a simple Auto Attendant similar to the example in Chapter 15 of the “Definitive Guide”, 4th edition, but the Background() function does not seem to be detecting DTMF digits. The digits are detected and acted upon only after the complete file has been played. So, for example, in menu options 2 and 3 in my extensions.conf (below), I cannot interrupt playback of the sound clip. Any ideas what the problem might be?
[general]
[globals]
[Incoming]
exten => s,1,Verbose(1, Call from caller ${CALLERID(all)} received)
same => n,Answer()
; sets the inter-digit timer
same => n,Set(TIMEOUT(digit)=2)
; wait one second to establish audio
same => n,Wait(1)
; play greeting
same => n,Background(greeting)
; play menu
same => n(menuprompt),Background(menu)
same => n,WaitExten(5) ; 5 second timeout
exten => 1,1,Verbose(1, Option 1 selected)
same => n,VoiceMail(500@default,u)
same => n,Verbose(1, Voicemail exited - hanging up)
same => n,Hangup()
exten => 2,1,Verbose(1, Option 2 selected)
same => n,Background(mus_morning_coffee)
same => n,Goto(s,menuprompt)
exten => 3,1,Verbose(1, Option 3 selected)
same => n,Background(mus_cold_day)
same => n,Goto(s,menuprompt)
exten => 4,1,Verbose(1, Option 4 selected)
same => n,Playback(goodbye)
same => n,Verbose(1, Hanging up)
same => n,Hangup()
exten => i,1,Verbose(1, Invalid selection)
same => n,Playback(invalid_selection)
same => n,Goto(s,menuprompt)
exten => t,1,Verbose(1, Menu timeout)
same => n,Playback(timeout)
same => n,Goto(4,1)