SMPP integration
The connection is established via our SMS gateway, which allows sending messages using the SMPP protocol versions 3.4 and 5.0.
SMPP server address: smpp.unibell.ru
Port: 5070
Connections in BOUND_TRX mode are supported.
Multiple connections
The server allows only one active connection per login to ensure correct delivery of statuses. Therefore, when a new connection is established, any previously established session with the same login is automatically terminated. At the same time, multiple connections with different logins linked to the same personal account and the same balance can operate simultaneously.
Sending an SMS message
To send an SMS message, use the SUBMIT_SM command according to the specification.
The following encodings are supported:
- 7-bit GSM for Latin text with support for European characters (
data_coding=0); - 8-bit ISO-8859-1 (ASCII) for Latin text or binary data (
data_coding=1); - UCS2 (UCS-2BE or UTF-16BE) for national alphabets (
data_coding=8).
For an SMS message, the esm_class field in SUBMIT_SM must be set to 0.
The transmission rate must not exceed 100 messages per second. If this limit is exceeded, a THROTTLING error will be returned in SUBMIT_SM_RESP. For higher sending rates, multiple incoming connections with different logins should be established.
When automatically returning the status in the DELIVER_SM command, standard TLV parameters are transmitted:
| Parameter | Description |
|---|---|
| receipted_message_id | SMS message identifier |
| message_state | SMS message status (see Message state for details) |
| network_error_code | Error code (see Error codes in status for details) |
Sending an HLR request
To send an HLR request, use the SUBMIT_SM command. The values of the sourceAddr and shortMessage fields must be set to HLR.
The request result is returned in a standard DELIVER_SM, which can be received over the SMPP connection. Standard TLV parameters are transmitted:
| Parameter | Description |
|---|---|
| receipted_message_id | HLR request identifier |
| message_state | HLR request status (see Message state for details) |
| network_error_code | Error code (see Error codes in status for details) |
Statuses in `message_state`
| Value | Message state | Description |
|---|---|---|
| 1 | EVROUTE | Message is in delivery state (in transit) |
| 2 | DELIVERED | Message delivered to the recipient |
| 3 | EXPIRED | Message validity period expired; cannot be delivered |
| 4 | DELETED | Message was deleted |
| 5 | UNDELIVERABLE | Message cannot be delivered |
| 6 | ACCEPTED | Message accepted (e.g., manually read on behalf of the subscriber by support) |
| 7 | UNKNOWN | Message is in an invalid/unknown state |
| 8 | REJECTED | Message rejected |
Error codes in the status
Possible error codes in the status of SMS messages or HLR requests (networkErrCode).
| Code | Name | Description |
|---|---|---|
| 0 | No error | Subscriber exists and is available |
| 1 | Subscriber does not exist | The specified phone number does not exist |
| 6 | Subscriber not in network | Subscriber’s phone is switched off or out of network coverage |
| 11 | No SMS service | Subscriber cannot receive SMS. For example, the service is not activated, the subscriber is roaming in a network without SMS support, or the subscriber’s operator does not have SMS exchange with the current roaming operator. This can also occur with landline numbers that do not receive messages |
| 12 | Subscriber phone error | Message cannot be delivered due to an error in the phone or SIM card |
| 13 | Subscriber blocked | Occurs if the subscriber has zero or negative balance, is roaming, or has been blocked by the operator for non-payment or voluntarily. This error can also occur due to SIM card damage or incorrect PIN/PUK entry |
| 21 | Service not supported | Subscriber’s device does not support this service |