The only real positive technique for detecting and blocking spoofed messages should be to display screen incoming mobile-originated messages to verify which the sender is a valid subscriber and that the message is coming from a valid and proper location. This can be carried out by introducing an clever routing https://www.techiespider.com/understanding-text-messaging-apis-revolutionizing-communication/