Block the Internal Calls between Different Number Ranges on S-Series PBX

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
path: /ysdisk/support/customcfg/
Step 2: Edit the customize file
cat etc/asterisk/extensions.conf
Copy all the content of the [Local_Destination] 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_Destination] here.
include = conferences
include = ringgroups
include = ivrs
include = queues
include = pagegroups
include = voicemailgroups
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 = emergency-number
Then 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 the 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
1: astconfig
2: asterisk -vvvvr
3: dialplan 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.

Have more questions? Submit a request


Please sign in to leave a comment.