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. Setup:Step 1: Access via SSH, and create the customize file: touch ysdisk/support/customcfg/extensions_custom.confpath: /ysdisk/support/customcfg/ Step 2: Edit the customize filecat etc/asterisk/extensions.confCopy 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.confTo edit this extensions_custom.conf file, press “i” to login the edit mode.Paste whole content of context [Local_Destination] here. [Local_Default_CallingRules]
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 8XXXAnd include the context to the context of Local_Default_CallingRules, as above red content.d [internal_calls_restrict]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 command1: astconfig2: asterisk -vvvvr3: dialplan reloadOr save any options on the PBX, and then click the Apply button.After all the steps, you can achieve the internal calls restrict now.

Quick Links

Unlocking Seamless Communication: A Deep Dive into Yeastar VoIP Gateways

Yeastar GSM Module for S Series PBX

Yeastar Neogate TG1600 – 16 Port GSM VoIP Gateway

Yeastar Neogate TG400 – 4 Port GSM VoIP Gateway

Yeastar Neogate TG100 – 1 Port GSM VoIP Gateway

Upgrade your phone system easily with Yeastar 02 card