Skip to main content

Outbound Whitelist

The Outbound Whitelist decides which external numbers your extensions may dial. Each rule names a destination country (and optionally a prefix inside it), the voice trunk the call leaves through, and an optional caller ID. A call to a destination that no active rule matches is refused.

tip

For the full picture of how OPBX authorizes outbound calls and picks the caller ID, see the Outbound Calling Overview.

Purpose​

Use this module to:

  • allow outbound calls to a country, or only to some area codes in it;
  • send each destination out through a specific voice trunk;
  • set the caller ID presented on calls that match a rule;
  • turn a rule off without deleting it.

Prerequisites​

  • Voice trunks. The trunk list comes from your Cloudonix domain. If the Cloudonix integration is not configured, the dialog shows "No outbound trunks available" and the save button stays disabled. See Organization Settings and Trunks.
  • A caller ID number (optional). An active phone number of your organization. See Phone Numbers.

Permissions​

ActionOwnerPBX AdminPBX UserReporter
See Outbound Whitelist in the sidebar and open the pageYesYesNoNo
Read rules through the APIYesYesYesYes
Create, edit, toggle or delete a ruleYesYesNoNo

The page is available to the Owner and the PBX Admin only; other roles who open /ui/outbound-whitelist are sent to the Dashboard. Supervisors do not see it either.

How a call is matched​

When an extension dials a number, OPBX checks it in this order:

  1. Internal or external? A destination with fewer than 7 digits is treated as an internal extension and the whitelist is not consulted.
  2. Who is calling? Only an active extension of your organization may call out.
  3. Which rule? Every active rule is scored:
    • the rule's country matches the number's country: +10 (required; a rule for another country is skipped);
    • the rule has a prefix and the number matches it: + the prefix length. A prefix that starts with + is compared with the full number; a prefix without + is compared with the digits after the country code. A rule with a prefix that does not match is skipped.
  4. The highest score wins. A more specific rule (country plus area code) beats a country-only rule.

If no rule matches, the caller hears "Outbound calls to this destination are not allowed. Goodbye." and the call ends.

Example​

RuleCountryPrefixTrunk
US and CanadaUnited States(none)trunk-us
Washington DCUnited States202trunk-dc

A call to +12025550123 matches both rules: the first scores 10, the second 13. It leaves through trunk-dc. A call to +14155550123 matches only the first rule.

Caller ID​

The caller ID presented on the call is chosen in this order:

  1. the calling extension's own Default Caller ID, if set and the number is active;
  2. the matching rule's Default Caller ID, if set and the number is active;
  3. the organization's Default Outbound Caller ID (set on the Phone Numbers page), if set and the number is active;
  4. otherwise the literal caller ID Unknown.

A number that has been set to Inactive is skipped and the next step is used.

Workflows​

Find a rule​

Who can do this: Owner and PBX Admin.

  1. Open Outbound Whitelist (under Apps and Security › Security).
  2. Type in Search by name or pattern.... The search matches the rule name, country, prefix and trunk name.
  3. Click Reset to clear the search.

The list shows each rule's name with its voice trunk under it, Country (flag and name), Additional Prefix, Created and Status. The page loads up to 50 rules and pages through them 20 at a time.

Outbound Whitelist list with four rules (Germany, United Kingdom, Israel, US and Canada), each showing country, trunk, no additional prefix, created date and an Active status pill

Allow an outbound destination​

Who can do this: Owner and PBX Admin (OutboundWhitelistPolicy::create; can(role, 'outboundWhitelist.manage') shows the Add Whitelist Entry button).

  1. Open Outbound Whitelist.
  2. Click Add Whitelist Entry.
  3. Enter a Name, for example "Local Calls".
  4. Pick the Country.
  5. Optionally enter an Additional Prefix: the area code without the country code, for example 202.
  6. Pick the Voice Trunk. Click the refresh button next to the label to reload the trunk list from Cloudonix.
  7. Optionally pick a Default Caller ID, or leave None.
  8. Click Create Entry.

The dialog closes, the toast "Outbound whitelist entry created successfully" appears and the rule is listed as Active. If the server refuses the rule, the page shows "Failed to create outbound whitelist entry"; the reasons are listed under Common errors.

FieldRequiredLimitMeaning
NameYesUp to 255 charactersA label, for example "Local Calls"
CountryYesOne country per rule; unique within the organizationThe destination country. The list shows the flag, calling code and name
Additional PrefixNoUp to 12 characters: digits, spaces, + and -Area code or prefix without the country code, for example 202. Extra spaces are removed
Voice TrunkYesOne of the trunks fetched from CloudonixThe trunk the call leaves through. With no trunks the dialog shows "No outbound trunks available" and Create Entry stays disabled
Default Caller IDNoNone, or one of your active phone numbers (shown as friendly name and number)Presented on matching calls when the extension has no caller ID of its own

Because the country is unique, you cannot have two rules for the same country. To allow only some area codes, use one rule with the narrowest prefix you need.

Add Whitelist Entry dialog with Name, Country picker, Additional Prefix, Voice Trunk selector (no trunks in the demo) and Default Caller ID set to Main Line (+12025550100)

Edit a rule​

Who can do this: Owner and PBX Admin (OutboundWhitelistPolicy::update).

  1. Click the rule's name or row.
  2. Change the fields in Edit Whitelist Entry. The prefix is shown without the country code.
  3. Click Update Entry.

The toast "Outbound whitelist entry updated successfully" appears. If the server refuses the change, the page shows "Failed to update outbound whitelist entry".

Edit Whitelist Entry dialog for the US and Canada rule with Country United States, an empty Additional Prefix, the Voice Trunk box reading No outbound trunks available (no Cloudonix connection in the demo) and Default Caller ID Main Line (+12025550100)

Turn a rule on or off​

Who can do this: Owner and PBX Admin (OutboundWhitelistPolicy::update). For other roles the status pill is not clickable.

  1. In the list, click the rule's Active or Disabled pill in the Status column.

The toast "Status updated successfully" appears and the change is saved at once. Disabled rules are ignored when calls are matched, so calls that only that rule allowed are refused.

Delete a rule​

Who can do this: Owner and PBX Admin (OutboundWhitelistPolicy::delete; the Delete action is shown to these roles only).

  1. Click the Delete (trash) action on the row.
  2. In Delete Whitelist Entry, click Delete.

The toast "Outbound whitelist entry deleted successfully" appears. Nothing else in OPBX points at a whitelist rule, so the delete is never refused. Calls that only this rule allowed are refused from then on.

Delete Whitelist Entry confirmation for the Germany rule
Phone numbers used as a rule's caller ID

A phone number that is the Default Caller ID of a whitelist rule cannot be deleted. The delete on the Phone Numbers page is refused and the dialog lists this rule. Change the rule's caller ID first.

Common errors​

These messages come from the API. The page itself shows only "Failed to create outbound whitelist entry" or "Failed to update outbound whitelist entry".

MessageWhat it meansWhat to do
An outbound whitelist entry for this Country Code already exists in your organization.Another rule already uses this countryEdit that rule instead
Additional Prefix must contain only numbers, spaces, plus signs, and hyphens.The prefix has other charactersUse digits, spaces, plus signs and hyphens only. Spaces and hyphens are ignored when matching
Additional Prefix must not exceed 12 characters.The prefix is too longShorten it
Voice Trunk is required.No trunk was chosenPick a trunk; if none are listed, configure the Cloudonix integration
The selected caller ID does not belong to your organization.The caller ID number is not yoursPick one of your numbers

Key data fields​

outbound_whitelists​

ColumnNotes
idPrimary key
organization_idTenant scope
nameUp to 255 characters
destination_countryISO country code (for example US), unique per organization. A calling code (1 or +1) also matches
destination_prefixOptional, up to 12 characters
outbound_trunk_nameCloudonix trunk name
default_caller_id_did_idOptional phone number presented as caller ID. The API also returns a nested default_caller_id object
statusactive or inactive
MethodEndpointPurpose
GET/v1/outbound-whitelistList (search, sort_by, sort_order, per_page)
POST/v1/outbound-whitelistCreate
GET/v1/outbound-whitelist/{id}One rule
PUT/v1/outbound-whitelist/{id}Update
PATCH/v1/outbound-whitelist/{id}/toggle-statusSwitch between active and inactive
DELETE/v1/outbound-whitelist/{id}Delete

See the OPBX REST API reference for full schemas.