Howto:Black List Service XML Script For Incoming Calls: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
'''FOLDERS'''
'''FOLDERS'''


* '''Audio''' folder: contains localized (EN-DE-IT-FR) audio files
* ''Audio'' folder: contains localized (EN-DE-IT-FR) audio files
* '''BL_Numbers''' folder: contains blacklisted numbers files
* ''BL_Numbers'' folder: contains blacklisted numbers files





Revision as of 17:19, 27 February 2017


This script allows to create and to maintain a simple blacklist for incoming calls. Blacklisted calls to the PBX are immediately rejected or transferred to a default destination.

Numbers can be easily added or removed by calling the Blacklist Service object and by following the instructions.

Additionally a number can be put in the blacklist by simply transferring the undesired ringing/active call to a specific object.


Installation

Download the application packet from here: http://blablabla.com/blablabla/script.zip

Extract the archive on your local drive and open the "BlackLst" folder.

Package content

Inside the folder you will find:

FOLDERS

  • Audio folder: contains localized (EN-DE-IT-FR) audio files
  • BL_Numbers folder: contains blacklisted numbers files


FILES

  • BlackLst.xml: the application script
  • Default_BL.txt: file containing the default destination for incoming blacklisted calls, if left blank the call is automatically disconnected.
  • Default_OK.txt: file containing the default destination for incoming legit calls if your trunk does not allow DDI.
  • IntExtLen.txt: file containing a number corresponding to the internal extension length of your PBX, i.e. "3" if your extensions consist of three digits.
  • Language.txt: file containing the language to be used by the application:
    • DE: German
    • EN: English
    • IT: Italian
    • FR: French
  • PrefixIN.txt: currently not used


Configuration of application files

Before copying the folder to your preferred web server you should customize the following files:

  • Default_BL.txt: configure the number of an existing PBX object as default destination for blacklisted incoming calls. If left blank the blacklisted incoming call is disconnected immediately.
  • Default_OK.txt: configure the number of an existing PBX object as default destination if your trunk does not support DDI or in case the CDPN doesn't match to any existing PBX object.
  • IntExtLen.txt: configure a number corresponding to your numbering plan extension length: i.e. "3" if your extensions consist of three digits.
  • Language.txt: configure the language to be used by the application: DE,EN,IT or FR.

You may now copy the folder to your web server.

PBX configuration

Create a new Voicemail obj with a name and number and configure the script URL pointing to "BlackLst.xml" file in the application folder on the web server.

For example if you copied the folder to your Compact Flash:

http://127.0.0.1/DRIVE/CF0/BlackLst/BlackLst.xml?$_pbxfwd=true

Create a new user object, call it "ADD_TO_BLACKLIST" and assign a number to it.

On this object configure a CFU to the Blacklist voicemail object number.

Routing configuration

All incoming calls must be checked by the Blacklist application. For this reason all incoming calls must be routed to the Blacklist voicemail object.

Example: Routing config for incoming calls.png

Functionalities

Each incoming call is now checked by the script.

First the script verifies if the call arrives from the ADD_TO_BLACKLIST object in which case the the CGPN is added directly to the Blacklist.

If that's not the case the script verifies the CGPN to check if the call is internal or external.

If the call is internal the script plays the menu options:

  1. Press 1 to add a number to the Blacklist
  2. Press 2 to remove a number from the Blacklist


When calling the script from an internal extension the caller is able to manually add or remove a number from the blacklist by simply following the audio instrunctions.

If the call is external the script checks the content of the "BL_Numbers" folder and if the CGPN matches with an existing file.

If the number is blacklisted the script checks if a default transfer destination for such numbers is configured in "Default_BL.txt" and forwards the call, otherwise the call is disconnected immediately.

If no match is found the script verifies if the calling party dialed a DDI number and transfers the call to that extension otherwise it will transfer the call to the default destination configured in "Default_OK.txt".

A number that is not yet blacklisted can be added to the list while the call is ringing or connected by simply redirecting/transferring the call to the ADD_TO_BLACKLIST object.