At its most simple level SMS infrastructure has special servers that talk to each other. These servers run software called an SMSC (Short Message Service Centre) that can speak to each other using a special protocol designed for SMS transmission called SMPP (Short Message Peer to Peer). Through SMPP connections we can deliver text messages and process replies and delivery receipts (DLR).
Here is a basic diagram of what the network might look like:
Starting from the left, the graph above shows how a client can choose from a variety of SMS services such as Web SMS, Email SMS, or a REST SMS API call. Once the client decides which SMS service to use, it's sent through a secure SSL connection to an SMS Gateway such as Burst SMS. From here the Gateway assists in monitoring message compliance, spam, and is able to schedule large bulk requests to send seamlessly.
This SMS then goes through the Gateway, and gets delivered to your client’s carrier via an ON-NET connection or through the International SSL Network. Once the message gets delivered to your client via the GSM Network, they have the option to reply back to your text. This is how the process becomes interconnected.
Network and Connection Terminology
An SMS gateway is a type of SMSC that moves messages from one place to another. The gateway moves messages into a client application so they can then be handled as required. An example of an SMS Gateway is Kannel. It's a compact and powerful open source SMS gateway for GSM networks, used widely across the globe for serving trillions of SMS. This software will run on the server to identify destination, queue and prioritise messages to be transmitted via SMSC.
Short Message Service Centre (SMSC)
An SMSC is an element of a GSM network responsible for the processing SMS messages. The SMSC stores the messages, extracts the destination and tries to deliver the message. An SMSC is the primary connection point within a carrier, or company that needs to send or receive text messages.
The SS7 Network
Operators around the world are connected by a network known as the "SS7" or the "Signalling System #7" network. This network is used for exchanging information related to setting up a telephone call, number translation, prepaid billing systems, and also forms the backbone of SMS. The SS7 network is what all the carriers use to talk to each other.
Grey routing is a term given to messages that go via carriers with low cost interconnect agreements with other carriers, usually offshore. The drawback here is that as carriers don't want to receive this type of messaging. They actively seek to block them, hence the route may suddenly disappear without notice. Grey routing also tends to be slower, and may come from random caller IDs from unknown countries. The benefit is the cost per SMS is significantly lower. Reliability however becomes questionable.
The more borderline definition of a 'Grey Route' may contain SS7 routes. SS7 is the international signalling network used by operators to send each other P2P traffic. There is usually some kind of 'net-off' agreement, but in some cases operators could charge each other according to an AA19 agreement.
ON-NET routing is the most popular form of messaging used by A2P services in Australia, and increasingly globally. Noting again, the push by carriers globally to block Grey routed traffic using advanced filters in their SMSC's. This forces market participants to connect using ON-NET for high quality reliability, and this ensures the revenue stream of A2P messaging comes directly to the carriers not to international carriers.
Some companies have the option to combine more reliable grey routing on lower value carriers, with their ON-NET offerings. If the routes are monitored well, then messages can be delivered reliably.
The most common use for hybrid routing is for SMS marketing messages, where timely and reliable delivery is less of an issue. If you are looking for a service where reliability is paramount then you should be demanding a genuine ON-NET route from provider. It may cost a little more but will be worth it in the long term.
The Global System for Mobile Communications (GSM)
The GSM network has many evolution such as CDMA, 3G and 4G however in the SMS business world it is generally referred to as the GSM network. The GSM network is the SIM cards, mobile towers and all the other hardware that facilitates the delivery of mobile communications to mobile phones.
Mobile Numbers (MSISDN)
Mobile Station International Subscriber Directory Number. This is the technical term used for the mobile number attached to the SIM card in a mobile phone. A MSISDN contains several important numbers to identify country, destination and subscriber number.
Depending on the country it’s generally broken down into:
MSISDN = CC + NDC + SN
CC = Country Code
NDC = National Destination Code
SN = Subscriber Number
In Australia, there is no NDC as we have a small amount of numbers.
CC = 61
SN = 4XX XXX XXX
In Australia we add a 0 to the front of the number. This needs to be dropped to compose the international format of the number.
Eg 0488 333 444 = 61488333444
*In countries like the USA an NDC is used to identify a specific region.
When sending SMS via SMPP the number must be provided in full international format in order to correctly deliver to the GSM network. There are many usability problems that can surround this as a large proportion of mobile subscribers are not aware of country codes. This has led to a lot of work done at client application level to remove the need for subscribers to understand this.
A bind is the term used for a connection by SMPP to an SMSC. Binds are able to transmit only a certain amount and type of information so there will be multiple binds made between SMSC’s. There are also what is referred to as transceiver binds that can send messages in multiple directions.
Delivery Receipts (DLR)
DLR’s are processed by SMSC’s to notify the status of an SMS message. They are used to notify of message delivery and failure. There are lots of different types of delivery receipts used by different carriers. It is widely accepted that the DLR structures used in the SMPP protocol should be used, however in reality this is rarely true. When setting up a carrier in your SMS gateway, pay careful attention to the DLR codes you are receiving so you can show correct reports to your users. Also different carriers can use different time stamps. Generally they should be in UTC however sometimes they may be in local time, depending on who you are connecting to.
By sending the appropriate message over the SS7 signalling network, it is possible to query the home location register (HLR) of any mobile subscriber using their phone number. This process is known as performing a "HLR Lookup" or "HLR Query", and is a fast, effective, and accurate way to determine which network operator currently serves a given mobile telephone number.
The HLR holds the most accurate, up-to-date information on the subscriber
HLR lookups are fast and inexpensive to perform
A lookup can be performed in real time during call setup or SMS delivery
Probably the most popular lookup service is the Cardboard Fish HLR Lookup, now owned by MBlox.
Home Location Register (HLR)
The HLR or "Home Location Register" is at the core of every GSM mobile network worldwide. The HLR is a central database of all customers authorised to use the network, and is used by the network in the authentication of a phone when registering with a transmitter, either on the home network, or when roaming abroad.
MO and MT messages
Two terms that are often referred to in SMS business are MO (Mobile Originated) and MT (Mobile Terminated) messages.
MO refers to messages send from a mobile phone and received by an SMSC and MT refers to messages delivered from an SMSC to a mobile phone.
Mobile Network Operator (MNO)
The MNO or Mobile Network Operator is the carrier. The carrier connects to mobile phones using the GSM network. It will house an SMSC other companies can connect to with their own SMSC which would be set up as an SMS Gateway.
Mobile Network Virtual Operator (MVNO)
MVNO’s are resellers of network services from the carriers. These include a myriad of services such as Amaysim, Boost and Lyca Mobile.
Mobile Number Portability (MNP)
MNP is the ability to take your existing mobile number to a new service with a new provider. 'Porting' is the act of transferring your number to a new service, either with a different network or a different provider, or both.
Numbers are always owned by the original carrier and are added to the HLR. This contains the information regarding the numbers current network. In order to deliver correctly, an MNP lookup is performed before the message is submitted to the GSM network.
Short Message Peer to Peer (SMPP)
The SMPP protocol is an open, industry standard protocol designed to provide a flexible data communication interface for transfer of short message data between a Message Centre and a SMS application system. A Bearer Message Centre can be a Short Message Service Centre (SMSC), a GSM Unstructured Supplementary Services Data (USSD) Server, a Broadcast Message Service Centre or another type of Message Centre. This document provides guidelines for getting an application based on the SMPP protocol version 3.4 specification working in a SMSC/GSM/UMTS network environment.