Quoted from Tomass:Call the number from another phone.
You could call them back from the same phone with *67. (Caller ID Block) You'll probably just get a recording that the call can't be completed anyway.
I've been using Google's anti-spam voice screening service, where you can send calls that you suspect might be spam to a sort of answering machine.
The caller gets told "Hi, the person you've reached is using a screening service from Google, and will get a transcript of this call. Go ahead and say why you're calling." Then whatever they say, Google attempts to translate voice-to-text in real time as you watch, allowing you to decide whether to answer after all.
It's not ideal. The way they word it, I don't know if a non-spam caller will realize that what they say gets displayed, and that you might pick up depending what they say.
In practice, only once has someone calling me complied, and it turned out to be someone I did want to talk to. Other times, it's fun to watch Google caption robocalls. Usually the spammers just hang up; I expect the predictive dialers (evil!) have started recognizing Google's spiel immediately by now.
Still, I may decide to go all in and opt in to letting them intercept all numbers that others have marked as spam for the same treatment. Then my phone won't even ring if they just hang up. I presume if a robo-call rambles on it will assume a hang up is in order then as well. Not sure, but I guess it displays what they say when your phone then rings. I would turn it on and test that, but it wouldn't think my other number was spam.
Why relate all this when OP was talking about texts? Well, now I wish they would do something similar for texts! Never used to get spam texts, now I get them all the time, and many seem to think my name is Herd, of all things!