Have a look at toll_allow, you can get quite creative using it in your dial plans.
https://docs.fusionpbx.com/en/latest/additional_information/toll_allow.html
There are probably lots of ways to do it, here is an example. I have created a dial plan entry called "toll_allow_304_202", the ${toll_allow}, I have set to match "only-304-202". Any extension assigned this toll allow can only dial 304 or 202. This is just an example of the scenario you enquired about, it will not even let a user call voicemail literally only 202 or 304. A good understanding of regular expressions helps.
View attachment 1242
I hope this helps. Adrian.
You could expand on the regex to include external. I have no idea what digits constitute an external call in your part of the world, so I can't provide an example.
Be aware that you can also assign more than one toll allow string to the extension. For example, if you entered "tag1, tag2, tag3" into the toll allow field of the extension record the ${toll_allow} variable will get set to "tag1: tag2: tag3", so again with the correct regex you can cut and slice this any way you see fit.
If you need help with regex, follow some of the links here:
https://regex101.com/
https://www.rexegg.com/regex-quickstart.html
There is even a web site that teaches you regex by solving crosswords, it's quite good fun too.
https://regexcrossword.com/
It's now 2am in the morning here in the UK, I'm off to bed. Good night!
To use a custom context to limit what a single or small group of extensions can dial, set the context under each of those extensions something like “limited@my.domain.com”
At this point, the extensions with this new context cannot dial anything.
Create or copy existing dial plans and set the context to the same limited@my.domain.com
You would probably want to copy “user_exists” and “local_user” dial plans then edit for new context. This will allow the restricted extensions to call internal extensions but no other features or external numbers.
To further limit access to only dial certain internal extensions, you would need to add an extra condition to check dialed number or create a simplified dialplan for each of those destinations.
Hi,There are probably lots of ways to do it, here is an example. I have created a dial plan entry called "toll_allow_304_202", the ${toll_allow}, I have set to match "only-304-202". Any extension assigned this toll allow can only dial 304 or 202. This is just an example of the scenario you enquired about, it will not even let a user call voicemail literally only 202 or 304. A good understanding of regular expressions helps.
View attachment 1242
I hope this helps. Adrian.