How to Restrict Calls between Extensions

This application note shows how to restrict make call between internal extensions via defining configuration modification. In this case, we will realize this feature in SSH.

IP address of MyPBX: 192.168.5.139

Step 1: Enable SSH on the LAN settings page first.

                                       Figure 1

Step 2: Login SSH via putty software.

Note: We can access MyPBX SSH using putty software.

Here is a download link: www.yeastar.com/download/tools/putty.exe.
Please download and install it on your PC.

The default username is root and the password is ys123456

                               Figure 2

                                             Figure 3

Step 3: Type the command vi /etc/asterisk/extensions.conf to check the configuration of context [macro-stdexten].

                                            Figure 4


                          Figure 5 The configuration of context [macro-stdexten]


Figure 6 The configuration of context [DLPN_DialPlan505]

Step 4: Type the command
vi /persistent/custom-cfg/extensions_custom.conf to defined configuration modification as you need.

                                                     Figure 7

In this file, we will take the following three examples:

Example 1: Block all internal extention make call each other.

Compare with Figure 6 and modify the configuration under the context [macro-stdexten].
Comment the content of context [macro-stdexten] out as below which be marked red box.

                                                        Figure 8

Example 2: Block internal extension 505 make call any other internal extension.

Compare with Figure 7 and modify the configuration under the context [DLAN_DialPlan505].
Comment the content “include = Local_Default_CallingRules” of context [DLAN_DialPlan505] out as below which be marked red box.

                            Figure 9

Example 3: Block internal extension 505 make call internal extension 501.

Compare with Figure 7 and modify the configuration under the context [DLAN_DialPlan505].
Add “exten = 501,1,hangup()” and copy the old configuration under the context [DLPN_DialPlan505] as below which be marked red box.

                                Figure 10

Step 5: Please apply the changes on the MyPBX web GUI to take effect.

Step 6: Test.

Have more questions? Submit a request

7 Comments

  • 0
    Avatar

    Does this process apply to the S-series?

  • 0
    Avatar

    Stephen, I believe S Series has similar solution, but there would be some small difference, like SSH login user name and password, the directory of customizing file, and so on. 

  • 0
    Avatar

    I did find the SSH login info for the S-Series.  Do you know what directory the customizing file would go in for the S-Series?  It is no longer '/persistent/custom-cfg/extensions_custom.conf'? 

  • 0
    Avatar

    The customize configuration directory has been changed to /ysdisk/support/customcfg/

  • 0
    Avatar

    Thank you!

  • 0
    Avatar

    Hello! 

    Oscar Colka, how change 

    /ysdisk/support/customcfg/extensions_support.conf 

    ssh user "support" no permission

  • 0
    Avatar

    Anton, 

    As I know extensions_support.conf is specially for Yeastar engineers.

    For normal users(SSH user: support), we can ignore extensions_support.conf file and customize using extensions_custom.conf format.

    Edited by Oscar Colka
Please sign in to leave a comment.