SMS Fundamentals

When SMS was originally designed, it was not intended for person-to-person messaging. Instead, it was conceived as a means of delivering a service-based message to the user, such as a voicemail notification. As a result, the signaling channel of the GSM system was used, and the architecture not optimized for the kinds of messaging we do today.

A text message is limited to 140 bytes, or 160 7-bit characters, though languages that require 16-bit encoding will be limited to 70 characters.

When an SMS message is sent, the mobile phone uses the configuration data found in its SIM card to locate and contact the Short Message Service Center (SMS-C) operated by the carrier. The sender's carrier will forward the message on to the recipient's carrier using SS7 signaling protocols, and the recipient's carrier holds the message until it can be delivered on to the recipient's phone, as shown in Figure 1.

SMS network architecture simplified

Figure 1. SMS network architecture simplified

The fact that the message must cross so many networks can lead to low reliability in the system: delivering SMS messages across carriers is more likely to fail than delivering messages within a carrier's network.

It is worth noting that "true" SMS exists only on GSM networks. GSM is the system used by carriers across most of the world, but in the United States, several carriers (including Sprint and Verizon) use an alternative system, CDMA. ...

Get How to Build an SMS Service now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.