Skip to main content

Set Up Access Control Using CarrierX Portal

Introduction

There can be various reasons why you would want to use access control rules.

For example, you can apply the access control rules to outbound communications to prevent either calling or sending text messages to specific (e.g., paid) numbers. Alternatively, you can allow sending calls to one phone number only and reject the calls to all other phone numbers. You might also want to disallow sending (or receiving) all text messages which contain certain text.

tip

Refer to our How It Works: Access Control section to learn more about what access control rules and access control lists are, what they are used for, and how you can work with them using CarrierX API.

In this article, we will create access control rules to block all the voice calls to the phone numbers starting with 18807, but allow the voice calls to any other numbers. At the same time, the rules will allow sending text messages to the 15059983793 phone number and block sending text messages to any other numbers.

First, we need to create access control rules that will hold these settings. Then, we will associate the created rules with the access control lists and apply the voice-related lists to the account and SMS-related lists to the trunk group.

Terms Used

We will use the following abbreviated terms throughout this article:

ACRs or Access Control Rules: the rules used to form access control lists which can be associated with either an account or a trunk group.

ACLs or Access Control Lists: the lists formed from the rules, their direction, and type of call (voice or SMS) to which they will be applied. Sometimes we use this abbreviation as an acronym and pronounce it like [ækl].

I. Create Access Control Rules

In this section, we will create access control rules (ACRs) through the portal.

We create the rules on the account level. Later, you will be able to use them with ACLs on either account or trunk group levels.

note

This can also be done programmatically, we covered it in our How It Works: Access Control article.

info

What you need before you start

To create ACRs, log into your CarrierX account. On the left-side menu, locate and click the Configure menu. Click Global Settings.

Select the Access Control Rules tab.

note

Some rules might be present in the list even if you have not created any yet. These are the rules created by your parent partner account. You cannot change them.

Click Add Rule.

Fill in the following ACR fields:

  • Enter a name for the new ACR. This is a friendly name that is used for internal reference and helps you find the rule when you need it.

  • Next, enter the Field that the system will take into account when applying this rule. In our case, it will be called, as we want to block calling the numbers starting with 18807.

  • Set the Quantifier field by selecting the any value. This will mean that if the call details match any of the entries (in our case there will be only one entry, 18807)

  • Set the Operation field by selecting the prefix value. This will mean that the entry should match only the part at the beginning of the phone number.

Add an Entry by clicking New and entering the prefix for the phone numbers we want to block (18807). Click Create.

Click Create

You can see the created rule in the list of available ACRs.

Created ACR for Voice

You can create the second rule in the similar way. Try to do it yourself with the following parameters:

  • Name: My Rule for 15059983793
  • Field: to_did
  • Quantifier: all
  • Operation: exact
  • Entry: 15059983793

Now, let's use access control lists to associate these rules with our partner account and one of the trunk groups.

II. Create ACLs on Account Level

Now, with the rules ready, associate them with the lists.

Select Configure > Global Settings > Access Control Lists tab.

note

If you open the Parent Assigned ACLs tab, you can view the access control lists which your parent partner account assigned to you. You cannot edit or remove these rules.

Click Add ACL.

Click Add ACL

Fill in the following ACL fields:

  • Set the Direction field to outbound as we want to block only outgoing voice calls and allow all incoming calls.

  • Set the Voice Action True field to reject403 to block the voice calls.

  • Leave the Voice Action False, SMS Action True, and SMS Action False fields as they are (set to undefined) for them to use the default actions set by the system.

Fill ACL Fields

Now, add Access Control Rules:

  • Click New.

  • Select your created ACR from the drop-down list.

Select Created ACR

tip

Did you know?
You can select not only your own rules but also the rules created by your parent partner account. These rules are available in the rules list when creating ACLs. You can use these rules as is, no changes are allowed.

Finally, click Update.

Your new ACL will be present in the list of available access control lists. Click it to see its details.

Click Created ACL

info

If you create several access control lists, you can change their position in the list clicking Edit and moving them up or down in the ACLs list.

III. Create ACLs on Trunk Group Level

To set access control lists for a trunk group, click the Configure menu on the left-side menu. Click Trunk Groups.

Click the trunk group you want to modify. Select the Access Control Lists tab.

Click Add ACL.

Add ACL Trunk Group

Fill in the following ACL fields:

  • Set the Direction field to outbound as we want to block only outgoing messages and allow all the incoming SMS.

  • Set the SMS Action False field to reject to block the messages to any numbers but the one in the rule.

  • Leave the Voice Action True, Voice Action False, and SMS Action True fields as they are (set to undefined) for them to use the default actions set by the system.

Fill ACL Fields Trunk Group

Now, add Access Control Rules:

  • Click New.

  • Select your created ACR from the drop-down list.

Select Created ACR Trunk Group

Finally, click Update.

Your new ACL will be present in the list of available access control lists. Click it to see its details.

Click Created ACL Trunk Group

info

If you create several access control lists, you can change their position in the list clicking Edit and moving them up or down in the ACLs list.

IV. Next Steps

You successfully created access control rules and combined them into access control lists. You also associated the created lists with your account and trunk group.

Now you can test the created access controls.

Testing Voice Calls

Let's try and send voice calls to phone numbers to test the voice calls configuration we created:

  • First, we make a call to a number, starting with 18807 (e.g., 18807425877). The result will be that the call is rejected.
  • Now, we make a call to any other number which does not start with 18807 (e.g., 15162065515). The result will be that the call is allowed and goes through.

Testing Text Messages

Now let's try and send text messages to phone numbers to test the text messages configuration we created:

  • First, we use the endpoint associated with the affected trunk group to send a text message to the 15059983793 number. The result will be that sending the text message is allowed and goes through.
  • Then, we send a text message to any other number (e.g., 18882114787). The result will be that sending the text message to any other number is rejected.
success

You've successfully implemented access control rules! For more advanced configurations or troubleshooting, consult the full documentation.