Sorry I'm not being clearer, and I don't have enough details to be sure I'm correct here.
iMessage receives many types of messages. It can be a text from a dumb phone, an e-mail to your mobile number, or from another iMessage user (and probably more). All of those are routed to your iMessage client. Unless it originated on an iMessage capable device, it routed through your carrier.
People set their iMessage to show as sent from their phone number or e-mail address (iPhones) or e-mail address (iPods) so those are easy to identify. It's the other ones we're concerned with.
I'm going to generalize a bit below.
If someone sends me an SMS message from a pager or a phone, the number should show up and I can block it with iOS 7. Conversely, spammers generally send messages as e-mail with a computer to the Internet, not with telephony via a carrier. These messages will come into iMessage showing from numbers like "725-572" or "1 (210) 100-801" (NOT a phone number) and they may increment by 1 for each message from the same source.
AT&T allows you to block messages sent to you as e-mail. You don't need to specify who they are from because you are blocking the ability for
everyone to do this.
My settings are to block all text messages sent as e-mail, block all MMS messages sent as e-mail, and block all messages sent to my
mobilenumber@att.txt.net. With those settings the only messages I can receive are from a telephony device that sends a true SMS.
AT&T also allows us to whitelist senders so they may send e-mail originating messages to my mobile number. So when I sign up for Redbox messages I go to my AT&T settings and allow Redbox messages to be delivered to me (again, in iMessage).
I'll stop here, but depending on your carrier I think you can solve your problem.