Table of Contents

API : PBX : Number blacklist add number

Introduction

A number blacklist is a named list of phone numbers that a dialplan item will not accept calls from.

A blacklist belongs to a single customer and is never shared between customers. It can be selected on TRUNK and EXTENSION dialplan items through their numberBlacklist property. When such an item is invoked and the callers number is on the selected blacklist, the PBX rejects the call with busy.

Numbers are stored in E.164 format and matched exactly - a blacklisted number blocks that number and nothing else. On an extension the blacklist is only checked for external callers; local extensions are never filtered, and the extensions own blacklist array is checked as well.

This request adds a single phone number to a blacklist. The employee who added the number and the time it was added are recorded with it.

Request

URL https://api.telecomx.dk/pbx/numberblacklist/BLACKLIST_ID/number
Method POST
Access level MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Param BLACKLIST_ID Id of the blacklist (24 hex-char string)
Query customer [optional] Customer the blacklist belongs to. Defaults to the users own customer.
Body number The phone number to blacklist, in E.164 format - a leading + followed by 5-15 digits.
description [optional] Why the number is blacklisted, max 200 characters.

Body example

{
  number: '+4570123456',
  description: 'Calls every monday morning'
}

Response

JSON object
number String The blacklisted phone number in E.164 format.
description String Why the number is blacklisted, null if no reason was given.
createdAt Date When the number was added.
employee Id Id of the employee who added the number.

Errors

Error code Message Description
400 bad_request Id not found in requestURI or not a valid id
403 access_denied Insufficient access level
404 not_found Number blacklist not found
409 number The number is already on the blacklist
422 number Number is missing or not in E.164 format
500 internal_error <Unspecified>