Simple IVR menu help?

I have a problem. I have a small voip network and want to make a simple IVR but I need help. I have four extensions, and the one that receives calls is an analogue phone. All I want to make is when I receive a call that a user can press 1 for extension (301) or 2 for extension (302), and that’s it. Can anybody help me pleeeease? I need specific instructions.

First, have you tried playing with “Playback” and “Background”?

[default]
exten => 99,1,Goto(menu,s,1)

[menu]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Background(default)

exten => 1,1,Dial(SIP/301)
exten => 1,2,Hangup

exten => 2,1,Dial(SIP/302)
exten => 2,2,Hangup

Is this correct? I still haven’t tried this option, but I will today. I’m just interested if it’s correct.

Is it intended for illustration purposes for this thread, a typo, or is it really

[default]
exten => 99,1,Goto(menu,s,1)

[menu]
exten => s,2,Answer
.
.
.

I haven’t tried it yet but "exten => s,2,Answer " seems to have a problem. I always use 1 as the first priority. I assume that you are using a TDM card. Have you tried calling your box from the outside(from a cell perhaps)?

The phone that you are referring to as analogue which receives the calls, is it connected to an ATA or to the TDM card?

Sorry, my mistake I corrected it:

[menu]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Background(default)

The analogue phone is connected to FXS module of the digium. What do you think? Will this solution work?

And you have a FXO port for your phone line?

Yes

[menu]

exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Background(default)

Will definitely handle the greeting part of your IVR. Enabling the caller to hear the options. Just include a hangup and timeout for cases on which the caller took so long to enter an option.

exten => 1,1,Dial(SIP/301)
exten => 1,n,Hangup

exten => 2,1,Dial(SIP/302)
exten => 2,n,Hangup

Will work if the caller choose 1 or 2.

Have you tried:

exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Dial(SIP/301)
exten => s,n,Hangup

for testing purposes?
Also try substituting your ZAP channel for the SIP so that you could verify first if it is working.

Better to test everything first so that when problems arise, you can easily narrow down the possible cause. :smiley:

Thnx a lot. I’ll try that. If there are some additional problems I’ll post them :wink:. And one more thing. Why did you replace the number 2 and 3 with n:

exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Background(default)

Sorry I didn’t noticed that :smiley: I got used to using “n” for subsequent priorities in a every single exten entry. It will help you a lot when your dial plans grows in length.

For example:

1,1,Answer()
1,2,Wait()
1,3,Background(default)
1,4,Dial(SIP/1)
1,5,Hangup

What if you later decided to insert a line between background and dial. Then you must re-number all subsequent lines. If you are using “n” then you don’t have to renumber then lines. Asterisk will automatically define what priority should be given on the next line. Believe me, when you are making 20 lines out of single exten

202,1,Answer()
.
.
.
.
.
202,20,Hangup

And you have to insert an additional line (worst case is the 2nd line) then only you will appreciate the very powerful “n” :smiley:

Thnx for the explanation :wink: I really appreciate it.