It’s been awhile since we looked at the Blocking Calls on Lync Server and Skype for Business Based on Caller ID, we had an update related to the script Missed call notification when the call is blocked by CallerIDBlock MSPL Script.
But the MSPL Script was still the same create by VoIPNorm’s UC Blog – Blocking Calls in Lync Based on Caller ID with minor changes to work on Lync Server 2013 and Skype for Business Server 2015.
The first thing we notice was that the script was using the full path for the BlockedTelephoneNumbers.txt file. While this will work, we could improve it by changing it from:
path=”\<Lync Share Path>CallerIDBlockBlockedTelephoneNumbers.txt
To:
path=”.BlockedTelephoneNumbers.txt”
Now we don’t need to worry to update the path in the script when we deploy it but we need to make sure that both files are in the same folder.
Another change was that previously we were processing all the SIP Requests, but to block a call we only need to process the INVITE. So we did the following line from:
<lc:requestFilter methodNames=”ALL” strictRoute=”true”/>
To:
<lc:requestFilter methodNames=”INVITE” strictRoute=”true”/>
We can also remove the following line since all SIP Requests handled by CallerIDBlock script will be INVITE:
if(sipRequest.Method == “INVITE”){
To obtain the updated version please go to:
MSPL: Blocking Calls on Lync Server/Skype for Business 2015 Based on CallerID
https://gallery.technet.microsoft.com/MSPL-Blocking-Calls-on-e6d52de9