When I first looked at your patch I wondered why we could just not change the code on line 8 to something like this:
However I seem to understand now that your patch is searching the contact list.
if (contact.name === 'Do Not Answer' || contact.name === 'Unknown number' || contact.name === 'Blocked number')
What I am wondering about is how the phone identifies the difference between blocked numbers and unknown numbers.
For example on my phone it shows: