What “Illegal Subscriber” usually means:
“Illegal subscriber” is an operator-side rejection that says the recipient’s subscription is not allowed to receive the SMS (failed authentication / blocked / not provisioned). In practice this commonly maps to a few things: the HLR/HLR-equivalent knows the MSISDN/IMSI is not valid or not provisioned for SMS, the subscriber has been barred/blocked by the operator (fraud, DND/opt-out, blacklist, call/SMS barred), or the network rejected the message due to roaming/MNP/authorization issues.
Most likely root causes:
Subscriber barred / blocked by operator (administrative/anti-fraud, DND, blacklist).
Authentication failure / IMSI not known in HLR (HLR doesn’t have a valid IMSI/MSISDN binding).
Recent SIM port / MNP / provisioning delay -> temporary state where HLR record inconsistent.
Network/operator policy (region, roaming restrictions, operator blocks).
SMSC/SMPP gateway misinterpretation or routing to wrong operator (wrong TON/NPI or formatting)