ES

Sending SMS using the SMPP protocol

The open protocol SMPP allows technicians and companies to integrate their applications with the SMS messaging platform of LabsMobile using a widely adopted standard in telecommunications. This protocol is used for the exchange of SMS messages between short message service centers (SMSC) and external sending applications.

The functionalities through the SMPP protocol are:

This documentation explains in detail the integration and automation process of these functionalities.

To start an integration with sending via the SMPP protocol, the following requirements are essential:

  • A LabsMobile account associated with a username (registration email). Create an account here.
  • It is necessary to activate the SMPP service.
  • The account must have available balance to allow message sending.

To take into account

This documentation corresponds to SMPP protocol version 3.4.

We recommend the use of our API http/POST.


Activation of the SMPP Service

To activate this service, you must complete the following SMPP service registration form with the following information:

  • Username associated with the account.
  • If the account and first purchase have been validated.
  • IP address of the client that will make the SMPP connections.
  • Estimated monthly volume of messages.

SMPP connection credentials will be created within a maximum of 72 hours and communicated via email.

Request SMPP service registration

Parameters of connection

The following data is necessary to establish an SMPP connection and allow the sending of SMS messages. Below are the values and the function of each of the required parameters.

Values of connection
system_idUser identifier assigned for SMPP authenticationB000123456
passwordPassword associated with the system_idKz234d&5
hostIP or domain of the SMPP serversmpp.labsmobile.com
portPort TCP to establish the connection2775
bind_typeDefines what operations the client can perform.bind_transceiver

Recommendation Make sure that the provided IP is correctly configured to establish outgoing connections to the SMPP server. In addition, we recommend using a static IP and a dedicated server to ensure the stability and security of the connection.

Recommendation We recommend activating Automatic Top-ups so that there are always available credits in the account and the SMS sending service is not interrupted.


PDU SMPP compatible

The SMPP server supports the following PDU, fundamental for establishing and maintaining communication between the client and the server. Below are detailed their main functions and how they intervene in the transmission and reception of SMS messages.

  • Expand all

    Types of PDU

    The SMPP server supports the following PDU

The PDUs can return the following statuses:

PDU status responses
ESME_ROKIndicates that the operation was accepted correctly.
ESME_RUNKNOWNERRGeneric error code indicating an unknown error on the SMPP server or lack of balance in the account.

Sending SMS (submit_sm)

The submit_sm command is the main method for sending SMS messages via SMPP. This section details the key parameters that must be included in each request to ensure the correct sending of the message.

  • Expand all

    PARAMETERS

    The parameters or data are sent when an SMPP connection is made. Below are the values and functionality of all the parameters.

Example of format
{
  "cmdName":"submit_sm",
  "params":{
    "source_addr_ton":3,
    "source_addr_npi":0
    "source_addr":"LABSMOBILE",
    "dest_addr_ton":1
    "dest_addr_npi":1
    "destination_addr":"573124868812",
    "short_message":"Hello world!",
    "registered_delivery":1,
    "data_coding":1,
    "sm_length":8
    },
  "seqNr":2,
  "cmdStatus":"ESME_ROK"
}
                      

Important The code ESME_ROK indicates that the request was accepted, but does not imply that the message was delivered to the user's device. A DLR or PDU object should be awaited to know the final delivery status.

Recommendation In case of receiving ESME_RUNKNOWNERR, check that your account has available balance to make shipments. Also, make sure that the destination phone number and the message content are specified correctly.


Delivery confirmations (deliver_sm)

The delivery statuses are included in the short_message field within the deliver_sm PDU, which contains information about the result of sending each message.

Typical format: id:XXXXXXXXXX submit date:YYMMDDHHMM done date:YYMMDDHHMM stat:ZZZZZZZ err:YYY

  • id: Identifier of the sent message.
  • submit date: Date and time of sending in YYMMDDHHMM format.
  • done date: Date and time when the delivery attempt was completed in YYMMDDHHMM format.
  • stat: Final status of the message (for example: DELIVRD, UNDELIV, etc.).
  • err: Numeric error code, present if the message was not delivered correctly.

Example: short_message: "id:681ca29a4caec submit date:2505081224 done date:2505081225 stat:DELIVRD err:000"

Below is a description of each of the delivery statuses:

State values
DELIVRDIndicates that the message was successfully delivered to the recipient's device.
UNDELIVNot possible to deliver the message, usually because the number is incorrect.
REJECTDMessage rejected by some operator policy or by the mobile device.