Docs refreshed for Astervis v1 — now covering AI call analytics. What’s new
Astervis Docsv1.0
User Guide

Phone Blacklist

Block unwanted callers at the PBX.

Some numbers you never want to hear from again — a spammer hammering your queues, a robocaller, a person who's been told to stop calling. The phone blacklist lets you add those numbers once and have Astervis drop their calls at the PBX, before they ever ring an agent.

It's a small feature with a careful design: a call that's blocked should stay blocked even if a service restarts, and the block should take effect in milliseconds. Here's how it works and how to use it.

How enforcement works

Astervis blocks calls in two places at once, so a number on the list is rejected even if one layer isn't available.

Primary — synced into Asterisk's astdb

When you add a number, Astervis pushes it straight into Asterisk's internal database (astdb) over the AMI (Asterisk Manager Interface) connection. Your dialplan checks astdb at the very start of a call, so a blacklisted caller is hung up by the PBX itself — the call never reaches Astervis or an agent. This is the fast, authoritative path.

Fallback — ARI hangup on call creation

If AMI isn't configured, Astervis still watches new channels over ARI (Asterisk REST Interface). The moment a channel is created, it checks the caller against the blacklist and hangs up the channel if there's a match. This catches blocked calls even without the astdb sync, at the cost of letting the call exist for a brief instant before it's dropped.

To make those checks instant, every active number also lives in a Redis set (astervis:blacklist). Lookups are a single SISMEMBER — O(1), no database round trip — so adding a blacklist check to call handling costs you nothing measurable.

For the primary astdb path to work, AMI must be configured on your PBX and in Astervis. Without AMI credentials, blocking falls back to ARI hangup only: it still works, but the call briefly connects before being dropped, and you lose the cleanest "PBX rejects it outright" behaviour. The installer collects the AMI_* settings during setup — if you skipped them, run the installer's config step to add them.

Managing the list

The blacklist lives under Settings → Blacklist in the admin panel. Each entry is a number plus some context, so the list stays useful months later:

Number
Display name (optional)
Reason (why it was blocked)
Active toggle
Added by

You get full CRUD plus CSV import and export, which is how you'd load a list of known spam numbers in one go, or hand your blacklist to another system.

Open Settings → Blacklist, click Add, paste the number, and optionally fill in a display name and a reason. Save — the number is synced to astdb and Redis right away.

Who can edit it

Managing the blacklist is gated by the blacklist.manage permission. Assign it to the roles that should be allowed to block and unblock callers (typically admins and supervisors); operators without it can't change the list. See Operators for how roles and permissions are assigned.

Phone normalization

Numbers rarely arrive in one clean format — +998 90 123 45 67, 998901234567, 8 90 123 45 67, with or without spaces and dashes. Astervis normalizes every number before storing and before matching: it strips non-digit characters and canonicalizes Uzbek formats (the +998 / 998 / leading 8 prefixes) to one consistent form. That means you don't have to guess which format the PBX will see — you add the number however you have it, and the match still lands.

When a block takes effect, and how to verify it

A new entry is live as soon as you save it. Astervis writes it into Redis and issues an astdb DBPut over AMI immediately, so the very next call from that number is rejected — there's no sync window to wait through. Removing or deactivating a number does the reverse (DBDel) just as fast.

To confirm a block is working:

Add the test number

Add the number you want to verify to the blacklist with a clear reason like "test block".

Place a call from it

Call into the PBX from that number. With AMI configured, the call should be rejected by Asterisk at the start of the dialplan and never ring an agent.

Check it didn't reach a queue

The call shouldn't appear as a normal answered or queued call in Calls — a successful block means no agent was offered the call.

Remove the test entry

Delete or deactivate the test number so it doesn't block a real caller later.

Entries track whether they've been pushed to Asterisk (synced_to_asterisk), so if AMI was temporarily down when you added a number, Astervis knows it still owes the PBX that sync — the Redis lookup and the ARI fallback keep the number blocked in the meantime.

Last updated on

On this page