The IVRDONOTCALL parameter does not work with V15+. I had issues with people having the ability to call in to paging groups or extensions such as classrooms... Not cool. Additionally 3CX wanted more money just for tech support. But a little detective work and recognition of regular expressions yielded a fix/solution.
Ready for something that does fix this issue? IVR_DIRECT_DIALING_GRAMMAR is simply a regular expression. Adjust that parameter to suit your needs and restart the services, or easier just restart the server.
As an example the below regular expression, aka what is set for IVR_DIRECT_DIALING_GRAMMAR, disables the ability to dial extensions 2400 and 2500 while still recognizing four digit extensions:
((?!2400|2500)[0-9]{4})
Another example if you want to disable all direct dialing all together use the below to recognize only one digit between zero and nine :
[0-9]{1}