If you're open to simply controlling who is allowed to cause your phone to ring (not necessarily dependent on whether or phone is on "Silent"), here are some options:
Option 1: Use Do Not Disturb
Turn on "Do Not Disturb" and set the "Do Not Disturb" settings to only "Allow Calls From" your "Favorites" (add/remove Favorites in the "Phone" app or directly on a contact in the "Contacts" app).
Note: this will silence all other notifications, because "Do Not Disturb" will be active.
More info on The Verge.

Option 2: Silence Unknown Callers
Another option is to silence all callers that are not in your contacts using "Silence Unknown Callers" in your "Phone" settings.
More info on CNET.

Personal Choice
I always keep my phone on "Do Not Disturb" as I like to be in control of when I decide to look at my phone. I allow calls from "All Contacts", and make sure to add anyone that I expect calls from to my contacts. If I'm expecting a delivery or something, I'll temporarily turn off "Do Not Disturb". If I'm expecting unknown calls within a wide time range, I'll just allow all calls temporarily so that I can keep "Do Not Disturb" on.