It's a great idea, but wouldn't work for us who have so many lame- brained friends who would never remember any code. We can't even get our friends to remember to change their email addressbook when we change our email provider.
There is also an item called "Caller ID Manager" from Privacy Corps. It looks like a separate Caller ID box, but can be set to block whatever numbers you program into it, including all 800 numbers, all888 numbers, unidentified numbers, etc. Costs about $100. From the description, it looks like it works on one phone and one would have to add "remotes" for other phones. (Google it).
I think an amendment to the Telemarketing Laws is in order, to prohibit any telemarketer, calling on behalf of any charity or political organization, from calling any number more than once a year.