ScopTEL - How to Blacklist Callers

ScopTEL - How to Blacklist Callers

You need to block some phone numbers of callers and avoid unwanted calls or simple ban specific destinations such as premium-rate phone number on your ScopTEL  PBX ? The reason for blocking one or more telephone numbers are numerous and ScopTEL PBX offers simple solutions to block phone numbers with Blacklist. It is also possible to have a whitelist to allow only some phone numbers.

ScopTEL PBX lets you block or whitelist a phone number or multiple numbers from integrated Incoming Lines CallerID management system.

This article will explain how to use an SQL table to store 1000's of phone numbers and blacklist some destinations on Outgoing Lines and then explain how to Blacklist Incoming CallerID's.


Telephony|Configuration|Telephony Modules

To enable Blacklisting your must first Edit Telephony Modules to activate the feature.
Locate and enable CallerID Blacklist and Name Lookup : [x]
Then Save your change.




Outgoing Lines|CallerID Lookup


From the CallerID tab click on Add a new CallerID
Choose the Tenant from the Droplist Selector
Set the Type to "External Source"
Enter a label as in this example 'blacklist'
Set the Source to SQL Table (Local)
Set the Table Name to 'blacklist'
Click on the Add button.





Outgoing Lines|Dial String|Call Restrictions|Restrict Disallowed Outgoing Number

On Lines|Outgoing Lines, click on the Dial String tab and check the option "Restrict Disallowed Outgoing Numbers" then select the External Source (blacklist) you created.
Optional: Use the Droplist Selector to select an Unauthorized Destination (default: Congestion)



 

Create SQL table


You must now create an SQL table that will store all phone numbers that you want to blacklist. Go to Tools|Server and click on SQL Shell menu. You must copy the following content and click on Execute button to create the SQL table.


SQL Query

CREATE TABLE blacklist (

   phone_number varchar(100),

   calleridnum varchar(100),

   calleridname varchar(100)

) ENGINE=MyISAM DEFAULT CHARSET=latin1; 

 



Import Data

We now need to fill the blacklist SQL table in the ScopServ database. In this example, we will use a simple text file that contain a single phone number per line.  Create a file named /tmp/blacklist.txt and define all telephone number to block.

Sample Data

01230126675

01230312624

01230871502

01236161496

01237627016

01234545454

01237741360

01232780766

01235100042

 

The following simple shell script allow read the text file, create SQL INSERT query and execute it on MySQL scopserv database. If you aren't using default MySQL settings, you will have to manually adapt the script.

Import Shell Command

# Specify Source file

SRC="/tmp/blacklist.txt"

# Destination File

DST="/tmp/blacklist.sql"

# Set SQL database name (default is scopserv)

SQL="scopserv"

 

awk '{ print "INSERT INTO blacklist SET phone_number="" $1 "";" }' $SRC > $DST

cat $DST | grep -v '""' | mysql $SQL



How to Blacklist Incoming Callers


In some case it is necessary to block Incoming Callers by CallerID.
Here is a simple example that uses an internal database to check Incoming Calls to a specific Incoming Line and reject by CallerID Blacklist.
Go to Lines|CallerID tab
Click on Add a new CallerID





Use the Droplist Selector to set type to Blacklisted List
Give the object a name
Enter numbers and names with a carriage return between each entry
Click Save when done




Incoming Lines|Security

Edit or Add an existing Incoming Line and configure the Security tab
Enable 'Blacklist' lookup? : [x]
Use the Droplist Selector to choose Blacklist: and select the required CallerID|Blacklist
Click Save or Add when done.




Usage

Calls matching this Incoming Line rule will be checked for matching CallerID Number and or Name will be blocked.




    • Related Articles

    • Module 22 - ScopTEL - Configuring CallerID and Emergency Lines

      Emergency Lines Summary Emergency Lines are configured to override any existing outgoing Caller ID configuration if the Extension dials a matching number assigned to its Class of Service which is also configured to allow Emergency Lines in the ...
    • General-Presentation-ScopTEL-ENGLISH

      ScopServ – The Company  ScopServ is a Canadian firm founded in 2004, specializing in information technology.  It designs high-end corporate applications and holds the intellectual property rights for its products and solutions.  A strong actor in ...
    • ScopTEL Reserved Call Parking

      The purpose of Call Parking is to put a call on hold and resume the call from another extension. Legacy Phone systems used to have what were called Square Line Appearances aka Shared Line Appearances. The point of Square Line Appearances was to ...
    • ScopTEL IP PBX Software - Basic Installation Hierarchy for Telephony Server

      Basic Installation Hierarchy for Telephony Server Therefore the purpose of this document is to provide a visual walkthrough of a very basic but functional installation for one tenant. This tutorial does not include an overview of the overall network ...
    • ScopTEL Telephony Feature List

      ScopTEL Telephony Feature List ScopTEL has many applications and many Enterprise PBX features. This is a list of PBX Features. Feature Name Extended Description Fax Server Fax to Email Email to Fax (Clientless) Per User Licensing Model Customizable ...