Maxi SMPP Sandbox

Guide

SMPP Error Codes (command_status) Explained for Developers

The SMPP v3.4 command_status codes you will meet in practice, which ones are worth retrying, and how to make your client handle them.

Every SMPP response PDU carries a command_status field in its header. 0x00000000 (ESME_ROK) means success; anything else is an error that your client has to understand. Treating all errors the same way, for example retrying forever, is a common source of duplicate SMS and stuck queues.

Where the error appears

  • In bind_*_resp: the session was not established.
  • In submit_sm_resp: this one message was refused, the session stays open.
  • In generic_nack: the SMSC could not even parse the request.
  • In the err field of a delivery receipt: a network-specific code, not a command_status (see delivery receipts).

Common command_status values

CodeNameTypical meaningRetry?
0x01ESME_RINVMSGLENMessage length is invalidNo, fix the message
0x03ESME_RINVCMDIDCommand ID not recognisedNo
0x04ESME_RINVBNDSTSCommand not allowed in this bind state, for example submit_sm on an RX sessionNo, fix the bind type
0x05ESME_RALYBNDAlready boundNo
0x08ESME_RSYSERRSystem error on the SMSCYes, with backoff
0x0AESME_RINVSRCADRInvalid source addressNo
0x0BESME_RINVDSTADRInvalid destination addressNo
0x0DESME_RBINDFAILBind failedCheck credentials first
0x0EESME_RINVPASWDInvalid passwordNo
0x0FESME_RINVSYSIDInvalid system_idNo
0x14ESME_RMSGQFULMessage queue fullYes, slow down
0x45ESME_RSUBMITFAILsubmit_sm failedMaybe, with limits
0x58ESME_RTHROTTLEDYou are sending faster than allowedYes, reduce the rate
0xFEESME_RDELIVERYFAILUREDelivery failureDepends on your policy
0xFFESME_RUNKNOWNERRUnknown errorMaybe, with limits

The full list is in the SMPP v3.4 specification. Real providers also add their own vendor-specific values, so always log the numeric code and not only the name.

Permanent versus temporary errors

Split errors into two groups and handle them differently:

  1. Permanent (invalid address, invalid length, wrong bind state): retrying cannot succeed. Mark the message failed and surface the error.
  2. Temporary (throttled, queue full, system error): retry with exponential backoff and a maximum number of attempts.

For ESME_RTHROTTLED in particular, lower your send rate or shrink the window of outstanding requests instead of just retrying faster.

Test the handling, not just the happy path

Unit tests that mock a response cover your parser but not the real session behaviour: windowing, timeouts and reconnect logic all interact with errors. A bind with a wrong password is easy to reproduce against the sandbox, and so is a message that ends as Not Delivered or Rejected through a delivery scheme. For load behaviour, higher plans let you push volume through the sandbox and watch how your client reacts when it is throttled or its queue fills.

Want to try this against a real SMPP endpoint? Register for the sandbox and use it free for 3 days, or tell us about your scenario.

Keep reading

Ready to test your SMS traffic?

Get your SMPP sandbox in minutes and use it free for 3 days - or tell us what you are building and we will help you choose a plan.