IVR with submenu

I need help with creating an IVR please. Here is basically what i want to do:

Answer Call:

Play Welcome:

Play “For XYZ press 1”

play message, if press2 after message then transfer to 10 sec hold music and then voicemail box 6101 otherwise if just hold on line send to voicemail 6100

Play "For XYZ press 2"
if press 2:
play 10 sec hold music then transfer to voicemail box 6101

ANyone know any samples or can write a simple version for me i wouldl be forever greatful

[your source dir]/asterisk-1.2.X/configs/extensions.conf.sample
search there for
;[mainmenu]

;[submenu]

there is some cool links taht will help You
forums.digium.com/viewtopic.php?t=4208

Thank You sooo much for your quick and accurate response. I would have never thought to look in the sample file duuuhh. Anyway here is what I came up with that works perfect for me also i learned a new trick along the way executing a command on timeout AWESOME!!

[IVR-MAIN]

exten => s,1,Answer
exten => s,n,Background(main)
exten => s,n,WaitExten
exten => 1,1,Goto(IVR-SUB1,s,1)
exten => 2,1,Goto(IVR-SUB2,s,1)

[IVR-SUB1]
exten => s,1,Background(menu1)
exten => s,n,WaitExten(5)
exten => 2,1,Goto(IVR-SUB2,s,1)
exten => s,2,Voicemail(s6100)
exten => t,1,Voicemail(s6100)

[LDJAXIVR-SUB2]
exten => s,1,Playback(hold)
exten => s,n,Playback(menu2)
exten => s,n,Voicemail(s6101)

[quote=“fdragowski”][your source dir]/asterisk-1.2.X/configs/extensions.conf.sample
search there for
;[mainmenu]

;[submenu]

there is some cool links taht will help You
forums.digium.com/viewtopic.php?t=4208[/quote]