There are several ways in which a mobile application is able to send and receive messages:
- Via a messaging aggregator
- Via an operator’s messaging gateway
- Via direct connectivity with an operator’s SMSC/MMSC
The last is very rare as operators only allow large content providers or media companies who have lots of messaging traffic to hook up directly to their internal infrastructure. It’s also trickier to hook up this way as the protocols used are SMS protocols (eg. CIMD2 or Computer Interface to Message Distribution, SMPP or Short Message Peer-to-Peer, UCP or Universal Computer Protocol) and those can be really involved (these are mostly available online and Wikipedia has got good introductions to them) Most of the time, such infrastructure are situated within network firewalls so access is always an issue.
The second requires agreements with the operator to hook up to their messaging gateway. Usually the protocols exposed are a form of HTTP or one of the standard SMS protocols. Depending on the operator, the connectivity may be IP whitelist, password protected, VPN or SSL. In this case, these systems are in a part of the carrier network called the “DMZ” – in other words, it’s a part of the network that the carrier allows access for third party apps.
The first is probably the easiest since it usually only involves payment to an Messaging aggregator eg. mBlox, Sybase 365 for message delivery. There are various models here. For some of these vendors, they establish connectivity via the operator’s messaging gateway or direct connectivity with the SMSC/MMSC; for others, they may even own or lease an operator’s infrastructure to send and receive messages.
The following diagram shows a typical messaging architecture. Note the “Application” is the application you are testing. SMSC stands for SMS Center. MMSC stands for MMS Center.
Now the operator infrastructure is more complex than that of course. Some other important components include a billing/charging subsystem and number portability components. We’ll talk more on billing and charging in another series of posts here.
Also, in this blog, we do not cover the details of how messages get routed between various parts of the operator network (and cross operator network) but it suffices to say that there are various “registers” that tell the network where you are. Say, if you travel from one country to another – the moment you switch on your handset and connect up to a roaming partner operator, you are registered with that network who will then register your existence with your operator. This then allows for all incoming (or MT) messages to get routed to this operator and hence delivered to your handset. Now when you send an outgoing (or MO) message, notice that you need to specify your country code (eg. +1 for US, +44 for UK) otherwise your message does not get to them. This is because you’re actually on the roaming carrier network. Hence, if you send without the country code, you are essentially sending within that country’s network. A good reference on how this works can be found in Wireless Messaging Demystified – SMS, EMS, MMS, IM, and others by Donald Longueuil.