New user lost in extensions

This is an asterisk novice question. I have worked in networking and systems for nearly 30 years. I have spent the last few hours reading whatever I could find on asterisk, yet I find majority of documentation on extensions incomprehensible. I’m having a sendmail deja vu.

I’ve installed asterisk on CentOS 6.3 without problems. I have configured a couple of simple users in sip.conf:

[2001]
type=friend
host=dynamic
directmedia=yes
secret=2001

[2012]
type=friend
host=dynamic
directmedia=yes
secret=2002

When comes to configuring extensions.ael I am lost. I just want those two users to be able to call each other, nothing fancy. I am using X-lite phones, and they seem to register okay. Whenever they call, I get a message in asterisk log:

Call from ‘2012’ (10.0.0.200:25846) to extension ‘2001’ rejected because extension not found in context ‘default’.

So I tried to add them to extensions.ael in section ael-default, as that file seems to suggest:

2001 => Dial(IAX2/${EXTEN},rm);

I don’t know if it makes any sense because I can’t find any explanation of most of those options. However, I figure at least asterisk will see the extension. No such luck. I tried to change the name of the context from ael-default to default, but then I got other errors when launching asterisk.

Can anyone point me at an example on how to make two sip phones call each other? I don’t need voicemail, fancy rules, nothing. This is for testing only.

In fact, just when loading with default extensions.ael I get an error message in logs:

ael/pval.c: Warning: file /etc/asterisk/extensions.ael, line 285-291: The included context ‘ael-default’ cannot be found.

but it does exist - line 386:

context ael-default {

although everything inside is commented out, but those are just examples, right? There doesn’t seem to be anything generic there.

Oh, and modules.conf has the line:

autoload=yes

in it.

Most people use extensions.conf, not extensions.ael.

For documentation on application parameters, type “core show application xxxx” at the CLI prompt. If you don’t get anything, you were missing a dependency to the XML library when you built the code. The documentation is also available as an appendix to the book at wwww.asteriskdocs.org/

There should be examples in extensions.conf.sample or the equivalent ael one. Given that you have not followed the security advice, an extensions.conf of:

[default]
exten => _X.,1,Dial(SIP/${EXTEN})

should be sufficient.

However, it is bad practice for the sip.conf section names to be extension numbers and one would normally reserve the default context for untrusted callers, and use a more privileged one for insiders. Also, there is no need to use type=friend. type=peer should cause you less problems.

There are GUI front ends, like FreePBX, that allow you to ignore the low level details (except if you want to do something unusual, or things go wrong).

I was following advice found here:

http://lists.digium.com/pipermail/asterisk-users/2007-October/197613.html

I will read it.

I assure you, I couldn’t have come up with that on my own. :smile: I picked it up from a couple of examples on the web.

What would you recommend that I make them, then?

Corrected.

Thank you for your post.

And they’re calling each other. Life is good.

Thanks again for your help.