Internal call restriction

asterisk version is 1.8.20.0 and gui is elasix wersion is 2.4
i won’t restrict call between internal extensions. for example i have extencion 110 and extension 120,130 and 140. and i won’t that to extension 110 cant call only this tree extencion(120,130,140) and other extensions cannot call on this number(110) and no external calls too.
i try to make deal plan in extensions_custom.conf i add this
[test]
exten => _120,130,140,1,goto(from-internal,${exten},1)
exten => _.,2,hangup()
include => from-internal
and after this from web in extencion 110 i change in tab custom - from-internal to test
but this not work
any ideas

_120,130,140 is not a valid pattern. If you want to match that particular combination you could use:

_1[234]0

However, listing each one separately, with the same priority, might be better.

Class of service restrictions, like this, are normally done using a context for each different set of permissions.

[test]
exten => _102,1,goto(from-internal,${exten},1)
exten => _.,2,hangup()
include => from-internal
i test this and more
i copy this in extencions.conf and tested… all other extetions still can call to 110.
this still not working.

Use the feature code and set DND for extensions 110.
Then in your outbound routes, after the pattern that you have for dialing out in the callerid field put the following
1[234]0. Save and apply. Now nobody can call 110, 110 can call the rest of the extensions but cannot call out.