I’m using FreePBX 18.104.22.168, I’ve got a few extensions set up in it.
How can I only allowed some of them can dial out but they can still dial between extensions, only been restricted to dial outside of the PBX. and some of them can dial whatever they want.
Hope i explained clearly.
Easiest (though perhaps not the most logical way) is to do this through your outbound routes. Assuming you have outbound routes setup to allow callers to get to the outside trunk, you can restrict the dial patterns to only be valid for certain caller IDs. As per the tooltip:
“If CallerID is supplied, the dialed number + prefix will only be matched if the CallerID being transmitted matches. When extensions make calls, the CallerID will be their extension number and NOT the Outbound CallerID”
The one thing the tooltip doesn’t mention is that you can use the same pattern matching in the CallerID field as you can in the normal pattern field.
So for example, if you have a system where there are extension 224, 225, 231, 232. You can restrict the outbound route so that it’s only valid for 224 and 224 by using a CallerID of “22X” on the pattern your matching.
It’s a bit of a pain if you have a lot of different outbound routes, but it does work…
If you have a lot of extensions custom contexts is most likely the answer, set up one context that allows access to your outbound routes and another that dosn’t, then allocate the extensions to the appropriate context. You can also set rules in a context to perhaps allow access to long distance but not to international.
If your trunk rejects foreign caller ID, just set the trunk to “Allow Any CID”, then enter a bogus CID (<0000000000> for ex.) in the extension field. The trunk will reject any OB calls from those extensions.
I don’t think maninblasj’s solution is a good choice.