Yes. You can use the caller ID to do that type of thing.
It is free to create an account and you can explore all sorts of the options. The only drawback the you get used to, is that you define things from the end back to the beginning. For example, you create a voicemail box before you can forward calls to it.
CallerID Filtering: If you only want to stop specific unwanted or spam numbers from ringing through to your forwarding destination while keeping normal calls active, go to DID Numbers > CallerID Filtering to block or redirect individual numbers.
CallerID Number: Enter the country code followed by the area code, and use the _ (underscore) wildcard for the remaining digits.
Example for North America (Country Code 1): To block area code 555, enter 1555_______ (the number 1, the 3-digit area code, and exactly 7 underscores for the remaining phone digits).
Or perhaps you want to only pass phone numbers that are in your area code.