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

From innovaphone wiki
Jump to navigation Jump to search
Line 80: Line 80:


By entering a custom code in the "Email_Code.txt" file the email notification service is enabled.
By entering a custom code in the "Email_Code.txt" file the email notification service is enabled.
If a valid email address is configured in the "Email.txt" file or the internal calling user has a valid email address configured in its PBX object, the email code can be entered during app menu announcement to have a list of the blacklisted numbers sent via email.
If a valid email address is configured in the "Email.txt" file or the internal calling user has a valid email address configured in its PBX object, the email code can be entered during app menu announcement to have a list of the blacklisted numbers sent via email as attachment.
Due to a Voicemail engine limitation it is possible to send max 20 numbers in one email, for this reason if your black list has more than 20 numbers these will be split over multiple emails.


Please follow this article to adapt the script to your local SMTP requirements:
Please follow this article to adapt the script to your local SMTP requirements:

Revision as of 11:13, 27 August 2018


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.

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
  • BlackLst_email.xml: the script handling email notification of blacklisted numbers
  • 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.
  • Email.txt: file containing a generic email address where blacklisted numbers will be sent to.
  • Email_Code.txt: file containing the code to enter in the app menu to have the blacklisted numbers sent via email.
  • Language.txt: file containing the language to be used by the application:
    • DE: German
    • EN: English
    • IT: Italian
    • FR: French
  • MinIntExtLen.txt: file containing a number corresponding to the shortest internal extension length of your PBX, i.e. "2" if your shortest extension consist of 2 digits.
  • MaxIntExtLen.txt: file containing a number corresponding to the longest internal extension length of your PBX, i.e. "4" if your longest extension consist of 4 digits.

Note: use identical values in both files if your internal numbering plan has a fixed extension lenght.

  • PrefixIN.txt: currently not used

Configuration of application files

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

  • Email.txt: configure a valid email address
  • Email_Code.txt: configure the code to enter in the app menu to have the blacklisted numbers sent via email: i.e. "**99". Without a code the email service is disabled.
  • 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.
  • MinIntExtLen.txt: configure a number corresponding to the shortest internal extension length of your PBX, i.e. "2" if your shortest extension consist of 2 digits.
  • MaxIntExtLen.txt: configure a number corresponding to the longest internal extension length of your PBX, i.e. "4" if your longest extension consist of 4 digits.

Note: use identical values in both files if your internal numbering plan has a fixed extension lenght.

  • 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

Email notification service

By entering a custom code in the "Email_Code.txt" file the email notification service is enabled. If a valid email address is configured in the "Email.txt" file or the internal calling user has a valid email address configured in its PBX object, the email code can be entered during app menu announcement to have a list of the blacklisted numbers sent via email as attachment. Due to a Voicemail engine limitation it is possible to send max 20 numbers in one email, for this reason if your black list has more than 20 numbers these will be split over multiple emails.

Please follow this article to adapt the script to your local SMTP requirements:

Send_Email_MWI_Notification_From_The_innovaphone_Voicemail

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.

Note:

When manually adding/removing a number from the black list remember to include the trunk prefix if present.

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.

Known Issues

The XML script uses HTTP PUT method to store files in the app's folder. On 3rd party webservers (e.g. IIS, Apache) you might need to enable the PUT method for the app's folder.