Skip to content
This repository has been archived by the owner on Jan 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #55 from onlinecity/updated-smpp
Browse files Browse the repository at this point in the history
Updated SMPP docs with error codes
  • Loading branch information
jwldk authored Nov 30, 2020
2 parents 6afe364 + 804819d commit b2291c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ failures.
======= ====== =============================================
Group Code Description
======= ====== =============================================
HLR 0x1001 Unspecified delivery error
HLR 0x1010 Unknown subscriber
HLR 0x1011 Call barred
HLR 0x1012 Teleservice not provisioned
Expand Down Expand Up @@ -200,4 +201,6 @@ SP 0x1091 Network time-out
SP 0x1092 Operation barred - insufficient funds
SP 0x1093 Illegal mobile subscriber - blocked
SP 0x1094 Refunded by network operator
GWAPI 0x1902 Messageclass not configured
GWAPI 0x1903 Link not whitelisted
======= ====== =============================================
22 changes: 17 additions & 5 deletions docs/smpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Connection
----------
Use the following to connect. We recommend to connect to two hosts. When we do scheduled maintainence, only one host is restarted at a time. By keeping a connection to two hosts, constant connectivity can be achieved.

You can connect as a transceiver/receiver more than once. Delivery reports will be distributed evenly among your binds, each report only through one bind.

================= =================================
Host a.smpp.gatewayapi.com
Host b.smpp.gatewayapi.com
Expand Down Expand Up @@ -45,15 +47,22 @@ Delivery reports
----------------
Connect with at least one transceiver or receiver to receive delivery reports. A maximum of 25.000 unacknowledged reports will be kept for 48 hours.

The delivery report format is as follows:
The order of the delivery reports are not guaranteed, so in some cases, you may get an `ENROUTE` before a `DELIVRD`.

The delivery report format is as in the following examples:

.. code-block:: none
id:{message_id} sub:{message_sub} dlvrd:{message_dlvrd}
submit date:{message_submit_date} done date:{message_done_date}
stat:{message_stat} err:{message_err}
id:1390125333 sub:001 dlvrd:000 submit date:2011181054 done date:2011181054 stat:DELIVRD err:000 text:user_message_reference
id:1390125333 sub:001 dlvrd:000 submit date:2011181145 done date:2011181145 stat:UNDELIV err:019 text:user_message_reference
The fields `sub` and `dlvrd` can be ignored.

The `text` is the first 20 characters of the `user_message_reference` TLV if submitted with `submit_sm`. The full reference is added in the TLV as well.

The `err` field is a base 10 representation of our error codes listed in :ref:`smserror`. Since we only have three digits available we take a SMS error code like 0x107E, keep the 07E and format in base 10 to 126. If you need to convert back, simply add 0x1000 to the SMPP error code, and format as hex.

Following status types:
The `stat` field is the following status types:

* ENROUTE
* DELIVRD
Expand All @@ -74,7 +83,10 @@ DCS Encoding
===== ====================
0 IA5 / GSM7
3 Latin1 / ISO-8859-1
4 Binary
8 UCS2
24 UCS2 (flash)
240 GSM7 (flash)
===== ====================


Expand Down

0 comments on commit b2291c6

Please sign in to comment.