A Simple IVR: Unable to get Asterisk to auto answer

This is my first post :smile: I am new to Asterisk and I am trying to learn how to setup some basic things. I have installed Asterisk 13.0.1 (AsteriskNOW) and I managed to create 3 extensions: 201, 202 and 203. I have LinPhone installed on those 3 extensions and I can call each other (no outbound trunk setup yet). So far so good.

Now, I wanted to convert the extension 203 to an IVR so when I call that extension from the other phones (201 and 202), I will be greeted with an IVR.

This is what I have done so far:

  1. I modified the context of 203 extension in FreePBX to ivr-test. 201 and 202 uses the default context set by FreePBX [from-internal]
  2. I created the ivr-test context in extensions.conf (code below)
  3. Reloaded the dialplan and also rebooted the entire server.
  4. When I call 203 from 201, it rings my LinPhone connected to 203 instead of Asterisk auto answering with the IVR.

extensions.conf context ivr-test

    [ivr-test]
    exten => 203, 1, Answer()
    exten => 203, n, SayPhonetic("Please Enter a Four Digit Number")
    exten => 203, n, WaitExten(15)
    exten => _XXXX, 1, SayDigits(${EXTEN})
    exten => _XXXX, n, Hangup()

What do I need to do to make Asterisk auto answer the extension and play IVR prompts? I have not changed the extensions.conf besides the above addition.

Update

I deleted the default extensions.conf and created a new one. I managed to get the IVR working but now trying to capture the digits that are entered during the prompt but somehow it is not working.

My entire extensions.conf file now looks like:

[general]

[ivr-test]
exten => 203, 1, Answer()
exten => 203, n, Background(please-enter-your-extension-then-press-pound)
exten => 203, n, Background(en/silence/9)
exten => 203, n, Hangup()

exten => _XXXX, 1, SayDigits(${EXTEN})
exten => _XXXX, n, Background(en/thanks-for-calling-today)
exten => _XXXX, n, Hangup()

[from-internal]
exten => 201, 1, Dial(SIP/201)
exten => 202, 1, Dial(SIP/202)
exten => 203, 1, Goto(ivr-test,203,1)[/code]

When I do: [i]dialplan show 203@ivr-test[/i]

[code]

'203' =>          1. Answer()                                   [pbx_config]
                    2. Background(please-enter-your-extension-then-press-pound) [pbx_config]
                    3. Background(en/silence/9)                   [pbx_config]
                    4. Hangup()                                   [pbx_config]

[/code]

When I do: [i]dialplan show 1234@ivr-test[/i]
[code][ Context 'ivr-test' created by 'pbx_config' ]
  '_XXXX' =>        1. SayDigits(${EXTEN})                        [pbx_config]
                         2. Background(en/thanks-for-calling-today)    [pbx_config]
                         3. Hangup()                                   [pbx_config]

Even though dial plan shows that 1234 goes to the steps above, when I enter it at the IVR prompt, it just hangs up after playing the silence.

Should I be doing something to handle key press to a pattern once you are in the context?

Thanks!

We have no expertise on FreePBX here, and modifying extension.conf itself is not allowed under FreePBX.

sayphonetic doesn’t make sense here, It will read every letter individually: Papa Lima Echo Alpha Sierra Echo…

Basic IVRs are sufficiently common that you should be able to find an example without any help.

I imagine FreePBX has re-instated its dialplan for 203.

I think you need to move this to community.freepbx.org/

Thank you david55. You are right, FreePBX probably was adding a lot of extra things. Per my update above, I managed to get it working when I removed the default extensions.conf (FreePBX complains about it, however).

Will this forum (possibly a different section) be relevant for posting dial plan questions? or would you I recommend I use some other forum?

I have been learning the basics from here: the-asterisk-book.com/1.6/einfache-ivr.html. Not sure if I should use some other resources to learn more.

Thanks for your help!

This is the right question for dialplans questions where you completely control the dialplan. It is not a good place to ask a bout dialplans generated by GUIs or expected to coexist with such dialplans.

Maybe you have a DTMF misconfiguration.

WaitExten is better than Background(silence…)