We already know how to restrict the calls by blacklist feature. But it takes to configure each extension when you need to block the calls between 2 ranges of extensions.
In the following we would introduce how an example to let you know how it works.
Step 1: Access via SSH, and create the customize file: touch ysdisk/support/customcfg/extensions_custom.conf
Step 2: Edit the customize file
Copy all the content of the [Local_Default_CallingRules] to the extensions_custom.conf file.
Step 3: Run this command: vi ysdisk/support/customcfg/extensions_custom.conf
To edit this extensions_custom.conf file, press “i” to login the edit mode.
Paste whole content of context [Local_Default_CallingRules] here.
include = sla_stations
include = reset_followme
include = enable_followme_always
include = disable_followme_always
include = enable_followme_noanswer
include = disable_followme_noanswer
include = enable_followme_busy
include = disable_followme_busy
include = enable_dnd
include = disable_dnd
include = vmm
include = en-force-to-outside
include = dis-force-to-outside
include = en-force-to-inside
include = force-to-businesshours
include = parkedcalls
include = conferences
include = ringgroups
include = ivrs
include = queues
include = voicemailgroups
include = pagegroups
include = page_an_extension
include = pickup_extension
include = speeddial
include = Internal_Calls_Restrict // include the restrict context. it need to before "include = exten_dial_config" , or it will not work.
include = exten_dial_config
include = extension-white-and-black-outbound
include = inrouter_feature_dest
include = emergency-number
include = default
Create below content to restrict the call between 7XXX range to 8XXX
And include the context to the context of Local_Default_CallingRules, as above red content.d
exten = _7000/_8000,1,Hangup()
exten = _8000/_7000,1,Hangup()
format: exten = _callee/_caller,1,Hangup()
And you also can use the match format to set the callee and caller.
such as: exten = _7XXX/_8XXX,1,Hangup() that meaning 8000 to 8999 extension can't call to 7000-7999 extensions.
You can according to the actual extension to edit the restrict rule.
When finish above settings, and you can press the "ESC" key to exit the edit mode, and press":wq" to quit and save the file.
Then, enter the command
2: asterisk -vvvvr
3: module reload
Or save any options on the PBX, and then click the Apply button.
After all the steps, you can achieve the internal calls restrict now.