SMS Retry Error Handling with UCP/EMI and CIMD

Posted by on Oct 2, 2008 in Support Blog

Topic Keywords: , ,

There’s a great post that discusses how NowSMS handles message retries in SMPP environments at the following link: http://www.nowsms.com/smpp-error-code-handling-in-nowsms

However, to date, there hasn’t been anything written that goes into as much detail regarding how NowSMS handles message retries in UCP/EMI or CIMD2 environments.

The short answer is that, by default, if NowSMS receives an error response from the SMSC when submitting a message in a UCP/EMI or CIMD2 environment, NowSMS will retry sending the message up to RetryMaxAttempts times (default=20).

The default behaviour for the delayed retry schedule works like this:

After the first error, a retry can be attempted immediately (but first NowSMS will try other pending messages in the outbound queue).

After the second error, NowSMS will wait 30 seconds before allowing the message to be retried.

After the third error, NowSMS will wait 60 seconds before allowing the message to be retried.

For each successive error, NowSMS waits an additional 30 seconds before allowing a retry. After 20 errors, the message will be considered as failed.

The following parameters can be applied to the [SMSGW] section of the SMSGW.INI file to provide additional control for the retry schedule:

RetryDelay=
RetryDelayMultiplier=
RetryDelayAfterAttempts=
RetryDelayMax=
RetryMaxAttempts=

The above parameters control retry behaviour for when NowSMS is submitting messages to an SMSC and an error occurs.

RetryDelay=#### specifies a number of seconds to wait to retry sending after an error condition, the default value is 30.

RetryDelayMultiplier=### specifies a multiplier to be applied for successive send failures, the default value is 1. For each failed attempt, the retry delay will be the product of RetryDelay*RetryDelayMultiplier*#FailedAttempts. To use a fixed retry delay of RetryDelay, specify RetryDelayMultiplier=0.

RetryDelayAfterAttempts=### specifies that the retry delay should only be applied after ### failed attempts, the default value is 2. NowSMS will immediately retry a failed message send until it has made RetryDelayAfterAttempts, after which it will apply a retry delay.

RetryDelayMax=### specifies the maximum number of seconds that NowSMS will allow to elapse between retries, putting a limit on the multiplier.

RetryMaxAttempts=### specifies the maximum number of retries that NowSMS will attempt before a message is rejected, the default value is 20.

That is all well and good, but in many situations, especially when you might be sending premium rate SMS to pre-pay users, your NowSMS message queues may become slow with numerous retry attempts sending to users with depleted credit balances.

Our standard recommendation has been to reduce the RetryMaxAttempts setting to a lower value. NowSMS only counts a message retry attempt when it encounters an error during a submit message operation. If instead, there is a situation where an SMSC connection is down, this does not count as a message retry attempt. (It does count as a retry attempt if the SMSC connection drops while NowSMS is attempting to submit a message.)

If you have a situation where you want NowSMS to consider certain error SMSC error codes to be a permanent error, with no retry attempt, it is possible to add these error codes to an SMSGW.INI file setting.

For SMPP connections, refer to the previous blog entry at http://www.nowsms.com/smpp-error-code-handling-in-nowsms.

For UCP/EMI and CIMD connections, the following configuration settings were added in NowSMS v2008.10.01 and later. (Until the next major release of NowSMS, an interim update to this version can be downloaded from http://www.nowsms.com/download/nowsmsupdate.zip.)

For UCP/EMI SMSC connections, under the [SMSGW] section header, add UCPRejectErrorCodes=x,y,z

This “x,y,z” value can be a comma-delimited list of decimal error codes that should be treated as permanent errors. Note that if you are experiencing excessive retry problems, you can see what error your provider is returning by consulting the SMSOUT-yyyymmdd.LOG file.

It is also possible to specify UCPRejectErrorCodes=All to cause any error codes returned by your provider as a permanent message delivery failure.

For CIMD2 SMSC connections, under the [SMSGW] section header, add CIMDRejectErrorCodes=x,y,z

This “x,y,z” value can be a comma-delimited list of decimal error codes that should be treated as permanent errors. Note that if you are experiencing excessive retry problems, you can see what error your provider is returning by consulting the SMSOUT-yyyymmdd.LOG file.

It is also possible to specify CIMDRejectErrorCodes=All to cause any error codes returned by your provider as a permanent message delivery failure.

For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...