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 optionSupportedNotes
submit_smYesUse this command to submit messages through SMPP.
data_smYesUse this command where applicable for message submission.
short_messageYesMessage content can be sent in the short_message field.
message_payloadYesMessage content can be sent in the message_payload field.
submit_multiNoIf the same message must be sent to multiple destinations, submit each message separately.
sar optional parametersNosar 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 typeHow to identify itWhat it means
Positive responseError code is 0 and the message reference is non-null.The submit request was accepted.
Negative responseResponse contains a RouteMobile vendor-specific error code.The submit request was rejected or failed validation.

Submit response error codes

Error codeValueDescription
ESME_ROK0x00000000No Error.
ESME_RINVMSGLEN0x00000001Message Length is invalid.
ESME_RINVCMDLEN0x00000002Command Length is invalid.
ESME_RINVCMDID0x00000003Invalid Command ID.
ESME_RINVBNDSTS0x00000004Incorrect BIND Status for given command.
ESME_RALYBND0x00000005ESME Already in Bound State.
ESME_RINVPRTFLG0x00000006Invalid Priority Flag.
ESME_RINVREGDLVFLG0x00000007Invalid Registered Delivery Flag.
ESME_RSYSERR0x00000008System Error.
ESME_RINVSRCADR0x0000000AInvalid Source Address.
ESME_RINVDSTADR0x0000000BInvalid Dest Addr.
ESME_RINVMSGID0x0000000CMessage ID is invalid.
ESME_RBINDFAIL0x0000000DBind Failed.
ESME_RINVPASWD0x0000000EInvalid Password.
ESME_RINVSYSID0x0000000FInvalid System ID.
ESME_RINVSERTYP0x00000015Invalid Service Type.
ESME_RINVESMCLASS0x00000043Invalid esm_class field data.
ESME_RSUBMITFAIL0x00000045submit_sm failed.
ESME_RINVSRCTON0x00000048Invalid Source address TON.
ESME_RINVSRCNPI0x00000049Invalid Source address NPI.
ESME_RINVDSTTON0x00000050Invalid Destination address TON.
ESME_RINVDSTNPI0x00000051Invalid Destination address NPI.
ESME_RINVSYSTYP0x00000053Invalid system_type field.
ESME_RTHROTTLED0x00000058Throttling Error. ESME has exceeded allowed message limits.
ESME_RINVEXPIRY0x00000062Invalid message validity period, also known as expiry time.
ESME_RINVOPTPARSTREAM0x000000C0Error in the optional part of the PDU Body.
ESME_ROPTPARNOTALLWD0x000000C1Optional Parameter not allowed.
ESME_RINVPARLEN0x000000C2Invalid Parameter Length.
ESME_RMISSINGOPTPARAM0x000000C3Expected Optional Parameter missing.
ESME_RINVOPTPARAMVAL0x000000C4Invalid Optional Parameter Value.
ESME_RDELIVERYFAILURE0x000000FEDelivery Failure, used for data_sm_resp.
ESME_CREDIT_ERROR0x00000401Credits are over.
ESME_SPAM_MESSAGE0x00000404Spam content.
ESME_RINVSMLEN0x00000405Message length is exceeding in short_sm, for example, for message type text max message length is 160 characters.
ESME_RINVUDHLEN0x00000406Invalid UDH length indicator. Currently, 05 and 06 are allowed with all data coding types, and 0b is allowed with data coding 245.
ESME_RINSMSEMPTY0x00000407Message body not found in either short_sm or message_payload.
ESME_RINDSTDND0x00000408Destination in DND.
ESME_RINSRCMSG0x00000409Invalid source/template.
ESME_RINSRCMSG0x00000410Source/Template long message error code.
ESME_RINSRCMSG0x00000411Duplicate Submission.
ESME_RINSRCMSG0x00000412Destination 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 encodingdata_coding valueNotes
GSM 03.380Use for GSM 03.38 encoded messages. This is the default character set.
GSM 03.38 with data_coding=11Supported, but not recommended because it is known to cause character encoding issues.
Latin 1 / ISO-8859-13Use only if explicitly instructed to send ISO-8859-1 encoded messages.
Unicode8Message content must be sent in UTF-16 Big Endian format.

Do not use data_coding=1 unless required. Use data_coding=0 for GSM 03.38 and data_coding=8 for 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 typesource_addr_ton value
Alpha-numeric5
National / Network Short Code3
International MSISDN1

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.

MethodHow it worksRequired setupLimit or behavior
Concatenated MessagesThe 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 PayloadThe 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.


Did this page help you?