The sole certain way of detecting and blocking spoofed messages would be to display incoming cellular-originated messages to verify which the sender is a legitimate subscriber and that the information is coming from a valid and correct area. This may be implemented by adding an smart routing purpose on the https://www.techiespider.com/understanding-text-messaging-apis-revolutionizing-communication/