Dynamic call blocking

Is it possible to write an iOS app or app extension to block an incoming call based on the area code (or some other portion of the incoming call number)?

Answered by TheCD in 238685022

You're right, it only allows blocking individual numbers. Blocking an entire area code would require blocking 10,000,000 numbers, but that's likely way over the limit.


In my opinion, there should be an API to block numbers by regular expression. That would still adhere to the goals of privacy and performance.


Feel free to request new APIs here: https://bugreport.apple.com/

Yes. This guide explains how to make an app extension that blocks calls: https://developer.apple.com/documentation/callkit#2624970


From the documentation:

"This is useful for apps that, for example, maintain a database of known solicitors, or allow the user to block any numbers that match a set of criteria."

Thanks for your response, but the reference you provided does not give any indication of how to specify blocking criteria such as "incoming number matches area code ***". How would such criteria be communicated? My understanding is that nothing in CallKit would allow my extension to even see the incoming area code.

Accepted Answer

You're right, it only allows blocking individual numbers. Blocking an entire area code would require blocking 10,000,000 numbers, but that's likely way over the limit.


In my opinion, there should be an API to block numbers by regular expression. That would still adhere to the goals of privacy and performance.


Feel free to request new APIs here: https://bugreport.apple.com/

Regular expressions will bottleneck at larger scales due to SQLite's full table scans. (IMHO, performance issues due to full table scans are why we have a "single numbers only" API and size limited list for Call Directory Extension).


Number ranges (with some spatial index optimizations) will provide performance for a (really) small storage space tradeoff. Have already requested this feature (with code samples) but there is still no progress from Apple.

The "automatic call block" works by checking incoming calls and asking the caller to enter an access code before it rings. Since incoming automatic calls are unable to enter the code, the device detects automatic or promotional calls and does not ring.

Can you block calls only from someone?

**Block calls from specific numbers: ** Open the Phone app. Tap the More button. Enter the Blocked tab and choose the Settings icon. Now enter the Blocklist menu and choose the Plus icon to add phone numbers you wish to block.

We are now in the year 2021 where Apple just introduced iOS 15. Looking at the CallKit documentation there is has not been an update. I really don't understand why you have to enter a list of numbers while patterns can be so much more efficient. Unwanted phone calls are a growing pain.

Please Apple LISTEN to the feedback of your customers!

If you want to block certain country codes you need to generate and add millions of phone numbers in the way the current API is build up. It's awkward.

I want to add a feature in my app that would allow the user to manually disable VoIP features within the app from all numbers. I don't see why we need to report the call to CallKit if it' wasn't a call placed to the user's device, and if we do, there should be a way to disable the incoming call notification at the framework level.

2024 now! The issue still remain. Where are you Apple?

Hope is a good thing. 😂

WWDC24, let’s wait and see!

Dynamic call blocking
 
 
Q