SMPP (Short Message Peer-to-Peer) is a telecommunications protocol for exchanging SMS messages between SMS service centers and external applications.
The Weble universal gateway SMPP driver has two modes, and each works in one direction only:
Use SMPP on a trusted network or through a VPN, and do not expose the server port to the Internet: restrict access to it with a firewall.
2775). To send the received messages as SMS, an SMS gateway already working on the same device.SMPP Server — configure Port (default: 2775), Accounts (System ID / password pairs), and optionally Forward SMS to (select another gateway to forward received messages).SNPP Client — configure Host, Port, System ID, and Password to connect to an external SMPP server.
| Label | JSON Key | Description |
|---|---|---|
| Name | name | A descriptive name. |
| Cluster ID | cluster | Cluster identifier. |
| Description | description | Optional description. |
| Type | type | server (shown as SMPP Server) or client (shown as SNPP Client). Default: server. |
| Host | host | Client only. Host name or IP address of the SMPP server. |
| Port | port | TCP port. Server: port the gateway listens on. Client: port of the remote server. Default: 2775. |
| System ID | system_id | Client only. Login sent to the SMPP server. |
| Password | password | Client only. Password sent with the System ID. |
| Forward SMS to | forwardTo | Server only. Name of an SMS or Internal gateway that receives every incoming message. Empty = do not forward (default). |
| Message decoding | encoding | ascii, utf8 (default), utf16le, ucs2 or latin1. Server: character set used to decode the received messages. Client: also given to the SMPP library as its default encoding. |
| Accounts | accounts | Server only. Allowed clients, each with a System ID and a Password. A client is accepted only if both match. With an empty list every connection is rejected. |
Server
{
"type": "server",
"port": 2775,
"encoding": "utf8",
"forwardTo": "SMS gateway",
"accounts": [ { "system_id": "scada", "password": "secret" } ]
}
Client
{
"type": "client",
"host": "smpp.provider.example",
"port": 2775,
"system_id": "myaccount",
"password": "mypassword",
"encoding": "utf8"
}
All addresses start with %smpp:. They are created by the driver; you normally do not insert them by hand (address import is disabled).
Write the message to %smpp:<phone number>:
gateways.writeValue('%smpp:+41791234567', 'Pump 3 stopped')
submit_sm request and must contain short_message, for example { "short_message": "Pump 3 stopped" }.+, written without spaces (for example +41791234567). A leading 00 is accepted instead of +; the number is passed to the SMPP server as written. Other numbers are refused with invalid phone number.Bad command status (<code>) when the SMPP server refuses the message, and with not connected while the gateway is not bound to the server.In server mode the gateway accepts SMPP clients and stores what they submit:
| Address | Content |
|---|---|
%smpp:lastPDUMessage |
Text of the last message received. |
%smpp:lastPDUMessageObject |
The last PDU received from a client, as an object (all SMPP fields). |
%smpp:<phone number> |
The complete last request addressed to this number. |
%smpp:<phone number>/PDUMessage |
Text of the last message addressed to this number. |
If Forward SMS to is set, each message is also written to the selected gateway: to %sms:<phone number> of an SMS gateway, which then sends the SMS, or to $<phone number> of an Internal gateway. This turns the gateway into an SMPP-to-SMS bridge for third-party systems.
A server-mode gateway cannot send: writing to its addresses returns not implemented.
| Property | Value |
|---|---|
| Readable | No: the values are set by the driver (last message sent or received). |
| Writable | Client mode: %smpp:<phone number> (sends an SMS). Server mode: no. |
| Created automatically | Yes: on the first write (client) or the first message received for a number (server). |
| Routable | Yes |
| Loggable | Yes |
Log and Store value work the same way for every driver: see Log and Store value policies.
The driver needs the SMPP licence (or a full licence). Without it the gateway does not start and its log shows
missing license.
SMPP Server, Port 2775, one account (for example System ID nursecall) and Forward SMS to set to the SMS gateway.2775 and the same System ID and password.%smpp:lastPDUMessage and sent as an SMS to its destination number.Create an SMPP gateway with Type SNPP Client and the account of the provider. Route an alarm to %smpp:+41791234567 with a routing function that returns the text of the message. For the alarm configuration itself, see Alarms and notifications.
| Symptom | Cause | What to do |
|---|---|---|
Server: a client cannot bind; the log shows SMPP authentification failed for <system id> |
The System ID or the password is not in Accounts. | Add the account, or correct it on the client. |
Server: every bind is refused; the log shows no accounts configured |
Accounts is empty. | Add at least one account. |
Server: the gateway restarts; the log shows server error on port <port> |
The port is already used on the device, or cannot be opened. | Choose another Port. |
Client: the gateway stays red; the log shows Failed to connect <host> or client error connecting to <host> |
Wrong Host or Port, the provider refused the System ID or password, or the network blocks the port. | Check the account with the provider and the network settings of the device. |
Write error not connected |
The client is not bound to the server. | Wait for the reconnection; check the log. |
Write error invalid phone number <number> |
The number is not written in the expected form. | Write it in international form, without spaces (section 3.1). |
Write error Bad command status (<code>) |
The SMPP server refused the message. | The code is defined by the SMPP protocol; ask the provider. |
Write error not implemented |
Writing to a server-mode gateway. | Send through a client-mode gateway or an SMS gateway. |
| Messages are not forwarded | Forward SMS to is empty, or the target gateway is not an SMS or Internal gateway. | Select the target gateway again. |
The log shows missing license |
No SMPP licence. | Contact support@weble.ch. |
To read the driver log, open the menu ☰ of the gateway and choose Logs (see Logs of a gateway).