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

We already know how to restrict the calls by the blocklist 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_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_Destination] 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 = page_an_extension
include = pickup_extension
include = ctipickup_group
include = speeddial
include = extension-white-and-black-outbound
include = inrouter_feature_dest
include = internal_calls_restrict   // include the restrict context. it need to before "include = exten_dial_config" , or it will not work.
include = default
include = calloutbound-anonymous
include = forced_release
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.