You can also whitelist just your contacts list, block area codes with wildcards, or block private numbers.
http://www.androidpolice.com/2013/07/31/cyanogenmod-10-2-to-...
For stock Android I recall being able to add the numbers to a contact and make them go to voicemail, but that was an annoyingly unusable workaround. There may be better options these days.
You can also register them as spam numbers, so any unsolicited SMS messages go into a spam folder. Not sure how much of a problem this is in the US, but here in the UK I almost daily get texts from PPI claim companies, dodgy law firms and the like.
My experience with implementing this is most spammers are pretty dumb or aiming at dumb targets, so a VOIP asterisk rule will get hit hundreds of time over the years by the same company.