Skip to content
OmniChannels.ai

APIs and SMPP

How do I connect to an SMS provider over SMPP?

Updated

Short answer

To connect to an SMS provider over SMPP, request a bind and register your source IP addresses, then open a TLS connection to the host and port provided. Send bind_transceiver with your system_id and password, submit messages with submit_sm, acknowledge every deliver_sm receipt, and send enquire_link regularly to keep the session alive.

What the provider gives you

SMPP access is usually provisioned by the provider, not self-served. Tell it your destination countries, sender IDs, expected peak volume and the public IP addresses you will connect from.

ItemWhat it is
Host and TLS portWhere your client connects
system_id and passwordBind credentials; store them as secrets
system_typeUsually empty unless the provider sets a value
Binds and throughputHow many sessions you may open and the agreed rate per bind
IP allow-listOnly registered source IPs can bind

Open and run the session

A transceiver bind sends and receives on one session. Use separate transmitter and receiver binds only if your client requires them.

  1. Open a TLS connection to the host and port you were given.
  2. Send bind_transceiver with system_id and password, and wait for bind_transceiver_resp with command_status 0.
  3. Submit each message with submit_sm and store the message_id from submit_sm_resp.
  4. Receive delivery receipts as deliver_sm and answer every one with deliver_sm_resp.
  5. Send enquire_link while idle and reconnect with backoff if responses stop.
  6. Close with unbind and wait for unbind_resp.

Which submit_sm fields cause most rejections?

  • source_addr_ton and source_addr_npi: 5 and 0 for an alphanumeric sender ID, 1 and 1 for an international number.
  • destination_addr: country code plus number, with no plus sign or leading zeros.
  • data_coding: 0 for the GSM-7 default alphabet, 8 for UCS-2 (Arabic, emoji and other scripts).
  • registered_delivery: 1 to request a delivery receipt.
  • short_message holds up to 254 octets; for longer content use the message_payload TLV with sm_length 0, never both.

Common bind and submit errors

OmniChannels.ai provisions SMPP 3.4 binds over TLS per account, with source IPs allow-listed, and resellers and wholesale partners can have dedicated binds.

command_statusLikely causeFix
ESME_RBINDFAILWrong system_id or IP not allow-listedCheck credentials and source IP
ESME_RINVPASWDWrong passwordCheck credentials
ESME_RINVSRCADRSender ID or its TON/NPI is invalidFix the sender and TON/NPI
ESME_RTHROTTLEDSending above the agreed rateSlow down and retry with backoff

Official sources