Short Message SMPP interface development outline

  SMPP is a universal messaging interface protocol, the paper extracted to achieve the basic functions of SMS content. 

  Foreword 

  Short Message Centre (SMSC) can be extended with a variety of short news entities (ESME) with the work, so as to provide mobile users a variety of functions. 

  Symbols and abbreviations 

  ESME Agent 

  External Short Message Entity Agent expansion Short Message entities agent 

ESME

  External Short Message Entity Short Message entity expansion 

PLMN

  Public Land Mobile Network Public Land Mobile Network 

SMSC

  Short Message Service Center Short Message Center 

SMPP

  Short Message Peer to Peer short message point-to-point agreement 

SS

  Secretary-Secretary System 

AS

  Auto-Auto System 

  SMSC that Short Message Center. 

  ESME in the norms refers to the norms stipulated by the agreement with the SMSC communications, and the specific request of the functions of the short message service entities. 

  SS artificial means for access and then accepted the request of the short message service system. 

  AS refers to the use of an interactive voice technology admissibility short message service request system. 

  SS (Desk Clerk) and AS (Auto-) is a typical ESME. 

  SMSC and ESME between the transmission network can be based on the X.25 or TCP / IP. 

  ESME SMSC to the news 

  ESME SMSC to the news, such as: submit, query, short messages and delete request ESME TRANSMITTER type must be connected to the SMSC. 

  Figure 4 describes a typical response to the request of TRANSMITTER types of examples.    TRANSMITTER types of ESME BIND_TRANCESMITTER is connected to the ESME SMSC, this type of ESME submitted to the SMSC launched short message, for Short Message status, such as short message delete request, the request to return to the SMSC response. 

  SMSC ESME between the request and response messages can be blocked is the way it can also be a form of asynchronous.    So ESME SMSC no response may be the case, initiated a number of requests to the SMSC. 


  SMSC received the request in accordance with the order to respond to EMSE.    But ESME must be able to deal with in order response. 


  SMSC to the news ESME 

  ESME SMSC to the news, such as: SMSC to Faduanxiaoxi to ESME, ESME RECEIVER type must be connected to the SMSC. 

  Figure 5 describes a typical RECEIVER types of ESME and sequence information between the SMSC examples.    RECEIVER types of ESME is connected to the SMSC BIND_RECEIVER the ESME, SMSC to such ESME to Faduanxiaoxi, ESME FOR response to the SMSC. 

  SMSC ESME between the request and response messages can be blocked is the way it can also be a form of asynchronous.    So SMSC may ESME FOR did not respond to the situation, launched more than deliver_sm request sent to the ESME. 


  ESME in accordance with the order of the requests received, the response to return to the SMSC.    But SMSC must be able to deal with in order to response. 


  Information flow 

  The provisions of the regulation of all the agreements, whether from ESME to SMSC, or ESME SMSC to the news, the party receiving the request, the requesting party must give a response to news (acknowledge). 

  Grammar news 

  In the following syntax note, to comply with the following rules: 

  A. No use of the field, based on type must be set to 0 or NULL. 

  B. news from the first news and information body composition. 

  C. State (Command_status) is defined as shown in Table 3. 

  State definition 

  Error Codes 

  Description 

  E_SUCCESS (0X00000000) 

  Success 

  E_OTHERERR (0X00000001) 

  Other errors 

  0X00000002 - 0X0000000F 

  SMSC manufacturers to retain the definition wrong 

  E_MSGLENERR (0X00000010) 

  Length wrong information 

  E_CMDLENERR (0X00000011) 

  Order the wrong length 

  E_INVLDCMDID (0X00000012) 

  ID information void 

  E_NORIGHT (0X00000013) 

  Implementation of this order did not mandate 

  0X00000014 - 0X0000001F 

  Reservations 

  E_INVLDSYSTEMID (0X00000020) 

  Void SYSTEMID 

  E_INVLDPASSWORD (0X00000021) 

  Invalid password 

  E_INVLDSYSTEMTYPE (0X00000022) 

  Void SYSTEMTYPE 

  0X00000023 - 0X0000003F 

  Reservations 

  E_ADDRERR (0X00000040) 

  Address wrong 

  E_MOEXCEED (0X00000041) 

  Exceed the maximum submission 

  E_MTEXCEED (0X00000042) 

  More than the maximum number of 

  E_INVLDUSER (0X00000043) 

  Invalid users 

  E_INVLDDATAFMT (0X00000044) 

  Invalid data formats 

  E_CREATEMSGFAILURE (0X00000045) 

  Failure to create news 

  E_INVLDMSGID (0X00000046) 

  Short Message ID invalid 

  E_DATABASEFAILURE (0X00000047) 

  Database failure 

  E_CANCELMSGFAILURE (0X00000048) 

  Cancellation information failure 

  E_MSGSTATEERR (0X00000049) 

  Short Message wrong state 

  E_REPLACEMSGFAILURE (0X0000004A) 

  Replacement failure news 

  E_INVLDRPLADDR (0X0000004B) 

  Replacement source address wrong 

  0X0000004C - 0X0000005F 

  Reservations 

  E_INVLDORGTON (0X00000060) 

  Invalid source addresses TON 

  E_INVLDORGNPI (0X00000061) 

  Invalid source addresses NPI 

  E_ORGADDRERR (0X00000062) 

  Address wrong source 

  E_INVLDDESTTON (0X00000063) 

  The purpose of invalid addresses TON 

  E_INVLDDESTNPI (0X00000064) 

  The purpose of invalid addresses NPI 

  E_DESTADDRERR (0X00000065) 

  Address wrong purpose 

  E_INVLDSCHEDULE (0X00000066) 

  Timing time invalid 

  E_INVLDEXPIRE (0X00000067) 

  Void TIMEOUT 

  E_INVLDESM (0X00000068) 

  Void ESM_CALSS 

  E_INVLDUDLEN (0X00000069) 

  Void UDLEN 

  E_INVLDPRI (0X0000006A) 

  PRI invalid 

  E_INVLDRDF (0X0000006B) 

  Void Registered_delivery_flag 

  E_INVLDRPF (0X0000006C) 

  Void Replace_if_present_flag 

  0X0000006D - 0X0000007F 

  Reservations 

  User management component (optional) 

  E_USERALREADYEXIST (0X00000080) 

  There has been designated users 

  E_CREATEUSERERR (0X00000081) 

  Create user failure 

  E_USERIDERR (0X00000082) 

  User ID error 

  E_USERNOTEXIST (0X00000083) 

  Assign a user does not exist 

  0X00000084 - 0X0000008F 

  Reservations 

  0X00000090 - 0X00000FFF 

  SMSC manufacturers to retain the definition wrong 

  Other 

  Reservations 

  Type Definition 

  (1) integer: composed of a certain number of bytes integer, the previous high, and low in the post.    For example: 1 byte (BYTE), 2 bytes (WORD), 4 bytes (DWORD), 6 bytes, and so on. 

  (2) C_String: NULL end of the ASCII string. 

  (3) C_DecString: NULL end of the ASCII string, which consists of a series of 10 hexadecimal characters ('0'—' 9 '). 

  (4) C_OctetString: eight from arbitrary byte string of data flow. 

  (5) C_HexString: NULL end of the ASCII string, which consists of a series of 16 hexadecimal characters ('0'—' 9 ',' A '(' a')—' F '( 'f')). 

  (6) C_UnicodeString: NULL end of the Unicode encoded string. 

  (7) C_StringTime: the string that time, the following format.    "YYMMDDhhmmsstnnp" length of 17 bytes, or a byte, the last byte value to be NULL, a byte out that the use of pre-defined time (Short Message Centre realized specific settings), 17 bytes of concrete format is as follows: 

  YY ' 

  The last two years (00-99) 

MM

  Month (01-12) 

DD

  (01-31) 

Hh

  Hour (00-23) 

Mm

  Points (00-59) 

Ss

  Second (00-59) 

T

  Tenth second (0-9) 

Nn

  And UTC (Universal Time Constant) ahead of time or behind the gap (00-48). 

  '+' (P) 

  UTC time in the time ahead. 

  '-' (P) 

  Time behind the UTC time. 

  For the Millennium, a time window approach to the problems, the specific method for YY> 90 interpreted as 19 YY otherwise interpreted as 20 YY. 

  Grammar news first 

  Table 4: Short Message first grammar 

  Field 

  Length (bytes) 

  Type 

  Description 

Command_Length

4

  Integer 

  Information packet length, including this column 

Command_ID

4

  Integer 

  This field shows that the provision of short message types, such as ESME_SUB_SM said that the news of ESME SMSC submitted to the Short Message.    Specific numerical definition, see Appendix A. 

Command_status

4

  Integer 

  This field said that a command of the successes and failures, such as failure, the failure of instructions from the wrong type of information, the request must be set to 0. 

Sequence_No

4

  Integer 

  This field information that the sequence of it generated by the ESME, it is news and its response to correspondence between the signs, and its value in the 0-0 XFFFFFFFF between the need to ensure strict monotonic increase, when reached 0 XFFFFFFFF, starting from 0 the next cycle. 

  Optional Message Body 

  Variable 

  Mixed 

  This field said that the news of the Short Message of the specific definition, see 6.5.2 

  News of grammar 

  Following several order to achieve, you can achieve short message transceiver. 

  BIND_RECEIVER order 

  This is an order in the expansion of SMS Short Message Centre entities and between virtual connection, the connection to support all the agreements orders. 

  BIND_RECEIVER Grammar 

  The first news Command_ID "bind_receiver" 

  Table 5: BIND_RECEIVER Grammar 

  Field 

  Length (bytes) 

  Type 

  Description 

  System_id 

  The largest 16 

C_String

  Interface ID 

  Password 

  The largest 9 

C_String

  Password 

  System_type 

  The largest 13 

C_String

  Interface type 

Interface_version

1

  Integer 

  Interface version 

Ton

1

  Integer 

  Reservations should be set to 0 

  Npi 

1

  Integer 

  Reservations should be set to 0 

  Address_range 

  The largest 41 

C_DecString

  Reservations should be set to NULL 

  BIND_RECEIVER_RESP Grammar 

  The first news Command_ID "bind_receiver_resp." 

  Table 6: BIND_RECEIVER_RESP Grammar 

  Field 

  Size (bytes) 

  Type 

  Description 

System_id

  The largest 16 

C_String

  Interface ID 

  State range: 

E_SUCCESS

E_OTHERERR

E_CMDLENERR

E_NORIGHT

E_INVLDSYSTEMID

E_INVLDPASSWORD

E_INVLDSYSTEMTYPE

E_INVLDIFVER

  UNBIND order 

  This is an order for ESME and disconnect the connection between the SMSC. 

  UNBIND Grammar 

  Only the first news this news, no news of the news is the first in the Command_ID "unbind." 

  UNBIND_RESP Grammar 

  Only the first news this news, no news of the news is the first in the Command_ID "unbind_resp." 

  State range: 

E_SUCCESS

E_OTHERERR

E_CMDLENERR

E_NORIGHT

  6.5.2.4 SUBMIT_SM order 

  This is an order for the Short Message ESME submitted to the SMSC to the SMSC this short message to a specific mobile station. 

  SUBMIT_SM Grammar 

  The first news Command_ID "submit_sm" 

  Table 7: SUBMIT_SM Grammar 

  Field 

  Length (bytes) 

  Type 

  Description 

  Service_type 

  The largest 6 

C_OctetString

  Reservations must be set to 0 

  Source_address_ton 

1

  Integer 

  Source Address Coding type 

  Source_address_npi 

1

  Integer 

  Source Address Coding Scheme 

  Source_address 

  The largest 21 

C_DecString

  Source Address 

  Dest_address_ton 

1

  Integer 

  Objective address coding type 

  Dest_address_npi 

1

  Integer 

  Objective Address Coding Scheme 

  Destination_address 

  The largest 21 

C_DecString

  Objective Address 

  Esm_class 

1

  Integer 

  Short Message Types 

  Protocol_ID 

1

  Integer 

  GSM protocol type 

  Priority_flag 

1

  Integer 

  Priority 

  Schedule_delivery_time 

  The largest 17 

C_StringTime

  Under Faduanxiaoxi time 

  Validity_period 

  The largest 17 

C_StringTime

  Short Message validity of the final 

  Registered_delivery_flag 

1

  Integer 

  Registration short message signs 

  Replace_if_present_flag 

1

  Integer 

  Replacement short message signs. 

  Data_coding 

1

  Integer 

  Data Coding Scheme 

  Sm_default_msg_id 

1

  Integer 

  Predefined Short Message ID 

  Sm_length 

1

  Integer 

  Short Message length 

  Short_message_text 

  The largest 161 

  Variable 

  Short Message content of the data 

  SUBMIT_SM_RESP Grammar 

  The first news Command_ID "submit_sm_resp" 

  Table 8: SUBMIT_SM_RESP Grammar 

  Field 

  Length (bytes) 

  Type 

  Description 

Message_id

  The largest 9 

C_HexString

  Short Message ID 

  State range: 

E_SUCCESS

E_OTHERERR

E_CMDLENERR

E_NORIGHT

E_ADDRERR

E_MOEXCEED

E_MTEXCEED

E_INVLDUSER

E_INVLDDATAFMT

E_CREATEMSGFAILURE

E_INVLDORGTON

E_INVLDORGNPI

E_ORGADDRERR

E_INVLDDESTTON

E_INVLDDESTNPI

E_DESTADDRERR

E_INVLDSCHEDULE

E_INVLDEXPIRE

E_INVLDESM

E_INVLDUDLEN

E_INVLDPRI

E_INVLDRDF

E_INVLDRPF

  DELIVER_SM order 

  This command generated by the SMSC, SMSC orders sent through this short message to the ESME purpose, it can also be used to transmit a status report sent (DELIVERY RECEIPT) news. 

  DELIVER_SM Grammar 

  SUBMIT_SM its grammar and the syntax of the same information, only in the news in the first Command_ID "deliver_sm." 

  DELIVER_SM_RESP Grammar 

  SUBMIT_SM_RESP its grammar and the syntax of the same information, only in the news in the first Command_ID "deliver_sm_resp." 

  Attachment: news parameters that 

  Address: 

  Address numbers 

  Address_range 

  Address range 

  Data_coding: 

  Data encoding options (see GSM 03.40 [1] 9.2.3.10) 

  Dest_address_npi: 

  Address purpose of coding schemes, with npi 

  Dest_address_ton: 

  Objective address coding type, the same ton 

  Destination_address: 

  Objective address, the same address 

  Esm_class: 

  Short Message Types 

Bit:

7

6

5

4

3

2

1

0

Flag:

Reserved

UDHI

Reserved

Delivery

RCPT

Reserved

  Which UDHI for a short content of the message, said that the first in the structure, the first to 0 that there is no structure. 

  Delivery RCPT is that the provision for a short news is a status report, 0 for normal under Faduanxiaoxi.    This only DELIVER_SM effective. 

  Other reservations. 

  If the first structure, short_message_text the following format: 

  ( 

  BYTE UDHL; / / information elements used in the structure set number of bytes 

  Information? Element-struct Information? Element; 

  / / Number of elements of the structure of information collection, its occupation by the number of bytes instructions UDHL 

  SM short message content 

  ) 

  Information them? Element-struct is structured as follows: 

  ( 

  BYTE Information? Element? Identifier / / information elements signs 

  BYTE Length of Information? Element / / information data elements used by the number of bytes 

  Information? Element Data 

  / / Information data elements, the number of bytes occupied by the Length of Information? Element instructions 

  ) 

  See definition of GSM 03.40 (7.2.0) 9.2.3.24 

  Final_date: 

  Short Message termination of the life of the actual period of time, and if this short message sent from the SMSC waiting in the queue to delete, which is to delete the time, otherwise the current time for the SMSC 

  GSM_code: 

  GSM error code, the table below 

  Wrong code 

  Value 

  Description 

ERROR_NONE

0

  Errorless 

P_UNKNOWN

1

  Users do not know 

P_PROVISION

2

  Does not provide this feature 

T_BARRED

3

  Call abandoned 

T_SUPPORT

4

  Do not support this mechanism 

T_ABSENT

5

  Users can not communications 

T_MSSUPPORT

6

  Mobile does not support Short Message 

T_MSERROR

7

  Mobile Short Message reception errors 

P_ILLEGAL_SUB

8

  Not legitimate users 

P_ILLEGAL_EQUIP

9

  Illegal equipment 

T_SYSTEM

10

  System failure 

T_MEMCAP

11

  Memory 

  Interface_version: 

  Used to describe the version of this Agreement 

  ESME link in the SMSC, if ESME, higher than the version proposed version of SMSC, SMSC is the negative response, in response to the status of the version that SMSC; ESME's version of less than or equal to SMSC's version, SMSC is certainly the response after the success of the linking process of conversation, the two sides will ESME, the version proposed as a basis for communication.    Interface_version value from 1, 0 reservations. 

  Is agreed, interface_version> = 1, except REPLACE_SM_EX must support orders and orders outside users manage all the agreements orders for interface_version> = 2, all must support the agreement referred to in this order. 

  Message_id: 

  Short Message ID, it set up by the SMSC.    For enquiries, as well as for the replacement of short messages and the use of operation. 

  Message_status: 

  Short Message current status: 

  0: E-state 

  1: Send successful (not to transmit) 

  2: Send failure (not to transmit) 

  3: failure due to the wait for the next (continue to try transponders) 

  4: for regular news and wait for (continuing to try transponders) 

  5: Short Message deleted (not to transmit) 

  6: Short Message overtime deleted (not to transmit) 

  7: invalid state (not to transmit) 

  8: EN_ROUTE for the agreement to retain compatibility SMPP 

  9: DELIVERED, SMPP agreement with reservations 

  10: EXPIRED, SMPP agreement with reservations 

  11: DELETED for the agreement to retain compatibility SMPP 

  12: UNDELIVERABLE for the agreement to retain compatibility SMPP 

  13: ACCEPTED, for the agreement to retain compatibility SMPP 

  14: INVALID, SMPP agreement with reservations 

  Others: reservations 

  MS_type: 

  Phone type 

  0: Chinese mobile phone 

  1: English phone 

  > 1: Retain 

  Npi: 

  Address Coding Scheme, (see definition GSM03.40 [1] 9.1.2.5) 

  0: unknown 

  1: ISDN telephone coding scheme 

  3: data coding schemes (X.121) 

  4: telegram coding scheme 

  8: Country coding scheme 

  9: special coding scheme 

  10: ERMES coding schemes (ETSI DE / PS 3 01? 3) 

  15: expansion of reservations 

  From 0-15 to retain the other values 

  OCOS: 

  Short Message to the largest, a mobile station for the SMSC submitted to the Short Message issued the maximum number 

  Password: 

  The password used to login 

  Priority_flag: 

  Priority 

  1: high-priority 

  0: ordinary priority 

  > 1: Retain 

  Protocol_ID: 

  GSM protocol type (see definition GSM03.40 [1] 9.2.3.9) 

  Registered_delivery_flag: 

  Registration short message signs, when it said that this short message to reach the final destination, the need to transmit a status report (DELIVERY RECEIPT). 

  0: no 

  1: the need 

  > 1: Retain 

  Replace_if_present_flag: 

  Replacement signs SUBMIT order instructions when the source address and destination address and the short waiting for the next news source address and destination address is the same, whether or not the replacement of those waiting for the next messaging.    DELIVERY order in the parameter invalid, home to 0. 

  0: No replacement 

  1: Replacement 

  > 1: Retain 

  Schedule_delivery_time: 

  SUBMIT order for the parameters under Faduanxiaoxi scheme that the time taken for DELIVERY order, the parameters that should be received under the SMSC to the Short Message ESME time. 

  Service_type: 

  Reservations must be set to NULL, the parameters specified in the original short message service category 

  Short_message_text: 

  Short Message content of the data, when coding for seven yards types, type C_String, maximum length of 160 characters.    8 yards, C_String type, the maximum length of 140 bytes.    When the Unicode, C_UnicodeString type, the maximum length of 70 characters. 

  SM_allowed: 

  Whether to offer a Short Message Service 

  0: not available 

  1: Provide 

  The remaining value of reservations 

  Sm_default_msg_id: 

  Predefined Short Message ID is not predefined short message should be set to 0.    Predefined Short Message ID x01 value from 0 to 0×64, the value of the specific meaning of the specific ESME and SMSC agreed.    The remaining value of reservations. 

  Sm_length: 

  Short Message length of the data, in bytes calculation. 

  Source_address: 

  Address source code, the same address. 

  Source_address_npi: 

  Source Address Coding Scheme with npi. 

  Source_address_ton: 

  Source Address Coding type, the same ton. 

  Sub_address: 

  Users mailing address. 

  Sub_ID: 

  User ID with the address. 

  Sub_name: 

  User name. 

  Reg_datetime: 

  User registration time. 

  System_id: 

  Interface ID, to describe the virtual connection of users, or use the SMSC ESME login account. 

  System_type: 

  Used to describe the type of user. 

  TCOS: 

  The maximum number of means waiting for the next to a mobile station, the largest number of short message. 

  Ton: 

  Address Coding type (see definition GSM03.40 [1] 9.1.2.5) 

  0 unknown number 

  An international number, for example, 8613901234567 

  2 domestic numbers, for example, 13901234567 

  No. 3 network dedicated 

  4 User ID 

  5 En number (in accordance with the GSM? TS03.38 default alphabet 7-bit coding) 

  6 initials numbers 

  7 reservations 

  Validity_peroid: 

  Short Message survival of the final period. 


  Appendix A: The definition of numerical signs 

  Order Code macro definitions 

  Numerical 

  Description 

ESME_BNDRCV

0X00000001

  ESME requirements connected to the SMSC 

ESME_BNDRCV

0X80000001

  Connect SMSC response 

ESME_BNDTRN

0X00000002

  ESME requirements connected to the SMSC 

ESME_BNDTRN_RESP

0X80000002

  Connect SMSC response 

ESME_UBD

0X00000006

  ESME request to disconnect the wire SMSC 

ESME_UBD_RESP

0X80000006

  Disconnect response 

ESME_SUB_SM

0X00000004

  ESME short messages to the SMSC to SMSC issued this short messages to a specific user. 

ESME_SUB_SM_RESP

0X80000004

  Response to the Short Message 

ESME_DELIVER_SM

0X00000005

  SMSC under Faduanxiaoxi to specific ESME 

ESME_DELIVER_SM_RESP

0X80000005

  Response under Faduanxiaoxi 

ESME_QUERY_SM

0X00000003

  ESME enquiries submitted by the previous state of the Short Message 

ESME_QUERY_SM_RESP

0X80000003

  Short Message for the response 

ESME_CANCEL_SM

0X00000008

  ESME before asking for the abolition of an article submitted by the Short Message 

ESME_CANCEL_SM_RESP

0X80000008

  ESME asking for the abolition of a previously submitted by the response of the Short Message 

ESME_REPLACE_SM

0X00000007

  ESME replace the previous request submitted by a certain Short Message 

ESME_REPLACE_SM_RESP

0X80000007

  ESME replace the previous request submitted by a response of the Short Message 

ESME_QRYLINK

0X00000015

  Asked Short Message entities and the extension of short message center connectivity 

ESME_QRYLINK_RESP

0X80000015

  Asked Short Message entities and the extension of short message center connecting the response 

ESME_NACK

0X80000000

  Receiving the wrong response to the first news 

ESME_REPLACE_SM_EX

0X00000090

  ESME replace the previous request submitted by the news of a short extension of the order, it has increased the data encoding formats field 

ESME_REPLACE_SM_EX_RESP

0X80000090

  Replacement expansion of the Short Message response 

ESME_ADD_SUB

0X000000A0

  Users 

ESME_ADD_SUB_RESP

0X800000A0

  Increase user response 

ESME_DEL_SUB

0X000000A1

  Delete User 

ESME_DEL_SUB_RESP

0X800000A1

  Delete User Response 

ESME_MOD_SUB

0X000000A2

  Modify user 

ESME_MOD_SUB_RESP

0X800000A2

  Modify user response 

ESME_QRY_SUB

0X000000A3

  User information 

ESME_QRY_SUB_RESP

0X800000A3

  User response information 

Releated Articles

  • Popuklar Articles

0 Comments to “Short Message SMPP interface development outline”

No Comments. Send your comment.

Leave a Reply

You must be logged in to post a comment.