How Does SMS Work? - World's Leading SMS / MMS API Provider

How Does SMS Work?

How Does SMS Work?

The Absolute Basics....

SMS stands for Short Message Service, and commonly referred to as text messaging.  How does SMS work?  At a high level it is very simple but the first thing you need to understand is the difference between Person to Person text messaging (P2P) vs. Application to Person text messaging (A2P).  For those of you who already know the basics and want the hardcore technical details, jump down to the next section, “The More Complex Explanation…”.

Person to Person (P2P) SMS and the Need for an SMSC

Text messaging is part of our everyday activities and most of us send and receive P2P text messages throughout the day.  There are literally trillions of P2P text messages sent and received every year, but with mobile applications such as WhatsApp and Viber, the volume of P2P text messages is starting to dwindle and the volume of OTT (Over the Top) messages sent through mobile applications is growing.  The diagram below shows how a P2P text message is sent from one mobile phone to another.  Understanding the basics will help you understand how everything else works.

p2p-sms-overview

In the diagram above, the sender of the text message, is a mobile subscriber of operator A; while the person who the text is being sent to is a mobile subscriber of operator B.  Once the person has hit “Send” on their mobile phone, the text message is sent to their home operator (e.g. AT&T).  Every mobile operator has a machine called an SMSC (Short Message Service Center).
An SMSC is simply a computer system, running specific software inside of the mobile operator’s network and is designed to receive the text message from you and to deliver the SMS to your friend’s phone through their mobile operator as quickly as possible.

Here is a picture of Mblox’s very first SMSC dating back to 2001 but trust us, most SMSC’s look very similar (and not very exciting).  We have since gone through upgrades and have replaced our SMSC infrastructure no less than 3 times to cope with increased volumes and the need for mission critical performance.

smsc-sms-mblox

The mobile operator’s SMSC will deliver the message directly to your friend’s phone if the operator has reach (the ability to connect) via an SS7 network.  If the operator does not have reach through an SS7 network, it will instead use what is called a P2P hub to deliver the message.  A P2P hub is actually a company whose business is to pass messages between mobile operators that can’t send messages directly to each other.

Three important things to note are –

  • In most cases an SMS will only be stored by one SMSC (usually the home operator) before final delivery to the intended handset
  • An SMSC can deliver to any handset in the world where the home operator has reach
  • In the USA all P2P messages are sent via a hub so at least two SMSC’s will be used to deliver the message.

Application to Person SMS (A2P SMS)

A2P SMS message delivery works in a similar fashion, with the key difference being instead of two people communicating through mobile phones, the communication is between a computer application and a person.  An example of this is when you receive a text message from your bank or other business.    To illustrate this see the following example –

a2p-sms-examples

The mechanics in sending an A2P SMS are similar to P2P SMS.  Messages flow via the mobile operators’ SMSCs but the key difference is that the message is sent from an enterprise (a business entity) instead of a person.  See the diagram below.

a2p-sms-mt-mo-diagram-mblox

At this point it is worth mentioning the two directions in which an SMS message can flow.  When it is sent to a mobile phone the text message is referred to as a Mobile Terminated (MT) message, subsequently when a message is sent from a mobile phone it is called a Mobile Originated (MO) message.  The way in which the message is delivered is exactly as shown above.  When a message is delivered by an SMSC it will return a Delivery Notification to the enterprise providing proof the message was delivered, or the reason for why it failed.

The Need for a Cloud Messaging Provider or Aggregator

An enterprise or small business could choose to directly connect to one mobile operator to handle the delivery for all their messages, but since no single mobile operator can reach every operator means there are messages that will go undelivered.  On the other hand the enterprise could choose to have direct connections to several mobile operators at once, this becomes complicated real fast  – see the diagram below, showing the additional overhead and complexity.

a2p-sms-value-chain-a

Most enterprises would not choose to connect to multiple operators, and have the overhead of managing each one and negotiating separate commercial contracts and technical integrations, hence the need for an aggregator.  So what’s an aggregator?  It is a business that takes care of the technical and commercial complexities for enterprises and provides them the most cost effective price to deliver anytime, anywhere.

sms-aggregator-value-chain

In some cases,  an enterprise will use another partner who specializes in marketing, multi-channel communications, or a vertical specialty to send their SMS messages on their behalf, these are referred to as an Application Service Provider (ASP) or communication provider.

How to Send a Message to a Subscriber Anywhere in the World?

Most cloud messaging providers (aggregators) have two ways to send a message,  either via a Web Tool or an API.  A Web Tool requires no development whereas an API typically requires some basic integration development to get a 3rd party system to send messages.  Mblox offers both of these solutions as options.

For both the Web Tool and API option, sending an SMS is very similar to sending an Email.  All that is required are the following fields –

To: (The Destination Number for the recipient of the message)

From: (Originator or Sender ID to show who the message is from)

Body: Some text to send to the recipient of the message

Once you submit that information via an API or a Web Tool,  we take care of the rest of the details,  and the message should arrive within a few seconds.

The More Complex Explanation....

SMS messages are transmitted to a subscriber mobile number via an SMSC (Short Message Service Center). In general, a mobile operator owns an SMSC, but it is also possible for 3rd parties to operate their own SMSC that is connected to a mobile operator’s network.  Mblox owns its own SMSCs and was one of the very first aggregators to do so back in 2001.   SMSCs are not restricted to sending SMS to only the subscribers of the mobile network the SMSC belongs to, SMSCs can send to any international mobile subscriber the mobile network, or its backbone provider has interworking or roaming agreements with. Therefore, a direct connection to the SMSC of each destination mobile network is not required. The most widely used technology for transmitting and receiving SMS is GSM. Other standards include CDMA, iDEN, and Satellite. Mblox connects to more than 100 global SMSCs, which allow us to provide unparalleled coverage to over 200 countries and the ability to continue sending SMS without interruption even if multiple SMSCs experience problems. Please see the article on ‘How Reliable is SMS’ for more information.

The SMS Specification

A standard GSM SMS offers the following features:

  • Up to 160 characters of plain text per SMS (utilizes GSM Encoding)
  • Support for concatenated and long SMS (using multiple SMS parts)
  • Ability to set the originator (sender ID) to up to 11 alphanumeric characters or 16 digits
  • Support for setting the data coding allowing for specific character sets and data types including:
  • Unicode UCS2
  • Binary for ringtones, wallpapers, WAP push, vCards, etc.
  • GSM encoding
  • Other SMSC specific character sets such as Greek ISO-8859-7
  • Delivery reporting with error codes
  • Validity period
  • Retry Schedule

The Mobile Telephone Number

MSISDN (Mobile Subscriber Integrated Services Digital Network number) is the technical term used to describe a mobile number in international format. However, the MSISDN is not a direct mapping to a mobile handset, or even to the SIM (Subscriber Identity Module) card. An MSISDN allows an SMSC to determine the MCC (Mobile Country Code) and MNC (Mobile Network Code) of the mobile number; and from there the SMSC can query the mobile operator’s HLR (Home Location Register) for information to correctly route the SMS to the handset, this information is the MSIN (Mobile Station Identification Number).  It is actually the IMSI (International Mobile Subscriber Identity), which is made up of the MCC+MNC+MSIN that is needed in order to send a message to a handset.

Example

The international MSISDN 447973000000 is broken down as follows:

  • 44 = Country Code for United Kingdom
  • 7973 = A network prefix or exchange prefix for Orange UK
  • 000000 = Subscriber number

The IMSI address is made up of 3 parts:

  • MCC (Mobile Country Code)
  • MNC (Mobile Network Code)
  • MSIN (Mobile Subscriber Identity Number)

SMS Delivery to Handset

After an SMSC receives the routing data from the destination network HLR, it can then send an “mt-ForwardSM” transaction to the MSC address, addressed to the IMSI. Note the IMSI address is stored in the SIM, and it is this address that is given to the MSC when delivering an SMS, not the MSISDN. The SMSC is notified by the MSC if the SMS termination (an acknowledgement) was successful, therefore allowing the SMSC to generate a delivery report indicating success. In the case of SMS delivery failure, the SMSC is also notified so that it can take steps to retry the SMS delivery. Please see the article on ‘How Reliable is SMS?’ This method of SMS transmission is referred to as MT (Mobile Termination), where the role of the SMSC is delivering an SMS to a subscriber handset.

MT-new

In this case, the ESME (External Short Messaging Entity) refers to the party originating the message.

SMS sent from a mobile handset are referred to as MO (Mobile Originated). This describes the process of a handset sending a Short Message Submission to its servicing and the MSC utilizing the mo-ForwardSM transaction to send the data saved and SMS to the SMSC for storing, subsequently forwarding to the destination mobile number. An acknowledgement is sent back to the originating handset.

MO-new

SS7 Network

The majority of the world’s mobile networks communicate with each other via Signaling System 7. This is a set of telephony protocols that enables the transmission of voice, data, control/session management information, and of course SMS. The SS7 protocol has layers based on the OSI (Open Systems Interchange) model. The MAP (Mobile Application Part) layer provides the functionality required for SMS transmission. The SMSC, HLR, VLR, MSC communicate together over the SS7 network utilising MAP commands.

Get Started Today!

Sign Up
1

Sign up

Get Free Credits
2

Get Free Credits

Send a Message
3

Send a Message

Brands Trust Us

Viber
Uber
L'Oreal
Salon iQ
Intec