Here are a couple of custom apps may you find useful in setting up an IVR.
First is to send an incoming caller directly to a mailbox.
[custom-vmxxxx]
exten => s,1,Voicemail,uxxxx
exten => s,2,Hangup()
where xxxx is the extension voicemail you want the call to go to
Second is giving an incoming caller access to DISA. DISA is internal dial tone. I make this a hidden option so that if I am away from the office at say a client site I can dial in on my PSTN (local calls in NZ are free), press the unannounced option for DISA, enter the password and get local dialtone from the office.
[custom-disa]
exten => s,1,Answer
exten => s,2,DigitTimeout(5)
exten => s,3,ResponseTimeout(10)
exten => s,4,Authenticate(****) ; replace **** with a numerical password
exten => s,5,DISA(no-password|from-internal)
The third is an example of dialling a number via a trunk
In this example I am calling my NZ mobile via Voipjet in the USA.
[custom-mobile]
exten => s,1,Dial(IAX2/user@voipjet/011642XXXXXXX,45,r)
exten => s,2,Hangup
011 is the number I use to access the Voipjet route, 64 is NZ country code, 2 is mobile code.
Jon