Spam is not solely solved by technology, regulation also helps. Regulation also helps with phone and text spam, though there's more to do.
This is no different from say, assault, which doesn’t regulate hammers and baseball bats, but makes it illegal to hit people with them without their permission.
My understanding of phone spam regulation is there is some that legislates technology, namely forbidding completion of connections of spoofed phone numbers.