How do SMPP submit_sm and smpp deliver_sm work

This page gives information about how the SMS submission procedure is working. You will also see what happens inside the mobile network after you have submitted your sms message to the SMPP server using the SUBMIT_SM pdu.

What is SMPP submit_sm

SMPP submit_sm is the SMPP protocol data unit (SMPP PDU) used to submit an SMS message to the Ozeki SMPP server.

SMPP submit_sm

The SMPP submit_sm PDU is the PDU that is sent to the SMPP server, when an SMPP client wants to send an SMS messages using the SMPP protocol. After this PDU is received by the SMPP server, the phone number is looked up in the Home Location Register (HLR) of the mobile network operator. The HLR lookup is required to find which network the mobile phone is currently roaming in. Once this information is available, the SMS is forwarded to the Mobile Switching Station (MSC) of the network. This station is responsible for delivering the SMS to the recipient terminal. The final step is performed by the MSC. It forwards the SMS to the recipient handset (Figure 1).

Figure 1 - The route of the SMS message in the mobile network

SMPP submit_sm SMS delivery explained

  • The SMS is submitted by the SMPP client
  • The SMS is received by the SMPP server
  • The SMPP server returns a submit report (submt_sm_resp)
  • A HLR lookup is performed by the SMSC
  • The SMS is forwarded to the MSC
  • The SMS is sent to the mobile phone
  • The mobile phone confirms the message
  • The MSC sends an acknowledgement to the SMSC
  • The SMPP server in the SMSC creates a delivery report
  • The SMPP server sends the delivery report to the SMPP client
  • The SMPP client acknowledges the delivery report

As you can see on Figure 1, the second part of the SMS submit procedure is the act of delivering the SMS delivery report. This is done by the SMPP server using the SMPP deliver_sm pdu. The delivery report is returned to the SMPP client the same way a standard SMS is returned.

SMPP submit_sm example explained

The following diagram shows an example SMPP submit_sm PDU sent by the SMPP client of Ozeki 10 SMS Gateway. On the figure you can see an SMPP bind pdu called smpp bind_transmitter. This is followed by the SMPP submit_sm PDU, and the SMPP deliver_sm PDU.

Figure 2 - SMPP submit_sm PDU example

SMPP submit_sm example

2021-04-06 12:06:25.356 INFO SMPP_client_1: <- 00000098000000040000000000000002000101303030303030300001013336323035343630363930000000010000010000006548656C6C6F2C205468697320697320612074657374206D6573736167652066726F6D204F7A656B6920534D5320476174657761792E20506C65617365207669736974207777772E6F7A656B692E687520666F72206D6F726520696E666F726D6174696F6E2E
2021-04-06 12:06:25.356 INFO SMPP_client_1: -> 0000001B8000000400000000000000023339373439363831303500

SMPP deliver_sm example

2021-04-06 12:06:27.033 INFO SMPP_client_1: -> 000000AA000000050000000000000001000101303030303030300001013336323035343630363930000400000000000003007769643A33393734393638313035207375623A30303120646C7672643A303031207375626D697420646174653A3231303430363132303620646F6E6520646174653A3231303430363132303620737461743A44454C49565244206572723A30303020746578743A44656C697665727920737563636573732E
2021-04-06 12:06:27.033 INFO SMPP_client_1: <- 0000001180000005000000000000000100

SMPP submit_sm video tutorial

The following video demonstrates how you can setup an SMPP client connection and how you can send an SMS messages using the SMPP submit_sm PDU.

SMPP submit_sm parameters (Quick list)

submit_sm parameters

  1. command length
  2. command id
  3. command status
  4. sequence number
  5. service type
  6. source address
  7. destination address
  8. sms flags
  9. timestamps
  10. data coding scheme
  11. short message

SMPP submit_sm parameters

Field Name Size octets Type Description
command_length 4 Integer Set to overall length of PDU.
command_id 4 Integer 0x00000004
command_status 4 Integer 0x00000000
sequence_number 4 Integer Set to a Unique sequence number. The associated submit_sm_resp PDU will echo this sequence number.
service_type Var. max 6 C-Octet String The service_type parameter can be used to indicate the SMS Application service associated with the message. Specifying the service_type allows the ESME to avail of enhanced messaging services such as “replace by service_type” or to control the teleservice used on the air interface.
Set to NULL for default MC settings
source_addr_ton 1 Integer Type of Number for source address.
If not known, set to NULL (Unknown).
source_addr_npi 1 Integer Numbering Plan Indicator for source address.
If not known, set to NULL (Unknown).
source_addr Var. max 21 C-Octet String Address of SME which originated this message.
If not known, set to NULL (Unknown).
dest_addr_ton  1  Integer  Type of Number for destination
dest_addr_npi1IntegerNumbering Plan Indicator for destination
destination_addr Var. max 21 C-Octet String Destination address of this short message For mobile terminated messages, this is the directory number of the recipient MS
esm_class1IntegerIndicates Message Mode and Message Type
protocol_id1IntegerProtocol Identifier. Network specific field.
priority_flag1IntegerDesignates the priority level of the message
schedule_delivery_time 1 or 17 C-Octet String The short message is to be scheduled by the MC for delivery.
Set to NULL for immediate message delivery
validity_period 1 or 17 C-Octet String The validity period of this message.
Set to NULL to request the MC default validity period.
Note: this is superseded by the qos_time_to_live TLV if specified.
registered_delivery 1 Integer Indicator to signify if a MC delivery receipt, manual ACK, delivery ACK or an intermediate notification is required.
replace_if_present_flag 1 Integer Flag indicating if the submitted message should replace an existing message.
data_coding1IntegerDefines the encoding scheme of the short message user data.
sm_default_msg_id 1 Integer Indicates the short message to send from a list of pre- defined (‘canned’) short messages stored on the MC. If not using a MC canned message, set to NULL.
sm_length1IntegerLength in octets of the short_message user data.
short_message Var. 0-255 Octet String Up to 255 octets of short message user data.
The exact physical limit for short_message size may vary according to the underlying network.
Note: this field is superceded by the message_payload TLV if specified.
Message Submission TLVs Var. TLV

More information