MSPL: How to monitor calls that are allowed/blocked by CallerIDBlock

While reviewing a comment on Missed call notification when the call is blocked by CallerIDBlock MSPL Script we realize that the calls blocked by the CallerIDBlock are hard to track.

An easy way to get an event for each blocked call is to use the Log function:

MSPL built-in functions > Log
https://msdn.microsoft.com/en-us/library/office/dn439170.aspx

The CallerIDBlock previous version (1.1) sends the log to the debug log, to view this log we need the APILogger.exe. For more details please check:

Deploying and Troubleshooting Lync Server 2010 MSPL Applications
https://blogs.technet.microsoft.com/nexthop/2012/03/14/deploying-and-troubleshooting-lync-server-2010-mspl-applications/

However, the MSPL Log function has the ability to send it to the Event Viewer.

cibevent-00

 

Since we may not want to have the Event Viewer full of events, we added a new .config file:

CallerIDBlock.config

cidb-event03

The file can be changed on-the-fly like the BlockedTelephoneNumbers.txt. This means that we don’t need to reload the script if we want to change the log setting.

For reference, the following code was change from:

cibevent-01

To:

cidb-event02

 

Here is an example if we configure the log setting to rejected:

cidb-event04

We can also set it to both, then the CallerIDBlock will also log the allowed calls:

cidb-event05

Note: We only recommend to the setting both for troubleshooting purposes.

The CallerIDBlock v1.2 can be downloaded from TechNet Gallery:

MSPL: Blocking Calls on Lync Server/Skype for Business 2015 Based on CallerID
https://gallery.technet.microsoft.com/MSPL-Blocking-Calls-on-e6d52de9