Current simple IVR example?

Hello,

I have a small Asterisk 16.28.0 install running 3 extensions at the moment with a trunk to my ITSP. I have seen a few example IVR dialplans for basic “send to voicemail” if no answer, but I was wondering if anyone could point me to a more current example extensions.conf with a basic IVR.

In my use case I am trying to configure “from-pstn” to go to voicemail after 5:00pm local time. I plan to use the system as a small pbx for my consulting business and thought why not use it as a small voicemail server after hours, then ring my main desk extension 8-5. I don’t think the syntax has changed much for the dialplan, but I am pretty new to tuning asterisk. Everything is working great, working on implementing TLS after absorbing the docs a little more.

I believe I need something like this:

; During job hours, jump to main-ivr context.
; During closed hours, jumpt to offices-closed.
same => n,GotoIfTime(8:00-16:30,mon-fri,*,*?main-ivr,s,1:offices-closed)

Here is my current dialplan:
155 being the main desk extension I use.

[from-pstn]
; dial desk line
exten => _+1NXXXXXXXXX,1,Dial(PJSIP/155)


[from-internal]
exten => _NXXNXXXXXX,1,Set(CALLERID(all)="myname" <+1423xxxxxxx>)
same => n,Dial(PJSIP/+1${EXTEN}@twilio-na-us)
same => n(end),Hangup()

; Extensions
exten = 155,1,Dial(PJSIP/155,20)
exten = 255,1,Dial(PJSIP/255,20)
exten = 355,1,Dial(PJSIP/355,20)

; Test
exten = 1000,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()

I will continue my search, but thought I would ask, since I don’t know what has changed since version 12 and the like if anything. My setup is pretty much the stock suggestions from Twillio, but it meets our needs as is. I can share more details if needed.

Thank for any sanity check!

Voicemail is coming along, got some test mailboxes.

[from-internal]
exten => _NXXNXXXXXX,1,Set(CALLERID(all)="myname" <+1423xxxxxxx>)
same => n,Dial(PJSIP/+1${EXTEN}@twilio-na-us)
same => n(end),Hangup()

; Extensions
; 100 = IVR

exten => 155,1,NoOp(Call for main desk)
same => n,Dial(PJSIP/155,20)
same => n,VoiceMail(${EXTEN})
same => n,Hangup

exten => 255,1,Dial(PJSIP/255,20)
same => n,VoiceMail(${EXTEN})
same => n,Hangup

exten => 355,1,Dial(PJSIP/355,20)
same => n,VoiceMail(${EXTEN})
same => n,Hangup

exten => *999,1,NoOp()
same => n,VoiceMailMain()
same => n,Hangup

Need to make the extensions a bit more consistent.
Right now hung up on getting into the VoiceMailMain() application, phone gives “Account not registered” for some reason when I use *999. But getting there.

Well not sure what my issue was, but after bouncing the service all is working as expected and the call trace looks great. Now onto setting up the email stuff.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.