Sending a Message
To send a message with SMPP, you’ll use the submit_sm
operation, which will submit an SMS to the SMSC to be send to the destination. Note that Vibes only supports messages up to 900 characters. Messages over 900 characters may be truncated.
The
submit_sm
protocol does not support the transaction message mode.
TON/NPI & Other Settings
TON and NPI values may change from aggregator to aggregator, so we’ve created the below table to help you properly set the TON and NPI values on your message sends.
Source TON | 0 - for messages sent via Shortcode or Longcode |
Source NPI | Always 0 |
Destination TON | Always 0 - Non-US/Canada MDNs must be sent in E.164 format. |
Destination NPI | Always 0 |
System Type | Not used - Leave blank. |
Service Type | Not used - Leave blank. |
Validity Period | Not used - Leave blank. |
For more on the required message settings, please see Encoding & Message Settings.
Receiving a message
The deliver_sm
operation is sent by the SMSC to your ESME, which your ESME can then route for delivery, if applicable.
In addition to sending messages, the SMSC uses the deliver_sm
operation to transfer the following types of short messages to the ESME:
- SMSC Delivery Receipt: A delivery receipt relating to a message which had been previously submitted with the
submit_sm
operation. This will only be sent if the ESME had requested a delivery receipt via theregistered_delivery
parameter. The delivery receipt data relating to the original short message will be included in theshort_message
field of thedeliver_sm
. - SME Delivery Acknowledgement: The user data of the SME delivery acknowledgement is included in the
short_message
field of thedeliver_sm
. - SME Manual/User Acknowledgement: The user data of the SME delivery acknowledgement is included in the
short_message
field of thedeliver_sm
. - Intermediate Notification: The user data of the SME delivery acknowledgement is included in the
short_message
field of thedeliver_sm
.
Parameters
Both the submit_sm
and deliver_sm
operations have the same parameters, which means that in some cases, some fields may only be used for one. Below you’ll find a table with definitions for both incoming and outgoing messages. For ease of use, we have broken the fields into three categories: header parameters, mandatory parameters, and optional parameters.
Header Parameters
Field Name | Size Octets | Type | Sending | Receiving |
---|---|---|---|---|
command_length | 4 | Integer | Set to overall length of PDU. | Set to overall length of PDU. |
command_id | 4 | Integer | submit_sm | deliver_sm |
command_status | 4 | Integer | Not used. Set to NULL . | Not used. Set to NULL . |
sequence_number | 4 | Integer | Set to a unique sequence number. The associated submit_sm_resp PDU will include this number. | Set to a unique sequence number. The associated submit_sm_resp PDU will include this number. |
Mandatory Parameters
Field Name | Size Octets | Type | Sending | Receiving |
---|---|---|---|---|
| Varies. Max of 6 | C-Octet string | Used to indicate the SMS Application service associated with the message. Specifying the - avail of enhanced messaging services such as “replace by service” type
| The |
| 1 | Integer | Type of number for source address. | Type of number for source address. |
| 1 | Integer | Numbering plan indicator for source address. | Numbering plan indicator for source address. |
| Varies. Max of 21. | C-Octet String | Address of SME which originates this message. | Address of SME which originates this message. |
| 1 | Integer | Type of Number (TON) for destination. | Type of Number (TON) for destination. |
| 1 | Integer | Numbering Plan Indicator (NPI) for destination. | Numbering Plan Indicator (NPI) for destination. |
| Varies. Max 21. | C-octet string | Destination address of this short message. For mobile terminated messages, this is the directory number of the recipient MS. | Destination address of destination SME. |
| 1 | Integer | Indicates message mode and message type. | Indicates Message Type and enhanced network services |
| 1 | Integer | Protocol identifier. Network-specific field. | Protocol identifier. Network-specific field. |
| 1 | Integer | Designates the priority level of the message. | Designates the priority level of the message. |
| 1 or 17 | C-Octet String | The short message is to be scheduled by the SMSC for delivery. Set to | This field is unused for |
| 1 or 17 | C-Octet String | The validity period of this message. Set to | This field is unused for |
| 1 | Integer | Indicator to signify if an SMSC delivery receipt or acknowledgement will be sent in response to this operation. | Indicates in an ESME acknowledgement is required. |
| 1 | Integer | Flag indicating if submitted message should replace an existing message. | This field is unused for |
| 1 | Integer | Defines the encoding scheme of the short message user data. Please note that Vibes uses SMPP 3.4 and the default encoding is ASCII/IA5.. See our encoding article for more information. | Defines the encoding scheme of the short message user data. Please note that Vibes uses SMPP 3.4 and the default encoding is ASCII/IA5.. See our encoding article for more information. |
| 1 | Integer | Indicates the short message to send from a list of predefined (‘canned’) short messages stored on the SMSC. If not using an SMSC canned message, set to | This field is unused for |
| 1 | Integer | Length in octets of the | Length in octets of the |
| Varies. 0 to 254. | Octet string | Up to 254 octets of short message user data. The exact physical limit for Applications which need to send messages longer than 254 octets should use the
| Up to 254 octets of short message user data. The exact physical limit for Applications which need to send messages longer than 254 octets should use the
|
Optional Parameters
Parameter Name | Type | Sending | Receiving |
---|---|---|---|
| TLV | ESME-assigned message and reference number. | A reference assigned by the originating SME to the message. |
| TLV | Indicates the application port number associated with the source address of the message. This parameter should be present for WAP applications. | Indicates the application port number associated with the source address of the message. This parameter should be present for WAP applications. |
| TLV | The subcomponent in the destination device which created the user data. | N/A |
| TLV | Indicates the application port number associated with the destination address of the message. This parameter should be present for WAP applications. | Indicates the application port number associated with the destination address of the message. This parameter should be present for WAP applications. |
| TLV | The subcomponent in the destination device for which user data is intended. | N/A |
| TLV | The reference number for a particular concatenated short message. | The reference number for a particular concatenated short message. |
| TLV | Indicates the total number of short messages within the concatenated short message. | Indicates the total number of short messages within the concatenated short message. |
| TLV | Indicates that there are more messages to follow for the destination address. | N/A |
| TLV | Defines the type of payload (e.g. WDP, WCMP, etc.) | Defines the type of payload (e.g. WDP, WCMP, etc.) |
| TLV | Contains the extended short message user data. Maximum 900 characters with encoding. See Optional Vibes TLVs for more information.
The | Contains the extended short message user data. Maximum 900 characters with encoding. See Optional Vibes TLVs for more information.
The |
| TLV | Indicates the level of privacy associated with the message. | Indicates the level of privacy associated with the message. |
| TLV | A callback number associated with the short message. This parameter can be included a number of times for multiple callback addresses. | A callback number associated with the short message. This parameter can be included a number of times for multiple callback addresses. |
| TLV | Defines the callback number presentation and screening. If this parameter is present and there are multiple instances of the | N/A |
| TLV | Associates a displayable alphanumeric tag with the callback number. If this parameter is present and there are multiple instances of the | N/A |
| TLV | The subaddress of the message originator. | The subaddress of the message originator. |
| TLV | The subaddress of the message destination. | The subaddress of the message destination. |
| TLV | A user response code. The actual response codes are implementation specific. | A user response code. The actual response codes are SMS application specific. |
| TLV | Provides the receiving MS with a display time associated with the message. | N/A |
| TLV | Indicates the alerting mechanism when the message is received by an MS. | N/A |
| TLV | Indicates validity information for this message to the recipient MS. | N/A |
| TLV | This parameter controls the indication and specifies the message type (of the message associated with the MWI) at the mobile station. | N/A |
| TLV | Indicates the number of messages stored in a mailbox | N/A |
| TLV | Request an MS alert signal be invoked on message delivery. | N/A |
| TLV | Indicates the language of an alphanumeric text message. | Indicates the language of an alphanumeric text message. |
| TLV | The MS user’s reply method to an SMS delivery message received from the network is indicated and controlled by this parameter. | N/A |
| TLV | Session control information for Interactive Teleservice. | Session control information for Interactive Teleservice. |
| TLV | This parameter is used to identify the required USSD Service type when interfacing to a USSD system. | N/A |
| TLV | N/A | Network Error Code. May be present for Intermediate Notifications and SMSC Delivery Receipts |
| TLV | N/A | Message State. Should be present for SMSC Delivery Receipts and Intermediate Notifications. |
| TLV | N/A | SMSC message ID of receipted message Should be present for SMSC Delivery Receipts and Intermediate Notifications. |