The Hiya app lets you block calls that start with a particular string. It looks like the app allows for blocking just an area code. The only downside is that numbers being blocked by Hiya will sometimes start to ring for like a quarter of a second before the blocking takes effect - still better than having them ring through. I have the area code and exchange for both of the numbers that ring to my phone automatically blocked in Hiya (so, first six numbers) and it makes a big difference. My LG G7 has a call blocking feature, as well, but trying to block only the initial string of numbers for the area code and exchange didn't work. I'd recommend Hiya.
The thing that pisses me off is that the numbers are either faked or stolen. The people actually making the call on those numbers need to be arrested and charged with a felony. I don't care if they are some low level telemarketing drone. They are already scammers and are committing hundreds of felonies a day. Put them in prison.
Apparently you cannot.