---
updatedAt: 2025-12-04T06:23:34.000Z
agentTools:
  projectIndex: https://docs.smsportal.com/llms.txt
---

# Sending and Receiving

## Submitting Messages

The following default settings can be used for the *submit\_sm* PDU:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Recommended Value
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        _service_type_
      </td>

      <td>
        Null
      </td>
    </tr>

    <tr>
      <td>
        _source_addr_
      </td>

      <td>
        Any series of ASCII characters terminated with a NULL character. (Up to a max of 20 characters).
      </td>
    </tr>

    <tr>
      <td>
        _source_addr_ton_
      </td>

      <td>
        0
      </td>
    </tr>

    <tr>
      <td>
        _source_addr_npi_
      </td>

      <td>
        0
      </td>
    </tr>

    <tr>
      <td>
        _destination_addr_
      </td>

      <td>
        A series of ASCII characters, each character representing a
        decimal digit (0 - 9) and terminated with the NULL character. (Up to a max of 20 character).
      </td>
    </tr>

    <tr>
      <td>
        _dest_addr_ton_
      </td>

      <td>
        0
      </td>
    </tr>

    <tr>
      <td>
        _dest_addr_npi_
      </td>

      <td>
        0
      </td>
    </tr>

    <tr>
      <td>
        _data_coding_
      </td>

      <td>
        0

        GSM 03.38 is default SMSC character set (Encoding)
      </td>
    </tr>
  </tbody>
</Table>

> 📘 NOTES
>
> Your SMPP account must be configured for access to mobile network operators to which you are attempting to terminate messages. If access has not be configured then the *submit\_sm* PDU will be rejected with an ESME\_RINVDSTADR response.
>
> *submit\_sm* PDUs with *destination\_addr* fields that are not numeric will also be rejected with an ESME\_RINVDSTADR response.
>
> *schedule\_delivery\_time* is not supported. Any submit\_sm PDUs with a scheduled time are overridden and sent out for immediate delivery.

## SMSC specific optional parameters (TLVs)

**The following SMSC specific optional TLVs are provided:**

| TLV Tag Identifier | Character Limit | Description                                                                         |
| :----------------- | :-------------- | :---------------------------------------------------------------------------------- |
| **0x1400**         | varchar(100)    | Customer Reference. Can be used when generating reports using the control panel.    |
| **0x1401**         | varchar(100)    | Cost Center Reference. Can be used when generating reports using the control panel. |

## Data Coding Schemes

The following data coding schemes are supported.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Data Coding Scheme (DCS)
      </th>

      <th>
        Description
      </th>

      <th>
        Max Length (Bytes)
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        **0**
      </td>

      <td>
        [GSM 03.38](https://en.wikipedia.org/wiki/GSM_03.38)

        This is SMSPortal's default data coding scheme.
      </td>

      <td>
        160
      </td>
    </tr>

    <tr>
      <td>
        **8**
      </td>

      <td>
        [Unicode / UCS-2](https://en.wikipedia.org/wiki/Universal_Coded_Character_Set)
      </td>

      <td>
        140
      </td>
    </tr>
  </tbody>
</Table>

> 🚧 IMPORTANT
>
> Only the above two encodings are supported. *submit\_sm* PDUs that specify a different *data\_coding* or that exceed the max length will be rejected.

## Receiving Delivery Receipts and MO Messages

Please note that it is important to keep a TRX or RX bind connected to receive outstanding *deliver\_sm* PDUs as soon as possible. Outstanding *deliver\_sm* PDUs are kept for 12 hours or a maximum of 1 million outstanding PDUs is reached, after which the oldest *deliver\_sm* PDUs will be discarded to make room for newer *deliver\_sm* PDUs.

The *esm\_class* field of the *deliver\_sm* PDU can be used to determine if a mobile originated (MO) message is either a delivery receipt (DLR) or a default message. The third, fourth, fifth and sixth bit must be off for it to be a mobile originated message, i.e.xx0000xx where ‘x’ is an arbitrary bit value.

Delivery Receipts for *submit\_sm* PDUs are only sent if the *registered\_delivery* field of the *submit\_sm* PDU is set to request the delivery receipt.

Delivery receipts are embedded either in the short message mandatory field (if less than 255 octets) or the message payload TLV field of the *deliver\_sm*. The format of the delivery receipt is SMSC vendor specific. The following is a typical example of a delivery receipt.

“id:IIIIIIIIII sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done date:YYMMDDhhmm stat:DDDDDDD err:E Text: . . . . . . . . .”

There are two methods that can be used to perform matching of original *submit\_sm* PDUs to *deliver\_sm* PDUs

## 1. Matching MO messages using *source\_addr* and *destination\_addr*

Figure 1 shows how PDU matching can be achieved using the source and destination addresses of the “submit\_sm” the “deliver\_sm”. The source address is set to a reference number in the “submit\_sm” pdu. The matching “deliver\_sm” messages will have this reference number in its destination address field.

<Image align="center" alt={2400} border={false} caption="Fig.1 - Matching using source_addr and destination_addr" title="Fig.1 Matching Using reference TLV@2x.jpg" src="https://files.readme.io/9ebf90b75dc9c2f14a632fc24019015641cbdcdb089b67042d0dca71c647b76e-SMPP_01.jpg" width="100%" />

<br />

## 2. Matching MO messages using *user\_message\_reference* TLV

To match a mobile originated *deliver\_sm* to a *submit\_sm*, set the *user\_message\_reference* TLV in the *submit\_sm* PDU to an integer value. On receiving the *deliver\_sm* PDU, the user message reference TLV will contain the original integral value provided by the *submit\_sm*.

Figure 2 depicts a typical client and server interaction for a registered delivery *submit\_sm*. It also shows the delivery of a mobile originated message. The interaction will vary based on bind types (TX, TRX, and RX). A *deliver\_sm* message may not necessarily be received on the same bind or session. If there are outstanding *deliver\_sm* messages and no applicable binds to send them to they will be delivered when binding with an applicable bind request (RX or TRX).

The account must be configured to achieve this type of matching (Please refer to the [SMPP 3.4 specification](https://smpp.org/SMPP_v3_4_Issue1_2.pdf). for more detail).

<Image align="center" alt={2400} border={false} caption="Fig.2 Matching using _user_message_reference_ TLV" title="Fig.2 - Matching Using Source and Destination Address  @2x.jpg" src="https://files.readme.io/1d4b265ab2a6600828fa4d9cba99c27eed938205a79f1611f4ef4c29c8af7f0f-SMPP_02.jpg" width="100%" />

<br />