11.4. Receiving SMS Messages Using a Protocol / Interface Supported by an SMSC or SMS Gateway

After setting up an account with a wireless carrier or an SMS service provider, the SMSC or SMS gateway will start forwarding inbound SMS messages to your SMS application using a certain a protocol / interface. To communicate with an SMSC, an SMSC protocol is required. As mentioned in earlier sections of this SMS tutorial, most of these SMSC protocols are proprietary to the company that developed the SMSC. One widely used SMSC protocol is SMPP (Short Message Peer to Peer). It was originally a proprietary SMSC protocol created by Logica (an SMSC vendor). Now SMPP is an open SMSC protocol whose development is controlled by a non-profit organization SMS Forum. The following table lists some of the SMSC protocols and the SMSC vendors who develop the protocols:

SMSC vendor

SMSC protocol

CMG (CMG and Logica have merged into LogicaCMG.)

EMI (External Machine Interface)

UCP (Universal Computer Protocol)

Logica (CMG and Logica have merged into LogicaCMG.)

(Now the SMS Forum is responsible for the development of SMPP.)

SMPP (Short Message Peer to Peer)


CIMD (Computer Interface to Message Distribution)

SEMA Group (Now Airwide Solutions)

OIS (Open Interface Specification)


SMS gateways of SMS service providers and wireless carriers very often support one or more of the following protocols / interfaces: HTTP, HTTPS (HTTP + SSL encryption), XML over HTTP / HTTPS, SMTP (SMS to email), FTP. Some also support the SMPP protocol, which is usually used by advanced users. SMSC protocols other than SMPP are not commonly supported.

It is very easy to receive SMS messages from an SMS gateway if you use a simple protocol like HTTP / HTTPS. Let's take HTTP as an example. First, you log into your account and register a callback URL that points to a server-side script written by you. The server-side script is hosted on a web server / application server and it will be responsible for processing the received SMS messages. Commonly used server-side technologies include ASP, Java Servlet / JSP, Perl and PHP. If your server-side script is written in PHP, the callback URL should look something like this:


Whenever an SMS message is received, the SMS gateway will submit an HTTP GET to your web server / application server using the above callback URL. Details of the inbound SMS message such as its content, the sender's mobile phone number, the time and date that the SMS message is received, etc, will be appended to the callback URL. For example, suppose someone with the mobile phone number 61234567 sends an SMS text message "It is easy to receive text messages" to your SMS application's phone number. When the SMS gateway receives the SMS text message, it submits an HTTP GET to your web server / application server using an URL that looks like this:


In the above URL:

After processing the inbound SMS text message, you may want to send a reply SMS text message to the originator. Usually this can be done simply by including the reply SMS text message in the HTTP response you send back to the SMS gateway. The SMS gateway will then forward the included text message towards the mobile phone number 61234567. The cost for sending the SMS text message will be deducted from your account.

Note that the parameters that are included in the callback URL varies between SMS gateways of different SMS service providers or wireless carriers. For example, if a different SMS gateway is used, the previous SMS message "It is easy to receive text messages" may be forwarded to your web server / application server using a different URL, like below:


Also, note that data transmitted over the Internet using the HTTP protocol is not secure. This means other people can read the data included in the above URL. Some SMS gateways allow the use of the HTTPS protocol instead of HTTP in a callback URL (i.e. change "http" at the beginning of the above URL to "https") so that inbound SMS messages can be submitted to your web server / application server securely. (HTTPS must be enabled on your web server / application server.)


Previous Page Page 17 of 65 Next Page

Contents at a Glance (Click Here for Full Table of Contents)

Feedback Form (ExpandCollapse)

What do you think about this web page?

(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page