internal call restrictions

Status
Not open for further replies.

s2svoip

Member
Dec 9, 2019
262
8
18
44
Hi there, could anyone point me in the right direction for fusion call restrictions, e.g. 100 can only dial 105 and 107 but nothing else and not externally ?

my googleFu does not seam to be showing much on how to set this up
 

s2svoip

Member
Dec 9, 2019
262
8
18
44
gottya, thanks for the pointer, I think this would work

looks like theirs quite a few settings for this to get it working. the documentation is pretty basic, do you know if there is a guide anywhere ?
 

ad5ou

Active Member
Jun 12, 2018
892
205
43
If you are a paid fusionpbx.com member there is a lot more documentation available.
If you want to severely limit a single extension, the easiest way is to put that extension into a custom context, then create dial plans for what is allowed in that context.
 
  • Like
Reactions: s2svoip

s2svoip

Member
Dec 9, 2019
262
8
18
44
thanks for the suggestion, unfortunately I am just starting out and dont have any revenue to justify the huge basic membership fee - not expecting it to be free and I definitely see the value in it, just cant shell out when I am not making any income yet.

I see even less / no documentation about custom context, thanks for the suggestion but might even be more complicated than the toll_allow
 

s2svoip

Member
Dec 9, 2019
262
8
18
44
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

So thanks for the suggestion, after reading it many times I now understand how this works, with a simple tag on my main outbound route, and adding the same tag on the extension it allows me to block / unblock external calling - very easy

however, if I wanted to limit extensions an ext can dial, how would I tag this route ? as it is internal
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,505
419
83
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.

Screenshot from 2020-01-04 00-00-32.png

I hope this helps. Adrian.
 
  • Like
Reactions: s2svoip

s2svoip

Member
Dec 9, 2019
262
8
18
44
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.

It really does Adrian, thank you, worked like a treat, yeah regex is not my strong point, so if I wanted to allow those 2 extensions AND external calls then I could do that in the same condition or add another condition under it ?
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,505
419
83
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!
 
  • Like
Reactions: s2svoip

ad5ou

Active Member
Jun 12, 2018
892
205
43
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.
 

s2svoip

Member
Dec 9, 2019
262
8
18
44
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!


interesting, i did wonder if you can assign more than one tow allow,

so following the guide you first posted, I added a tow_allow condition at order 0 of my main outbound route - this works to restrict the outbound external calling

when I created the dialplan to restrict the extensions, this works by itself also

but if I add both tow_allow strings to an extension, so it can only dial 302 or 202 AND it can dial externally, the external call does not work, the internal extension restriction works fine. any ideas ? I created the dial plan with order 26 in my dial plan manager, not sure if this affects it or not ?
 

s2svoip

Member
Dec 9, 2019
262
8
18
44
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.

that seams pretty simple, I might give this a shot also, I almost have it working the way I need with the toll_allow feature, but this does seem like a good option too - thank you!
 

michelerizzo88

New Member
Mar 11, 2019
18
0
1
36
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.
Hi,
I try to test this configuration. I have 4 extensions: 204,205,206,207. 204 and 205 can call other extensions and all to external, so i create outbound route with toll_allow = external and i set this on 204 and 205 extensions. the extensions 206 and 207 can call only 204 and 205 but not external and othet extensions, so if i create outbound route with only 204 and 205 (and set the toll_allow on extentions) i can't call other extensions and 204 and 205 too can't call 206 and 207. Why? I need to add other outbound routes to permit 204 and 205 to call with them?
 
Status
Not open for further replies.