Endpoint, AOR, Contact, Extension, ... - Entity types and their relationships

Hello,

I’m new to Asterisk and try to find out more about the terms, the concepts behind and their relationships.

Let’s say, I have this setup:

  • My public phone number range is 123X with X being a “dialplan like” pattern for a digit 0-9.
  • We are 3 persons, each one gets an internal extension number, e.g. Alex (1), Ben (2) and Christine (3). From the outside, Ben could be reached via 1232.
  • Each of us has a desk phone (e.g. SNOM) and uses a softphone (e.g. Zoiper). If Alex (1) dials just 3, Christine’s both phones (desk phone AND softphone) shall ring. So Alex doesn’t have to know whether Christine is at her desk or somewhere else.
  • If someone calls 1230 from outside, I want Asterisk to dial Alex, Ben and Christine parallely, including all their phones.

I have these login accounts, each of them with a custom password:

  • softphonealex → Alex (1)
  • softphoneben → Ben (2)
  • softphonechristine → Christine (3)
  • desk00e5a902d988 (derived from MAC address of device) → Alex (1)
  • desk00e5a902de96 → Ben (2)
  • desk00e5a902e032 → Christine (3)

What in this example is the “endpoint”, what is “AOR”??? and what’s the extension?

An Entity relationship model (ERM) about the Asterisk terms would be a great help!

My guess:

  • 0, 1, 2 and 3 are the extensions in the dialplan.
  • softphonealex, desk00e5a902d988, … are endpoints (devices) on the one hand and login usernames (credentials) mapped to a password on the other hand.
  • What’s an AOR? And what is “max contacts” in terms of an AOR?
  • What’s a contact?

How are these concepts related to the database tables

  • ps_endpoints
  • ps_auths
  • ps_aors
  • ps_contacts
  • ps_endpoint_id_ips
  • extensions == Dialplan that can be defined in database instead of config file?

Thanks a lot for education and advice!
Reg

In your description, 0 is not an extension, but 1230, 1231, 1232, and 1233 are extensions, although you might implement the last three as a single _123[123] that jumps to 1, 2, and 3. You might also actually implement 0 for your local phones, and use _123[0123]

You actually have a strange system, in that your local users can’t make outgoing calls, otherwise you would need at least one extension for that.

By using different authentication for soft and desk phones, I think you have forced a degenerate case where as well as only having one AOR per endpoint (which is the usual Asterisk case), you also have only one active contact for each AOR.

The more normal Asterisk case would be that soft and hard phones would use the same authentication, for any given person, and max_contacts would be at least two, to allow both to register at the same time. max_contacts is the maximum number of active registrations incoming to the AOR.

contact would be used for outgoing calls to the provider, as no provider will register to you, so max_contacts can be zero, as that only applies to contacts provided by REGISTER.

(I don’t think I’ve seen examples with multiple AORs, for an endpoint, but I think the endpoint name would be either the from user name or the authentication user, and and the AOR would be the name under which the phone actually registers (the To header user in the incoming REGISTER.

Providers generally identify by IP address, so the endpoint name doesn’t matter for them.)

I don’t recognize the ps_ names. I assume they are related to Asterisk Realtime Architecture, rather than .conf files.

I’d guess ps_endpoint_id_ips is a relational normalisation of the list of IP address ranges in a type=identify section, which you would, typically use, to match the provider enpoint against traffic from the provider.

Your system is far too small to justify using a database for the configuration.

David, thank you very much for your answer! :blush:

I probably think too much inside the box of the old ISDN PBX I’m coming from. :frowning:

In my country, phone numbers for businesses are often assigned in blocks, a bit similar to /24 or /16 IP subnets. You get a “base number” (prefix) and the suffix of 1, 2 or maybe even 4 or 5 digits are at your disposal. So you get a “block” of 10, 100, … numbers.
A national phone number, including area code, might look like: 01234 / 56789 - XX where 01234 is the area code of your city, 56789 is your company’s “base number” and XX (0 - 99) can be assigned to your employees, call groups, fax machines whatever. The “extension” 0 is usually the “central” phone number, customers would dial or that you’d put on the company’s home page.
Inside your company, you simply dial “11” to reach your colleague, while people from outside would have to dial 012345678911.
If you want to make an outgoing call, you prepend a 0 to the number. So if you want to dial the national number 02345678, you’d type 002345678.

I want to replace such an old “plug and play” ISDN hardware PBX (in a very small scale) by an Asterisk installation.

As a connection to the PSTN, we are provided a SIP trunk.

Oh, that was just my intuitive approach. If it shouldn’t be done that way, I won’t! :hugs:

Can I think of AOR as of “Alex”, “Ben” and “Christine”, with each of them having 2 endpoints (desk phone and softphone)? (See attached sketch.)

Then I’d follow this approach!

That’s probably the case. I just tried to follow the steps I found in “Asterisk - The Definitive Guide” by Van Meggelen et al. Their example setup uses a database.

Auth is not a foreign key of AOR. The only foreign keys referencing Auth are in endpoint and registration.

I meant to note that many providers do not provide the direct in dialling information in the request URI, so it may need to be extracted before it can used as an extension, although normal practice is to use it as an extension. The initial extension for incoming calls may be taken from the user part of the client URI used in registration, or may be “s”, if there is no use part in the request URI.

The AOR endpoint relationship is many AORs to one endpoint. (Actually, the config files would allow a many to many relationship, but I’d have to try it to see if that worked,).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.