[IVR]
exten => 99999,1,noop
; answer before playing the sound files
exten => 99999,n,answer
exten => 99999,n,wait(1)
exten => 99999,n,Set(TIMEOUT(digit)=2)
exten => 99999,n,Set(TIMEOUT(response)=10)
exten => 99999,n,Background(sound/custom-welcome)
; use H to let caller hangup a ringing call to agent by disconnect key seq in features.conf
; use n such No retries on the timeout; will exit this application and go to the next step.
; otherwise, caller still stays in the queue redialing to agent
exten => 99999,n,Queue(queue,Hn,,,120)
; customer leaves voice message by keying '*' or upon wait timeout of 120s
exten => 99999,n,VoiceMail(1234@ivr)