Signal & Syntax · Guide
How A2P SMS Reaches a Handset
An A2P message passes through four or five systems between your API call and the handset. Each system is a place the message fails.
5 minUpdated ScoreMachine team
A2P and P2P
A2P (application-to-person) messaging is SMS sent by software to a handset. Alerts, delivery updates, one-time passwords and marketing messages are A2P traffic. P2P (person-to-person) messaging is SMS typed by a person and sent to another handset.
Operators price the two apart and filter the two apart. A2P traffic pays an A2P termination rate to the operator delivering the message. Operators set the A2P rate per destination country. P2P traffic runs on consumer rate plans. The gap between the two prices is what grey routes exploit.
OTT channels and RCS travel outside the SMS path. WhatsApp and Telegram messages cross the internet. RCS runs over data, and falls back to SMS where RCS is unavailable.
The Path of One Message
Example panel, one row per hop:
Example
01 Application API call: number, sender ID, text 02 Gateway or CPaaS Queue, format, pick a route 03 Aggregator Carry toward the terminating operator 04 SMSC Store, then send SRI-SM to the HLR 05 HLR Return the serving switch, or an error 06 Serving network Deliver to the handset 07 Handset Receive the message ← DLR Travel back along the same path
Your application sends the message to a gateway or CPaaS platform over an HTTP API. The gateway queues the message, formats the number and picks a route. An aggregator carries the message toward the terminating operator. The path runs through one aggregator or a chain of them.
Gateways and aggregators connect over SMPP (Short Message Peer-to-Peer) as well as HTTP. SMPP keeps a persistent connection, which suits high-volume A2P traffic. A client sends each message with submit_sm, and receipts return with deliver_sm. Each hop queues the message before passing the message on. Latency adds up along the path.
The terminating SMSC (Short Message Service Center) stores the message. The SMSC sends SRI-SM to the HLR to find the serving switch. The HLR returns the switch address, or an error for an absent or unknown subscriber. The SMSC hands the message to the serving network, and the network delivers the message.
If the handset is off, the SMSC holds the message and retries. Retries stop when the message's validity period ends. The sender sets the validity period on submission, in hours or days.
A delivery receipt (DLR) travels back along the same path. DELIVRD confirms the handset received the message. UNDELIV, EXPIRED and REJECTD report a failure. A route that returns no receipt leaves the send unconfirmed. Each segment of a long message returns its own receipt. GSM-7, UCS-2 and SMS segments explained covers the split. Each hop on the way back passes the receipt along. A hop that drops receipts leaves the sender without an answer.
Sender IDs, Short Codes and 10DLC
The sender ID is the name or number shown as the sender. Alphanumeric sender IDs run up to 11 characters, such as a brand name. Recipients cannot reply to an alphanumeric sender ID. Alphanumeric sender IDs suit one-way alerts, and long codes suit two-way conversations.
Rules differ by country:
- —The US and Canada do not support alphanumeric sender IDs.
- —India and the UAE require sender ID registration before traffic flows.
- —Unregistered sender IDs are rewritten or blocked in those markets.
India runs registration on a DLT (distributed ledger technology) platform, under TRAI rules. The sender registers the entity, the sender ID and each message template.
A sender ID registered in one country carries no standing in the next. A multi-country send needs registration in each market that requires registration.
US A2P runs on three kinds of number.
Unregistered A2P traffic on US long codes is filtered or blocked. Throughput on 10DLC depends on the brand's vetting score. Short codes carry more throughput than long codes. Each short code works in one country only.
Grey Routes
A grey route delivers A2P traffic through a channel priced for P2P. Grey routes run through SIM farms or unofficial interconnects. The sender pays less, and the terminating operator never collects the A2P rate.
Grey routes show up in wholesale offers priced below the operator's A2P rate. A rate below the official termination price marks a grey route. Operators detect grey traffic with SMS firewalls. Firewalls watch volume, content and sender patterns, then block the traffic without warning. The sender learns of the block from a missing or false receipt. On a grey route, sender IDs and receipts come from the bypass. A DELIVRD from a grey route proves less than a DELIVRD from the operator. Traffic on a SIM farm carries no registered sender ID. The route breaks registration rules too.
Where a Message Fails
Five mechanisms stop a message before the handset:
- —Landline. A landline receives no SMS as text. The message is dropped or read out by text-to-speech.
- —Number out of use. The HLR returns an unknown-subscriber error, and the SMSC rejects the message.
- —Ported-away number. Routing on the range sends the message to the range holder. The range holder forwards or rejects the message. See mobile number portability and SMS routing.
- —Unregistered sender. India, the UAE and the US filter traffic from unregistered senders.
- —Filtered content. Operator firewalls block messages matching spam or fraud patterns.
UNDELIV and EXPIRED receipts arrive after submission. Providers billing on submission charge for those messages.
The first three mechanisms are properties of the number. Each one is knowable before the message leaves the queue. The last two are properties of the sender and the text. Registration and content rules fix those two.
Checking Numbers Before Submission
Three fields answer the first three failures before submission.
line_type returns mobile, landline or voip. carrier returns the network serving the number after porting. accessibility returns valid, invalid or unknown for mobile numbers. An unknown result is not billed. HLR lookup vs eHLR compares the activity check with a register lookup. Undetermined numbers stay separate from the rest of the file. line_type also flags VoIP numbers, where SMS support depends on the provider behind the number. score.phone.scoring adds the four OTT channel booleans on the same request.
Drop the landlines, route the rest on carrier, and hold invalid numbers back. One request takes up to 10,000 numbers, so a file resolves before the first message leaves. A checked file also shortens the queue: fewer numbers leave, and each one has a route.
Try each check free on one number: Line Type Checker, Carrier Lookup and Phone Number Checker.
Terms in this guide