IVR and music on hold

Hi.
I am running asterisk 1.6 on a system without gui.
i would like when someone calls one of the external lines to get an IVR prompt, for example:
-press 1 to secretary (ext. 10)
-press 2 to lab (ext. 11)
-press 3 to office 1 (ext. 12)

So if someone presses 10 to go to secretary, and at that time the secretary is busy, i would like the person to get a music on hold or something similar to wait.

could someone help me construct the IVR?

you could put the secretary into a queue. When people press 1, they go to the secretary queue.
music on hold could be played from the queue while they are waiting their turn to be answered.

extensions.conf

exten => 111,1,Macro(queueloginout,secretary)
[ivrstart]
exten => s,1,Noop(IVR Start)
exten => s,n,Answer
exten => s,n,Ringing
exten => s,n,Wait(3)
exten => s,n(again),Background(mainmenu)
exten => s,n,WaitExten(15)
exten => s,n,hangup
exten => 1,1,Queue(secretary)
exten => 2,1,Dial(SIP/11)
exten => 3,1,Dial(SIP/12)
exten => i,1,goto(s,again)
[macro-queueloginout]
exten => s,1,Answer
exten => s,n,NoCDR
exten => s,n,AddQueueMember(${ARG1})
exten => s,n,gotoif($[ ${AQMSTATUS}=MEMBERALREADY ]?logout)
exten => s,n,Playback(agent-loginok)
exten => s,n,Hangup
exten => s,n(logout),RemoveQueueMember(${ARG1})
exten => s,n,Playback(agent-loggedoff)
exten => s,n,Hangup

queues.conf

[secretary]
autofill=yes
autopause=no
maxlen=0
joinempty=no
leavewhenempty=yes
ringinuse=no
strategy=rrmemory
timeout=10
reportholdtime=yes
wrapuptime=10
eventwhencalled=yes

Hi,

Maybe you should try with Visual Diaplan tool, it’s easy to use, here is what I made in few minutes.
This is the dial plan you want:

And here you can find real world IVR dial plan you can modify according to your needs:
codezone.apstel.com/tiki-index.p … ith+queues