Connect your ERP or system to SMSDESK via SMPP protocol
{host}:2775info@example.com)rqym36t4)264811234567)
The SMSDESK SMPP Server allows external systems to connect and send/receive SMS messages using the industry-standard SMPP v3.4 protocol. This is ideal for:
Submit SMS messages via SUBMIT_SM PDU
Receive incoming SMS via DELIVER_SM PDU
Optional delivery report support
Username/password authentication
| Protocol Version | SMPP v3.4 |
| Server Address | {host} (your SMSDESK deployment domain) |
| Port | 2775 (standard SMPP port) |
| Supported Bind Types | TRANSMITTER, RECEIVER, TRANSCEIVER |
| Max Sessions | 100 concurrent sessions (configurable) |
| Session Timeout | 300 seconds (5 minutes) |
| Destination TON | 1 (International) |
| Destination NPI | 1 (ISDN/Telephone) |
| Source TON | 0 (Unknown) or 5 (Alphanumeric) |
| Source NPI | 0 (Unknown) |
| Data Coding | 0 (Default/Latin1) or 8 (UCS2/Unicode) |
| Character Set | ISO-8859-1 (Latin1) or UCS-2 (Unicode) |
SMPP authentication uses your SMSDESK API credentials:
System ID: your-email@example.com
Password: your-api-key (first 8 characters only)
rqym••••••••).
system_idpassword0x00000000 |
ESME_ROK | Bind successful |
0x0000000E |
ESME_RINVPASWD | Invalid password |
0x0000000D |
ESME_RBINDFAIL | Bind failed (account inactive or SMPP not enabled) |
Submit an SMS message for delivery to a mobile number.
source_addr field in the PDU is
ignored. Messages are routed using your account's default channel configured in the web
portal. This ensures proper billing and routing through your assigned SMS channels.
SUBMIT_SM PDU:
service_type: ""
source_addr_ton: 0 or 5 (alphanumeric)
source_addr_npi: 0
source_addr: "Any" (ignored - default channel used)
dest_addr_ton: 1 (international)
dest_addr_npi: 1 (ISDN)
dest_addr: "264811234567" (without + prefix)
esm_class: 0
protocol_id: 0
priority_flag: 0
schedule_delivery_time: ""
validity_period: ""
registered_delivery: 0 or 1 (for delivery reports)
replace_if_present_flag: 0
data_coding: 0 (Latin1) or 8 (UCS2)
sm_default_msg_id: 0
sm_length: [message length]
short_message: "Your message text"
SUBMIT_SM_RESP PDU:
command_status: 0x00000000 (success)
message_id: "12345" (unique message ID)
Receive incoming SMS messages from mobile users.
DELIVER_SM PDU (from server):
service_type: ""
source_addr_ton: 0
source_addr_npi: 0
source_addr: "+264811234567" (sender's number)
dest_addr_ton: 0
dest_addr_npi: 0
dest_addr: "YourChannel" (your shortcode/number)
esm_class: 0
protocol_id: 0
priority_flag: 0
schedule_delivery_time: ""
validity_period: ""
registered_delivery: 0
replace_if_present_flag: 0
data_coding: 0
sm_default_msg_id: 0
sm_length: [message length]
short_message: "Incoming message text"
DELIVER_SM_RESP PDU:
command_status: 0x00000000 (success)
Keepalive mechanism to maintain connection.
ENQUIRE_LINK PDU → ENQUIRE_LINK_RESP
Gracefully close the SMPP session.
UNBIND PDU → UNBIND_RESP → Connection closed
import smpplib.client
# Connect to SMPP server
client = smpplib.client.Client('{host}', 2775)
# Bind as transceiver
# Password = first 8 characters of your API key
client.connect()
client.bind_transceiver(
system_id='your-email@example.com',
password='rqym36t4' # First 8 chars of API key
)
# Send SMS
# Note: source_addr is ignored, your default channel is used
client.send_message(
source_addr='Any', # Ignored - default channel used
destination_addr='264811234567', # No + prefix
short_message=b'Hello from SMPP!'
)
print('✓ Message sent successfully!')
# Unbind and disconnect
client.unbind()
client.disconnect()
<?php
require_once 'vendor/autoload.php';
use PhpSmpp\Transport\Socket;
use PhpSmpp\Client;
use PhpSmpp\SMPP;
// Create transport
$transport = new Socket(['sms.com.na'], 2775);
$transport->open();
// Create client
$smpp = new Client($transport);
// Bind with API key (first 8 characters)
$smpp->bindTransceiver(
'your-email@example.com',
'rqym36t4' // First 8 chars of API key
);
// Send SMS (source is ignored, default channel used)
$smpp->sendSMS(
'Any', // Ignored - default channel used
'264811234567', // No + prefix
'Hello from SMPP!',
null,
SMPP::DATA_CODING_DEFAULT
);
echo "✓ Message sent successfully!\n";
// Unbind
$smpp->close();
?>
import org.jsmpp.bean.*;
import org.jsmpp.session.SMPPSession;
public class SmppExample {
public static void main(String[] args) throws Exception {
SMPPSession session = new SMPPSession();
// Connect and bind with API key (first 8 characters)
session.connectAndBind(
"{host}",
2775,
new BindParameter(
BindType.BIND_TRX,
"your-email@example.com",
"rqym36t4", // First 8 chars of API key
"SMSDESK",
TypeOfNumber.UNKNOWN,
NumberingPlanIndicator.UNKNOWN,
null
)
);
// Send SMS (source is ignored, default channel used)
String messageId = session.submitShortMessage(
"CMT",
TypeOfNumber.UNKNOWN,
NumberingPlanIndicator.UNKNOWN,
"Any", // Ignored - default channel used
TypeOfNumber.INTERNATIONAL,
NumberingPlanIndicator.ISDN,
"264811234567", // No + prefix
new ESMClass(),
(byte) 0,
(byte) 1,
null,
null,
new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT),
(byte) 0,
new GeneralDataCoding(Alphabet.ALPHA_DEFAULT),
(byte) 0,
"Hello from SMPP!".getBytes()
);
System.out.println("✓ Message sent! ID: " + messageId);
// Unbind
session.unbindAndClose();
}
}
using JamaaTech.Smpp.Net.Client;
using JamaaTech.Smpp.Net.Lib;
class Program
{
static void Main()
{
// Create client
var client = new SmppClient();
client.Name = "SMSDESK-Client";
// Connect
client.Start();
// Bind with API key (first 8 characters)
client.Bind(
"{host}",
2775,
"your-email@example.com",
"rqym36t4" // First 8 chars of API key
);
// Send SMS (source is ignored, default channel used)
var message = new TextMessage
{
DestinationAddress = "264811234567", // No + prefix
SourceAddress = "Any", // Ignored - default channel used
Text = "Hello from SMPP!",
RegisterDeliveryNotification = false
};
client.SendMessage(message);
Console.WriteLine("✓ Message sent successfully!");
// Unbind
client.Shutdown();
}
}
The SMPP server returns standard SMPP v3.4 error codes. Common errors:
| Code | Hex | Name | Description | Action |
|---|---|---|---|---|
| 0 | 0x00000000 | ESME_ROK | Success | Continue |
| 88 | 0x00000058 | ESME_RTHROTTLED | Throttling error | Retry with delay |
| 20 | 0x00000014 | ESME_RMSGQFUL | Message queue full | Retry with delay |
| 11 | 0x0000000B | ESME_RINVDSTADR | Invalid destination | Check number format |
| 14 | 0x0000000E | ESME_RINVPASWD | Invalid password | Check API key (first 8 chars) |
| 69 | 0x00000045 | ESME_RSUBMITFAIL | Submit failed | Check message format |
// Pseudo-code for error handling
if (response.command_status == ESME_RTHROTTLED) {
// Wait and retry
sleep(1000);
retry_message();
} else if (response.command_status == ESME_RINVDSTADR) {
// Invalid number - don't retry
log_error("Invalid destination number");
mark_as_failed();
} else if (response.command_status == ESME_ROK) {
// Success
save_message_id(response.message_id);
}