Grouping extensions

i want to group numbers , say 1 to 10, for different user groups . But only “superphone“ can dial its own group. Exm: if i dial 5 from my phone, it should call to 5 in its user group, not in another.

Is this thing possible? I have read docs but couldn’t get at all, it is trunk related or what.

On Tuesday 16 December 2025 at 13:24:28, rashadmlk via Asterisk Community
wrote:

i want to group numbers , say 1 to 10, for different user groups.

Asterisk has no concept of User Groups.

But only “superphone“ can dial its own group. Exm: if i dial 5 from my
phone, it should call to 5 in its user group, not in another.

Have you already designed some way to define these Groups? If so, you should
share that information with us, otherwise we have no idea how Asterisk can
tell which Group a given endpoint device has been associated with.

Is this thing possible? I have read docs but couldn’t get at all, it is
trunk related or what.

A “trunk” is commonly used to refer to an external connection to / from the
PSTN, and it sounds very unlikely that this is what you’re trying to do here.

Are you using “pure Asterisk” or do you have some system which happens to be
based on asterisk such as FreePBX or Issabel?

Please give us some idea of how you are defining your User Groups.

Antony.


René Descartes walks in to a bar.
The barman asks him “Do you want a drink?”
Descartes says “I think not,” and disappears.

I want to set specific amount of numbers for each group. 1 to n.
Users will register based on those numbers. So there may be two users on extension 1.
I want to seperate those users to groups, so i can call them individually. For differentiation logic i dont have idea.

If i press 1 on “superphoneA“ it should call 1 in its group.

If i press 1 on “superphoneB“ it should call 1 in its group.

using pure asterisk

On Tuesday 16 December 2025 at 13:54:48, rashadmlk via Asterisk Community
wrote:

I want to set specific amount of numbers for each group. 1 to n.
Users will register based on those numbers. So there may be two users on
extension 1. I want to seperate those users to groups, so i can call them
individually.

If i press 1 on “superphoneA“ it should call 1 in its group.

If i press 1 on “superphoneB“ it should call 1 in its group.

I’m sorry, but this really is insufficient information for me to have a clear
idea of what you’re trying to do or how you expect it to work.

For example “I want to set specific amount of numbers for each group. 1 to n”

I assume that n is the number of numbers in the group, but what does “numbers”
mean? Are you talking about DDIs which can be dialled from the outside world,
or are you referring to the numbers associated with endpoint devices (commonly
called “extension numbers”, although Asterisk uses the word “extension” to
mean something completely different)?

“Users will register based on those numbers.”

What do you mean by “register”? Are you talking about the SIP REGISTER
command, or do you mean something less formal - please clarify.

“there may be two users on extension 1”

How are these users distinguished from each other? Do you mean that if
someone else dials “1” then both these users’ phones will ring?

“I want to seperate those users to groups”

How is a group defined? What associates a user with a group?

Antony.


“The future is already here. It’s just not evenly distributed yet.”

  • William Gibson

How about using a database…

  • table.id
  • extension
  • group
  • group_pos

Add extensions to the table add the group number and group position.

When you make a call to a one digit number select your group based on the calling extension and select the extension you need to call based on the digit you dial… Then call that extension.

Just a quick option you could try…

No, extention numbers i mean.

Wish i could understand that too

Yes,

I am thinking on that, first, i thought maybe different context for each group would do my job, but then i see it won’t work, or to use call_group somehow

That is most likely the solution. Now i have to figure out how. I was thinking to implement db later but seems it is time. Thanks for help both of you.

Remember that extension numbers are interpreted relative to a context. Make each “group” into its own separate context.

1 Like

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