Can Extensions be Divided in Groups


I am trying to figure this out since about a month now.

Version being used:
Asterisk@Home: Version 2.0.1 (FPBX)
Asterisk@Home: Version 1.10.010

We created 20 extensions for the office as following:
4 Extentions: 1xxx : For Acc (Acc1, Acc2…)
4 Extensions: 2xxx : For NOC (Noc1, Noc2…)
4 for Support and rest in warehouse

And we want to somehow group it such, as Salesxx can ONLY call Salesxx

If Acc2 wants to call Noc1, it wont pass.

For outbound and inbound, the Trunks should work normal for all of them.

Here is what i tried:

I edited an extension (in extensions_additional.conf, under that specific extension), and changed the following parameters:





And then i was not able to call any other extension. So i edited one more extension with same settings, and i thought i would be able to call between, but i had no rights to call anywhere.


i edited extensions.conf, and found [from-internal], and added same settings for [from-internal-1], and then it was like before. I can call everywhere, even other extensions.

Practically, though the changed extensions’ context were different from others “from-internal-1”, i somehow gave them same rights.

Back to where i was.

I want to group specific extensions, so they are not able to call any extensions which are not in that group.

I hope i didnt mess up with my question.

Replies will be greatly appreciated.

You may want to ask that on the Trixbox forums.

i appreciate the reply, but i am not using Trixbox. So i posted here.

But i will try there also.


One solution to this is “ex-girlfriend” logic. here’s an example
exten => 1001,1,noop
exten => 1001,n,Set(ANS=0)
exten => 1001/1002,n,Set(ANS=1)
exten => 1001/1003,n,Set(ANS=1)
exten => 1001/1004,n/Set(ANS=1)
exten => 1001,n,Gotoif($[${ANS} != 1])?noconn)
exten => 1001,n,Answer()
exten => 1001,n,Hangup()
exten => 1001,n(noconn),Playback(tt-weasels)
exten => 1001,n,Hangup()

In this example, if 1002 calls 1001, the call is normal. If any other number calls 1001, weasels are played and the call hangs up.

Here’s a link to this information: … sions.conf

With FreeBPX (AMP) all the _additional.conf files will be overwritten when you click on the red bar. Any changes have to go in the .conf or _custom.conf files.

In extension.conf (or extensions_custom.conf for you FreePBX purists) create a context for each of your groups. Add whatever permissions applicable to each group.

Got to yourserverip/admin and login to FreeBPX. Select extensions and modify the context in each extension to match the ones you created in the first step.

Extension to extension dialing in FreePBX is achieved by including ext-local in the context. You will find ext-local in extensions_additional. Use that as a template and create new contexts in the same file you created the group contexts above that only have each groups extensions in it. Include each (ext-local-acc for example) context in the corresponding group context created above.

This should allow group members to dial each other, but not the rest of the local extensions.

It’s clear in my mind, hope you find it helpful as well.