Let's Chat

03 9430 1788


3CX Calling Class of Service

The 3CX PBX does not have a built in Calling Class of Service feature so, by default, anything a person dials is sent straight out to the carrier. This means that if you want to restrict calls to certain numbers you have to do it using groups and outbound rules. This is how you can set up classes of service to restrict dialling to local, mobile, national or international calls.

Before we get started …

There are a few things to note: 

  • First and foremost – I’m in Victoria, Australia and this document is based on our national numbering plan. The examples below will only work in Victoria. You’ll need to modify them for your local dialling plan. Alternatively, you can contact us here at IT Networks for help.
  • Internal extension dialling should always work because you aren’t making an outbound call.
  • Outbound Rules are processed like an Access Control List – matching from top to bottom.
  • Unlike traditional PBXs, this feature is NOT hierarchical. You can give someone access to only local calls and international calls without them being able to call STD or Mobile. (Not sure why you’d want to do that … but you can!)
  • And most importantly, you need your carriers to have a consistent numbering plan. I’m not sure how you would do this in the U.S. where there are multiple carriers with different numbering schemes and number lengths. It should be doable but it’s going to get very complex.

There are two steps to creating a Calling Class of Service:

  1. Setting up the groups
  2. Defining the Outbound Rules

Set up Calling Class of Service (CCoS) Groups:

  1. 3CX -> Groups -> Add
  2. Create groups for each of the levels of access required (see Tables below)
  3. Go to the “Group Rights” tab for each group and remove all rights for Managers and Users – this prevents the groups showing up in the switchboard view or on the soft clients
  4. Go to the “General” tab and add the extensions to each group they require access to – remember they aren’t hierarchical so if you only give someone access to the International Dialling group – they’ll be able to call overseas but not local numbers!

Set up the Outbound Rules:

Setting up the Outbound Rules can get very complex if you wish to cater for every permutation that users could dial. For example, here in Australia, there are 4 ways to dial a local number:

  • 9430 1700
  • 03 9430 1700
  • 0011 613 9430 1700 and
  • +61 3 9430 1700.

For the basic example, we will assume that no-one would ever use the international format for a local number. Be aware though, in practice, users with softphones or CTI integration may be using click-to-dial from an address book that may have the numbers stored in international format!

Basic Example

For this example, we assume that people will be dialling the numbers manually and won’t be using international formats to dial local numbers! There are also several number ranges missing (such as the Operator numbers, 1900 numbers, data calls, etc) that are rarely used by most people. Setting one or two phones as CCoS Unrestricted, such as Reception and/or the boss, would allow calls to any number missing from the table below.

All 3CX installations start with a group called “Default” and all extensions will be a member of this group. After the following example, any extension that is only in the Default group will be only able to call internal extensions. The Default group is also where extensions will get their “Group Rights” from because we remove all group rights from the CCoS groups.

Calling Class of Service Groups:

From the 3CX Admin console:

  1. Click on Groups -> Add
  2. Create new groups using the following names:
    • CCoS Local
    • CCoS Mobile
    • CCoS National
    • CCoS International
    • CCoS Unrestricted
  3. For each group open the “Group Rights” tab and uncheck all rights. Some will remain ‘greyed out’ because they can’t be changed.
  4. For each group add the extensions to each group they have permission for. For example, if extension 101 was allowed to call internal, local, mobile and national numbers then extension 101 would have to be in the Default group and each of the applicable CCoS groups.

Outbound Rules:

From the 3CX Admin console:

  1. Click on Outbound Rules -> Add
  2. Create rules for each of the table rows below:
    • Rule Name is in the General section of the “Add Outbound Rule” page
    • Prefix or Length is set in the “Apply this rule to these calls” section
    • Extension Group is the group extensions belong to. Click on “Add” under “Calls from extension group(s)”
    • Route is set in the “Make outbound calls on” section you would set the routes as applicable to your system.
Rule NamePrefixLengthExtension GroupRoute
Local Calls 8CCoS Local1st Choice Route
FreeCall 18001800 DEFAULT*1st Choice Route
13/1300 Numbers13 CCoS Local1st Choice Route
Local Calls (National Format)03 CCoS Local1st Choice Route
Mobile04 CCoS Mobile1st Choice Route
National010CCoS STD1st Choice Route
International0011 CCoS International1st Choice Route
Allow All (Unrestricted)  CCoS Unrestricted1st Choice Route

* You might want to restrict FreeCalls to the CCoS Local group – Your call!

In the example above you can see the “Allow All” rule followed by a “Block All”. This is like the implicit “deny all” in an access list. Any call that has not passed one of the preceding rules will be blocked.

An extension that is a member of the CCoS Unrestricted group will pass that second last rule and their call to any number will be allowed.

An extension with local call access trying to call a mobile number will fail the Mobile rule (and everything after it) and be stopped by the Block All.

Complex Example

For this example, we try to cover all possibilities for dialling number just in case users are dialling from global directories that may have all number formatted in international or +61 formats. We’ve also added a separate Class of Service for Premium Numbers.

Note: This table still misses several number ranges such as Operator numbers, data calls, etc.

Calling Class of Service Groups:

Again, set-up the groups as in the previous example however this time we have the extra “Premium” category. In Australia, premium numbers are charged at whatever rate the owner decides. This is also the one example where not being a hierarchical system is an advantage. In a hierarchical calling class of service, premium numbers would normally sit either above or below international calls because most calling class of service tables where usually built around cost.

Therefore, in a hierarchical system, if you were given Premium access you got access to at least national and mobile calls too. With 3CX you could still have someone with only local call access also have access to premium calls. Or perhaps more likely, you can give people access to international numbers but not 1900 numbers.

These days, the cost structure can be wildly different so it is more likely the role or requirements that will determine what numbers people are allowed to dial. The 3CX model gives you a lot more flexibility than a legacy hierarchical Calling Class of Service system.

  • CCoS Local
  • CCoS Mobile
  • CCoS National
  • CCoS International
  • CCoS Premium
  • CCoS Unrestricted

Outbound Rules:

The outbound rules get a little more complex now because we need to account for the different ways the same number can be dialled.

This is also where you could strip or prepend digits before sending them to the carrier although in the examples below, stripping the digits isn’t really necessary. You could still send a local call to the carrier as 0011613xxxxxxxx – It’s just neater to strip the unnecessary bits of and send the local number out.

The options to strip or prepend digits are set on the route the rule uses.

A more practical use of this would be where you have an internal route to another office that users can dial via extensions but if the internal route is down, you can prepend the local prefix to the extension and send the call via the public network as the second choice.

Rule NamePrefixLengthStrip DigitsPrependExtension GroupRoute
Local Calls 8  CCoS Local1st Choice Route
FreeCall 18001800   DEFAULT1st Choice Route
13/1300 Numbers13   CCoS Local1st Choice Route
Premium Numbers (1900)1900   CCoS Premium1st Choice Route
Local Calls (National Format)03   CCoS Local1st Choice Route
Mobile04   CCoS Mobile1st Choice Route
National010  CCoS STD1st Choice Route
Local Calls (International Format)0011613 7 CCoS Local1st Choice Route
Mobile (International Format)0011614 60CCoS Mobile1st Choice Route
STD (International Format)001161 60CCoS STD1st Choice Route
International001   CCoS International1st Choice Route
Local Calls (+ Format)+613 4 CCoS Local1st Choice Route
Mobile (+ Format)+614  30CCoS Mobile1st Choice Route
STD (+ Format)+61  30CCoS STD1st Choice Route
International (+ Format)+  10011CCoS International1st Choice Route
Allow All (Unrestricted)    CCoS Unrestricted1st Choice Route


The order is important and you can move rules up and down after creating them if you need to. The “National” rule in both examples won’t match numbers starting with 03 or 04 because those rules appear before the National rule.

The Length is also important on the “National” rule so that it can differentiate a National number from an International number. If there are any international numbers that would be 10 digits or less then the National numbers would need to be further broken down like this:

Rule NamePrefixLengthStrip DigitsPrependExtension GroupRoute
Local Calls (National Format)03   CCoS Local1st Choice Route
Mobile04   CCoS Mobile1st Choice Route
National (Central East)0210  CCoS STD1st Choice Route
National (North East)0710  CCoS STD1st Choice Route
National (Central & West)0810  CCoS STD1st Choice Route


So there you have it, a functional Calling Class of Service system that gives you as much control as you want over the numbers extensions can call.

You can even specifically allow numbers to be called (or blocked) by creating a rule that matches the whole number. Don’t want anyone to be able to call the Big Brother Voting Hotline? Set a rule at the top of table with the 1900 XXX XXX number and set the route to BLOCK and no-one can call it! Even someone in the “CCoS Unrestricted” group won’t be able to call it because the block rule will be triggered before it gets to the “allow all” near the bottom of the table!

Important: Do make sure that whatever region you are in, you can call all the local emergency numbers! Emergency numbers can be defined in the Settings -> General -> Emergency Numbers section. Numbers defined here will ignore all of your outbound rules.

Want to stay up to date with useful tech-tips?  

Follow us on LinkedIn, Facebook or Twitter to be notified when we post new content. Or, even better, scroll down to the very bottom of this page to sign up for our Newsletter. We only send them once a month and you can always unsubscribe.