"If you want to speak to Marv, press 1. If you want to speak to Pat, press 2. If you know the name of the person who lives here, press 3."
If the caller presses 3, they have to punch in the first 3 letters of the name of the person they are trying to reach.
If, instead, the caller punches in 5284, it routes the call through.
All other calls or terminated without the phone ringing.
This can also work for cellphones with a cheaper box, but takes a little more effort to configure.