Block extensio or group extensions on freepbx distro

Hi all,

My goal is to block the cabitlity for some extensions for dialing out while others will can, this is an important restriction on every IP PBX system,

For the first test i have started with only one extension

I logged in the FreePBX GUI, create a custum trunk,and check the disable trunk box, Then, i have pointed an outbound route with the custum trunk that i have created previously,

the partern match was like this:
XXXXXXXX./ 1099

when testing, this extension still can make external with this specific patern.

I hope someone here have already experimented a such feature so that he could help me.

Look forward to your reply.

Thanks !

Each extension has a context associated with it. That it the beginning of the route to get out to the outbound trunks.

So, if your extension is set up to use “from-internal”, the system is going to route the call until it finds an outbound route that will do that from an internal connection.

If, on the other hand, you set up a “from-internal-ish” context that doesn’t route calls to an outbound trunk/route, then you are not going to be able to make outgoing calls.

Disabling a trunk means that it won’t be used - it’s no longer a valid destination. You want this “null trunk” to be active for the calls to get dropped into it.

I’m not sure of the version of FreePBX you are using, so take this for what’s it’s worth and this is based on my understanding of how the form works. The patterns on the outbound route usually include 4 parts. The first part is the “remove me” part - this is where the “dial 9 for an outside line” silliness happens. The next is the junk to add to make the number palatable to your outbound trunks (which usually have matching patterns), The next is the destination phone number pattern. If you dial a specific number and it matches, the trunk will be used. The last part is the Caller ID that will be used when the call is placed.

So, if you set up an outbound route that matches “commercial” phone numbers (NXXNXXXXXX in the US, for example), the “remove” stuff will be taken off, the “prepend” stuff will be added, and resulting number will be sent to the trunks that match that result with the Caller ID you set.

One approach you could use is to set up a trunk back to your own machine. This “inbound” trunk would immediately go to an announcement saying “Hey, get back to work. We’re not paying you to call your girlfriend” and then hang up. Of course, you could also make is a nice announcement - it’s kind of up to you. :smile:

No matter how you want to solve it, you’re going to either set up a special context that handles these phones, or one that walks through the outbound routes in a different order.