Submitting Messages
Submit SMPP messages through the RouteMobile Messaging Platform and understand how submit responses, encoding, originators, and long messages are handled.
Submission types
Messages can be submitted using either submit_sm or data_sm. Message content can be sent in either the short_message field or the message_payload field.
The message length must not exceed the byte limit for the destination network. For example, GSM networks commonly use a 140-byte message limit.
submit_sm
Use this command to submit messages through SMPP.
data_sm
Use this command where applicable for message submission.
short_message
Send message content in the short_message field.
message_payload
Send message content in the message_payload field.
Supported submission options
| Submission option | Supported | Notes |
|---|---|---|
submit_sm | Yes | Use this command to submit messages through SMPP. |
data_sm | Yes | Use this command where applicable for message submission. |
short_message | Yes | Message content can be sent in the short_message field. |
message_payload | Yes | Message content can be sent in the message_payload field. |
submit_multi | No | If the same message must be sent to multiple destinations, submit each message separately. |
sar optional parameters | No | sar optional parameters are not supported. |
Concatenated messages are supported using the User Data Header (UDH). The UDH is included in the message size byte limit.

Submit responses
A submit response tells you whether the message submission was accepted or rejected.
| Response type | How to identify it | What it means |
|---|---|---|
| Positive response | Error code is 0 and the message reference is non-null. | The submit request was accepted. |
| Negative response | Response contains a RouteMobile vendor-specific error code. | The submit request was rejected or failed validation. |
Submit response error codes
| Error code | Value | Description |
|---|---|---|
ESME_ROK | 0x00000000 | No Error. |
ESME_RINVMSGLEN | 0x00000001 | Message Length is invalid. |
ESME_RINVCMDLEN | 0x00000002 | Command Length is invalid. |
ESME_RINVCMDID | 0x00000003 | Invalid Command ID. |
ESME_RINVBNDSTS | 0x00000004 | Incorrect BIND Status for given command. |
ESME_RALYBND | 0x00000005 | ESME Already in Bound State. |
ESME_RINVPRTFLG | 0x00000006 | Invalid Priority Flag. |
ESME_RINVREGDLVFLG | 0x00000007 | Invalid Registered Delivery Flag. |
ESME_RSYSERR | 0x00000008 | System Error. |
ESME_RINVSRCADR | 0x0000000A | Invalid Source Address. |
ESME_RINVDSTADR | 0x0000000B | Invalid Dest Addr. |
ESME_RINVMSGID | 0x0000000C | Message ID is invalid. |
ESME_RBINDFAIL | 0x0000000D | Bind Failed. |
ESME_RINVPASWD | 0x0000000E | Invalid Password. |
ESME_RINVSYSID | 0x0000000F | Invalid System ID. |
ESME_RINVSERTYP | 0x00000015 | Invalid Service Type. |
ESME_RINVESMCLASS | 0x00000043 | Invalid esm_class field data. |
ESME_RSUBMITFAIL | 0x00000045 | submit_sm failed. |
ESME_RINVSRCTON | 0x00000048 | Invalid Source address TON. |
ESME_RINVSRCNPI | 0x00000049 | Invalid Source address NPI. |
ESME_RINVDSTTON | 0x00000050 | Invalid Destination address TON. |
ESME_RINVDSTNPI | 0x00000051 | Invalid Destination address NPI. |
ESME_RINVSYSTYP | 0x00000053 | Invalid system_type field. |
ESME_RTHROTTLED | 0x00000058 | Throttling Error. ESME has exceeded allowed message limits. |
ESME_RINVEXPIRY | 0x00000062 | Invalid message validity period, also known as expiry time. |
ESME_RINVOPTPARSTREAM | 0x000000C0 | Error in the optional part of the PDU Body. |
ESME_ROPTPARNOTALLWD | 0x000000C1 | Optional Parameter not allowed. |
ESME_RINVPARLEN | 0x000000C2 | Invalid Parameter Length. |
ESME_RMISSINGOPTPARAM | 0x000000C3 | Expected Optional Parameter missing. |
ESME_RINVOPTPARAMVAL | 0x000000C4 | Invalid Optional Parameter Value. |
ESME_RDELIVERYFAILURE | 0x000000FE | Delivery Failure, used for data_sm_resp. |
ESME_CREDIT_ERROR | 0x00000401 | Credits are over. |
ESME_SPAM_MESSAGE | 0x00000404 | Spam content. |
ESME_RINVSMLEN | 0x00000405 | Message length is exceeding in short_sm, for example, for message type text max message length is 160 characters. |
ESME_RINVUDHLEN | 0x00000406 | Invalid UDH length indicator. Currently, 05 and 06 are allowed with all data coding types, and 0b is allowed with data coding 245. |
ESME_RINSMSEMPTY | 0x00000407 | Message body not found in either short_sm or message_payload. |
ESME_RINDSTDND | 0x00000408 | Destination in DND. |
ESME_RINSRCMSG | 0x00000409 | Invalid source/template. |
ESME_RINSRCMSG | 0x00000410 | Source/Template long message error code. |
ESME_RINSRCMSG | 0x00000411 | Duplicate Submission. |
ESME_RINSRCMSG | 0x00000412 | Destination Barred/Source Barred. |
Character sets, class, and data coding
The RouteMobile Messaging Platform supports GSM 03.38 encoding and Latin 1 (ISO-8859-1) encoding. The default character set is GSM 03.38.
| Message type or encoding | data_coding value | Notes |
|---|---|---|
| GSM 03.38 | 0 | Use for GSM 03.38 encoded messages. This is the default character set. |
GSM 03.38 with data_coding=1 | 1 | Supported, but not recommended because it is known to cause character encoding issues. |
| Latin 1 / ISO-8859-1 | 3 | Use only if explicitly instructed to send ISO-8859-1 encoded messages. |
| Unicode | 8 | Message content must be sent in UTF-16 Big Endian format. |
Do not use
data_coding=1unless required. Usedata_coding=0for GSM 03.38 anddata_coding=8for Unicode messages.
Originators and destination numbers
The default originator type is a full International MSISDN. Alphanumeric or network short code originators can be sent by using the following source_addr_ton values.
| Originator type | source_addr_ton value |
|---|---|
| Alpha-numeric | 5 |
| National / Network Short Code | 3 |
| International MSISDN | 1 |
Destination address types are not supported. They can be set to any value, but they are always interpreted as 1.
Send all destination numbers in international format without the leading
00.
Long messages
Long messages exceed the normal short message length limit: 160 characters for text and 70 characters for Unicode.
You can send long messages using either concatenated messages or message_payload.
| Method | How it works | Required setup | Limit or behavior |
|---|---|---|---|
| Concatenated Messages | The long message is split into multiple short messages and joined on the mobile device if supported. | Include the UDH in the short_message field and set esm_class in the submit_sm PDU to 0x43 for Store and Forward with UDHI. | If the mobile device does not support long messages, each message part may be displayed separately. |
| Message Payload | The message is sent using the optional message_payload field of the submit_sm PDU. | Set interface_version to 0x34. | Supports messages up to 64K octets. If interface_version is not set to 0x34, this field is not available. |
Updated 19 days ago