smpp

SMPP Protocol: 

SMPP or Short Message Peer to Peer protocol is an open standard protocol which uses TCP/IP protocol. Earlier to smpp, ss7 was the standard protocol for messaging.  USSD and SMS uses smpp. A messaging application can be developed using smpp.

The app can be bulk sms gateway, which connects to many mobile operators over smpp on one side and other side can expose HTTP based bulk sms apis. 

A voting app, it connects to mobile operators SMSC and can receive all messages for a short code.

Benefits of SMPP:

1. SMPP is an open standard. Two peers can develop application independently.

2. Its easy to get smpp connection than legacy ss7 protocol.

3. Uses TLV based encoding for parameters and messages , no need ASN.1 compilers for encoding and decoding. So reduces the cost of messaging or ussd application development.

4. Two mobile operators can exchange sms, if they don't have SS7 level roaming agreement. For example if MNO1 want to send sms to the subscriber of MNO2. MNO1 sends the text to SMSC of MNO2 over SMPP.

5. Easy to develop sms gateway for bulk sms provider. Earlier to smpp, each mobile operator was exposing HTTP or other form of APIs to the bulk sms providers. API format was depending on SMSC vendor of a MNO. This was making difficult for, buksms providers to connect many mobile operators. With SMPP, no change/develoment required for connecting a new mobile operator.

6. Uses TCP/IP protocol stack, which is available on each operating system now and a reliable protocol.

SMPP Start up sequence : 

This example shows the message sequence, used by sn ESME to connect to a SMSC for sending a receiving text message.

1. ESME connects to smsc over TCP/IP. This involves TCP connection setup with peer by three way handshake.
2. ESME binds with SMSC by sending bind transceiver smpp protocol message to the peer.
3. ESME Send Submit SM , message to send text to a mobile device.
4. SMSC , send a deliver sm to the ESME for sending a text received from mobile device.

Protocol Messages:

BIND Receiver /Bind Received Response : 

SMPP entiry (e.g ESME), binds itself with peer entity , for receiving messages only. E.g a short code entity which is used for voting pupose.

BIND Transmitter/Bind Transmitter Response : 

SMPP entiry (e.g ESME), binds itself with peer entity , for receiving messages only. E.g a short code entity which is used for voting pupose.

Bind Transmitter/ Bind Transmitter Response :

An entity uses this message, if will send messages only.

Bind Transceiver/Bind Transceiver Response:

For send and received both.

Unbind/Unbind Response: 

An entity uses this message , to remove itself from sending or receiving or both messages from peer node.

Submit Sm/Submit Sm Response:

When a text need to send to SMSC, for sending sms to the destination mobile. The text is send in submit sm message.  If receiving side accepts the message, then a Submit sm response will have success else an error code is returned to the sending entity.

Deliver Sm/Deliver Sm Response:

When a text need to send from  SMSC to an ESME. The text is send in deliver sm message.  If receiving side accepts the message, then a Submit sm response will have success else an error code is returned to the SMSC.  E.g when a text is sent to a short code from mobile device. On GSM network it reaches to SMSC as MO-SMS then, smsc will send text to the short code handling application.

Query Sm/Query Sm Response:

An ESME sends this message to SMSC , for a already submitted sms. The short message state (unknown, enroute etc.) is returned to the ESME , by the SMSC in Query SM Response.

Cancel Sm /Cancel Sm Response:

ESME send this message to cancel an already submitted message. This might be that message is no longer valid and ESME don't want to send this sms no more.

Enquire Link/ Enquire Link Response:

This is an optional message. Runs periodically in both the directions from peer to peer. If a Enquire Link Response is not received by sending entity for a sent enquire link, Then smpp connection marked inactive. SMPP layer disconnects the TCP connection. If application is TCP client then tries to connect again with the peer.

SMPP Connection Parameters:

After two peers has been decided that they will talk to each other over SMPP. Both should setup a connection, before sending or receiving text. For example, a bulk sms provide want to connect to a mobile operator's SMSC.  SMSC will work in server mode and bulk sms provider will act as ESME.  Mobile operator will create a smpp account for sms provider and share the server details. 

SMPP account details given to bulk sms provider.

  1. Host : This is the IP  or URL of SMSC.
  2. SMPP Port, a tcp port can be default smpp port 2775 or other.
  3. System_Id , a string value.
  4. Password, a string value.
  5. SystemType , string and optional value.

Message Format:

Each smpp message have fixed header and a variable message section.  Message section depends on the message type.

SMPP Header: 

Header have following parameters:

  1. Command Length, total length of message, including header.
  2. Command Id, every message type in smpp have an integer value called the command id.
  3. Command Status, this field have significance in a response message of a command id.
  4. Sequence Number, this is a unique value assigned by the originator of a smpp pdu.

Leave a Comment

Your email address will not be published. Required fields are marked *