Voice menu

I am looking to configure askerisk to run somthing like this:

Answer call
Change Caller ID (to the number which the end caller dialed)
foward to secertary
wait 10 sec. for her to answer
then transfer to voicemail

With the execption of changing the Caller ID I have been able to write the extensions file to work to my needs. But there are a few things I would like to change/add.

First I would like to be able to add a promt after the 10 second time out which told the caller to enter a different extension, or hold for voicemail.

Then second which is not as big of a deal, after business hours change the promt to that it went directly to the “please enter another extension or hold for voicemail”

Can someone help me out with this?

Yes, please post the relevant section of your extension.conf file and I’ll show you how to modify it to do what you need.


exten => 3000,1,Answer
exten => 3000,2,Set(CALLERID(name)=Company)
exten => 3000,3,Dial(SIP/User1a,10,r)
exten => 3000,4,Background(vm-extension,10,r) 
exten => 3000,5,Wait(3)
exten => 3000,6,Voicemail(u300@default)

I was able to get the voice menus working after about 5 hours of compilling google results. But just the first part, I am still working on the after hours, any help there?



To check times you can use GotoIfTime, for example let’s say work time is from 9 am to 18 pm, monday to friday:

exten => 3000,1,Answer
exten => 3000,2,GotoIfTime(09:00-18:00,mon-fri,,?4)
exten => 3000,3,Goto(,6)
exten => 3000,4,Set(CALLERID(name)=Company)
exten => 3000,5,Dial(SIP/User1a,10,r)
exten => 3000,6,Background(vm-extension,10,r)
exten => 3000,7,Wait(3)
exten => 3000,8,Voicemail(u300@default)

For informations about GotoIfTime() check here: voip-info.org/wiki-Asterisk+cmd+GotoIfTime.