Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bertrand-lupart/aa611424ed250b714dae542a343d6255 to your computer and use it in GitHub Desktop.
Save bertrand-lupart/aa611424ed250b714dae542a343d6255 to your computer and use it in GitHub Desktop.
Asterisk dialplan fragment for interactive dialplan incorrect extension feedback
[acme-attendant]
; Simple Auto-attendant - call 1234 to get prompted a personnal extension
exten => 1234,1,Ringing()
same => n,Wait(3)
same => n,Background(enter-ext-of-person)
same => n,Dumpchan()
same => n,WaitExten(10)
same => n,Hangup()
; Include here personal extensions, for example
exten => _97XXX,1,Dial(IAX2/farfaraway/${EXTEN},60)
; In case dialer typed an incorrect extension...
; ...or asterisk munched some DTMF (you may need relaxdtmf=yes)
exten => i,1,Verbose(${CONTEXT} : ${CALLERID(num)} dialed invalid extension ${INVALID_EXTEN})
same => n,Dumpchan()
same => n,PlayBack(beeperr&invalid)
same => n,SayDigits(${INVALID_EXTEN})
same => n,Hangup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment