This page looks best with JavaScript enabled

IVR Asterisk

 ·  🎃 kr0m

Following our series of articles related to Asterisk, we arrive at IVRs (Interactive Voice Response), which are telephone menus that allow us to choose between different options, press 1 for… 2 for… What we are going to do is configure a context where PSTN calls will enter and from here send them where it suits us, in this case, we are going to play a recording giving three options.

  • 1 –> Ext 23
  • 2 –> Ext 26
  • 3 –> Ext 36
  • Default –> Ext 22

If any of the extensions do not respond, a voicemail will be left.

[from_pstn]
exten => _X.,n,Goto(ivr,s,1)

[ivr]
exten => s,1,Answer()
exten => s,n,Background(Welcome)
exten => s,n,NoOp(############### ESPERANDO ENTRADA ########################)
exten => s,n,WaitExten(5)
exten => s,n,Dial(SIP/22)

exten => 1,1,NoOp(################################### OPCION 1 ##########################################)
;exten => 1,n,Dial(SIP/23,10,r)
exten => 1,n,VoiceMail(23,s)
exten => 1,n,HangUp()

exten => 2,1,NoOp(################################### OPCION 2 ##########################################)
exten => 2,n,Dial(SIP/26)
exten => 2,n,VoiceMail(26,s)
exten => 2,n,HangUp()

exten => 3,1,NoOp(################################### OPCION 3 ##########################################)
exten => 3,n,Dial(SIP/36)
exten => h,1,HangUp()
If you liked the article, you can treat me to a RedBull here