We can now establish Dialing Restriction Rules we can use with a Class of Service. As the name implies, with these rules we can restrict the numbers that users with these rules applied with a Class of Service can dial. To configure these rules we must go to PBX > Class of Service > Dialing Restriction Rules.
Dialing restriction rules can easily become very powerful and specific. First, you must enter a Description to identify the rule. Next, we have the Outbound Restriction Rules. These are rules for all calls going through a Trunk. To create the rule you can enter a Pattern and you can use the same variables as the ones we saw in the Outbound Routes lesson. Then, you can select if it is Allowed to dial the pattern.
Optionally, you can play back an Announcement when someone dials this pattern. This announcement is a custom audio you upload. We will see more on how you can do that later. You can enter a Max Duration in seconds for how long someone can call the dialed pattern, and whether or not you Play the Max Duration Time.
Finally, you can choose if the extension’s Feature Password is needed to be able to dial the rule’s pattern. You are able to add as many rules as you need to make the rule as specific as you need.
At the bottom, you get the Internal Restriction Rules. Here, you can add restrictions to internal numbering, like extension numbers, custom applications, or any code in the internal numbering plan. You can play an Announcement whenever someone with this rule in their Class of Service dials the restricted pattern. You can then Save and Apply Changes.
Additionally, if you understand Asterisk contexts, and have created a custom context that can help you with advanced dialing restrictions, you can declare the context in the Custom Rules Context field.
And with this, you now have a set of rules to control where anyone with these rules in the Class of Service is able to dial. You can restrict international calling or maybe long distance. Maybe you want to restrict the ability to dial the Boss extension completely. Maybe you have a Hotel that allows calling the front desk, but not other rooms. Or you might want to separate the Call Center agent and the management extensions so they cannot call each other. The rules you create will vary depending on how to wish to control the flow of the calls.