Joke Collection Website - Public benefit messages - Who can explain the CMPP agreement to me? It would be best to send an explanation. Thank you.

Who can explain the CMPP agreement to me? It would be best to send an explanation. Thank you.

China Mobile Communications Information Resource Station Entity and Internet Short Message Gateway (ISMG)

Interface Protocol (CMPP)

V1.1

China Mobile Communications Group Corporation

2000/11/29

--------------------- -------------------------------------------------- -----

Preparation instructions

This specification is the enterprise specification of China Mobile Communications Group Corporation, which stipulates the application layer interface protocol between the information resource station entity and the Internet short message gateway. The version of this agreement is version 1.1.

Abbreviation

ISMG Internet Short Message Gateway Internet Short Message Gateway

SMPP Short Message Peer to Peer Short Message Point-to-Point Protocol

CMPP China Mobile Peer to Peer China Mobile Point-to-Point Protocol

TLS Transport Layer Security Transport Layer Security

SMC Short Message Center Short Message Center

Network Structure

The Internet SC business center, i.e. ISMG, records the locations of SMCs in the entire network, and requires the functional entity of the ICP to send a CMPP_SUBMIT message to the ISMG, and the ISMG forwards the message to a certain SMC. At the same time, SMC can also send short messages to ISMG, and ISMG sends them to the corresponding ICP.

The maintenance management center manages ISMG.

CMPP function

CMPP is used to establish a path between the short message center and the ICP. The provision of services and information is completed by the ICP. It can provide services for the realization of mobile data value-added services, such as the following services: Email notifications, voicemail notifications, Internet short messages, mobile station emails, reminder notifications, automatic integrated service information stations (information on demand services, mainly: weather forecast , stock information, flight information, etc.).

The following takes the email notification service as an example to describe the information process: an Internet user sends an email to the ICP's Email Server. ICP's POP3 SERVER activates the filtering process. If the user applies for the email notification service, the filtering process will take out the user's registered mobile phone number, take out the email title, bind it in the CMPP_SUBMIT message, and send it to ISMG. ISMG will check the "mobile phone number receiving service" field in the CMPP_SUBMIT message, query the ISMG for the address of the SMC to which the mobile user belongs, and then send it to the SMC. After ISMG receives the confirmation message, it converts the message into CMPP_SUBMIT_REP and sends it back to ICP. After receiving the message, SMC processes the message and sends a confirmation message to ISMG.

As can be seen from the above process, for ICP, the work to be done is mainly concentrated in the second step, that is, in Just create a filtering program in EMAIL SERVER to achieve the above functions.

From a protocol perspective, ICP can implement functions corresponding to the control layer as long as it has the interface implemented in CMPP. As for specific ICP functional entities, such as Email Server, Web Server, etc., more work needs to be done. Some application layer work.

Interface

CMPP protocol uses TCP/IP as the underlying communication bearer. When higher security is required, the TLS layer can be used for secure transmission.

Message flow

When exchanging information between ICP and ISMG, long connection mode or short connection mode can be used. The so-called long connection means that multiple data packets can be sent continuously on a connection and then the connection is disconnected. During the connection maintenance period, if no data packets are sent, both parties need to send link detection packets. A short connection means that when the communicating parties have data exchange, a connection is established. After the data is sent, the connection is disconnected, that is, each connection only completes the sending of one business.

Long message

ICP and ISMG establish a TCP connection in Client-Server mode for mutual submission of information from both parties. After the TCP/IP connection is established, the Client initiates the establishment of an application layer connection. At this time, if ICP or ISMG believes that a TLS connection needs to be established, the TLS field will be set in the transmitted data packet to establish a TLS connection between both parties.

During the data transmission process after the application layer connection is established, if ICP or ISMG needs to send encrypted information to the peer, a TLS connection can also be established. In this case, you only need to set Tls_available (whether Use the TLS layer) attribute field, and other attributes in the message body of this message are not sent.

Messages are sent concurrently, with flow control, and the window size is adjustable. It is tentatively set at 10 messages. That is, if the receiver receives more than 10 messages at a time before responding, it will be rejected.

The message types sent by ICP to ISMG include:

1) CMPP_Connect requests application layer connection

2) CMPP_Terminate terminates application layer connection

3) CMPP_Terminate_REP terminates application layer connection response

4) CMPP_Deliver_REP sends SMS response

5) CMPP_Submit submits SMS

6) CMPP_Query sends SMS status query

7) CMPP_Cancel delete text message

8) CMPP_Active_Test activate test

9) CMPP_Active_Test_REP activate test response

Message type sent by ISMG to ICP Includes:

1) CMPP_Connect_REP request connection response

2) CMPP_Deliver SMS delivery

3) CMPP_Submit_REP submit SMS response

4) CMPP_Query_REP SMS status query result

5) CMPP_Cancel_REP Delete SMS response

6) CMPP_Active_Test_REP Activate test response

7) CMPP_Active_Test Activate test

8) CMPP_Terminate terminates the application layer connection

9) CMPP_Terminate_Rep terminates the application layer connection response

The message types sent between ISMGs include:

1) CMPP_Fwd before the message Forward

2) CMPP_Fwd_REP message forwarding response

3) CMPP_Route routing request

4) CMPP_Route_REP routing request response

One operation process

Short message

The communication between ISMG and ICP adopts TCP/IP protocol, and both parties are client and server of each other. Sending and receiving are performed separately, and a connection is established for each business. The communication adopts the response mode, and the response and request are completed in the same connection.

Since the system adopts mutual client/server mode, the operation initiates a connection request in a client-driven manner, and the connection is closed after completing an operation. During the transmission process, if ICP or ISMG believes that a TLS connection needs to be established, the TLS field will be set in the transmitted data packet and a TLS connection between both parties will be established.

The authentication of ICP in the connection adopts a phased authentication method. When ICP exchanges information with IMSG for the first time, ICP first sends an identity authentication packet. After IMSG authenticates ICP, it records the IP address of ICP and other relevant information. Information, in future data exchanges, IMSG uses the IP address of the ICP as an authentication condition, that is, it will not process information related to unregistered ICPs. When ICP wants to disconnect this logical application layer connection, it sends a disconnection request packet. After ISMG accepts the disconnection request, it clears the information related to this ICP, that is, the MT information of MO to this ICP or ICP is It will not be processed, but the MO information will be saved until the ICP establishes a logical application layer connection with the ISMG again, that is, identity authentication. ISMG is also allowed to initiate a connection request to disconnect the ICP.

Messages are sent concurrently with flow control. The window size is adjustable and is tentatively set at 10 messages. That is, if the receiver receives more than 10 messages at a time before responding, it will be rejected.

The message types sent by ICP to ISMG include:

1) CMPP_Connect requests application layer connection

2) CMPP_Terminate terminates application layer connection

3) CMPP_Terminate_REP terminates application layer connection response

4) CMPP_Deliver_REP sends SMS response

5) CMPP_Submit submits SMS

6) CMPP_Query sends SMS status query

7) CMPP_Cancel delete text message

The message types sent by ISMG to ICP include:

1) CMPP_Connect_REP request connection response

2) CMPP_Deliver Send SMS

3) CMPP_Submit_REP Submit SMS response

4) CMPP_Query_REP SMS status query result

5) CMPP_Cancel_REP Delete SMS response

6) CMPP_Terminate terminates the application layer connection

7) CMPP_Terminate_Rep terminates the application layer connection response

The message types sent between ISMGs include:

1) CMPP_Fwd before the message Forward

2) CMPP_Fwd_REP message forwarding response

3) CMPP_Route routing request

4) CMPP_Route_REP routing request response

One operation process (MO and MT)

Message definition

The CMPP connection port number is defined as 7890. The bytes adopt the network sequence commonly used in the network, the timeout interval adopts the Fibonacci sequence, and the number of retransmissions is dynamically adjustable, preferably no less than 3 times.

Basic data types:

Integer

Unsigned integer

C-Octet String

Variable length characters String, indicating the end of the string with a null character

Octet String

Fixed-length string, when there are insufficient digits, blanks are padded on the right

7.1 Message structure

p>

Item

Description

Message Header

Message header (all message public headers)

Message Body

Message body

7.2 Message Header format (Message Header)

Field name

Number of bytes

Type

Description

Total_Length

4

Integer

The total length of the message (including message header and message body )

Command_ID

4

Integer

Command or response type

Sequence_ID

4

Integer

Message serial number, sequential accumulation, step size is 1, circular use

7.3 Message Body Format (Message Body)

1. CMPP_Connect request connection

Field name

Number of bytes

Attributes

Description

Source_Addr

6

Octet String

ICP_ID

AuthenticatorICP

16

Octet String

ICP authentication code[1]

Reverse

8

Octet String

Reserved item (temporarily Not required)

2. CMPP_Connect_REP request connection response

Field name

Number of bytes

Attributes

Description

Status

1

Integer

Status

0: Correct

1 : Message structure error

2: Illegal ICP_ID

3: ICP authentication error

4~: Other errors

AuthenticatorISMG

16

Octet String

ISMG authentication code[2]

Tls_available

1

Integer

Whether to use the TLS protocol layer

3. CMPP_Terminate terminates the connection

The message body is empty.

4. CMPP_Terminate_Rep Terminate connection response

The message body is empty.

5.CMPP_Submit Send SMS

Field name

Number of bytes

Attributes

Description

Msg_id

4

Integer

Message identification

1~FFFFFFFFH

Sequential accumulation, The step size is 1 and is used cyclically.

Pk_total

1

Integer

The total number of messages with the same Msg_id

Pk_number

1

Integer

Message sequence number with the same Msg_id

Msg_level

1

Integer

Information Level

Service_id

10

Octet String

Business Type

Tls_available

1

Integer

Whether to use the TLS protocol layer

Msg_Fmt

1

Integer

Message format

0: ASCII string

3: SMS card writing operation

4 : Binary information

8: UCS2 encoding

15: Contains GB Chinese characters

Msg_src

6

Octet String

Information content source (ICP_ID)

FeeType

1

Integer

Charge type

FeeCode

1

Integer

FeeCode

Valid_Time

1 or 17

C-Octet String

Survival validity period (when the number of bytes is 1: no survival period is specified, set to NULL)

At_Time

1 or 17

C-Octet String

Time to send regularly (when the number of bytes is 1: do not specify the sending time and set it to NULL)

Src_terminal_id

21

Octet String

Source terminal identification (can be empty if not available)

DestUsr_tl

1

Integer

Number of users receiving messages (less than 100 users)

Dest_terminal_id

21*DestUsr_tl

Octet String

Mobile phone number receiving the service

Msg_Length

1

Integer

Message length (1- 70 or 140)

Msg_Content

Msg_length

C-Octet String

Message content

Reserve

p>

8

Octet String

Reserved

6.CMPP_Submit_REP Send SMS response (error requires ICP to resend all Msg_Id information)

Field name

Number of bytes

Attributes

Description

Msg_Id

4

Integer

Delete

Information identifier

Tls_available

1

Integer

Whether to use the TLS protocol layer

Result

1

Integer

Result

0: Correct

1: Wrong message structure

2 : Wrong command word

3: Repeated message sequence number

4: Wrong message length

5: Wrong tariff code

6: Exceeded Maximum message length

7: Business code error

8: Flow control error

9~: Other errors

7.CMPP_Query sent SMS status query (query the statistical information of the date specified by the Time attribute)

Field name

Number of bytes

Attributes

Description

Tls_available

1

Integer

Whether to use the TLS protocol layer

Time

8

Octet String

Time (accurate to day)

Query_Type

1

Integer

Query Category

0: Query by total number

1: Query by business code

Query_Code

10

Octet String

Query code [3] (business type)

Reserve

8

Octet String

Reserved

8.CMPP_Query_REP SMS status query result

Field name

Number of bytes

Attributes

Description

Tls_available

1

Integer

Whether to use the TLS protocol layer

Time

8

Octet String

Time (accurate to date)

Query_Type

1

Integer

Query category

0: Total query

1: Query by business code

Query_Code

10

Octet String

Query code

MT_TLMsg

4

Integer Total number of messages received from ICP

MT_TLusr

4

Integer

Receive the total number of users from ICP

MT_Scs

4

Integer

Number of successful forwardings

MT_WT

4

Integer

To be forwarded Quantity

MT_FL

4

Integer

Number of forwarding failures

MO_Scs

4

Integer

Quantity successfully delivered to ICP

MO_WT

4

Integer

Quantity to be delivered to ICP

MO_FL

4

Integer

Number of failed deliveries to ICP

9. CMPP_Deliver

Field name

Number of bytes

Attribute

Property

Description

Msg_Id

4

Integer

Message ID

Msg_Level

1

Integer

Information level

Tls_available

1

Integer

Whether to use TLS protocol layer

Service_id

10

Octet String

Business type

Msg_Fmt

1

Integer

Message format

0: ASCII string

4: Binary message

8: UCS2 encoding

Srcterminal_id

21

Octet String

Source terminal identification

Msg_Length

1

Integer

Message length

Msg_Content

Msg_length

C-Octet String

Message content

Reserve

8

Octet String

Reserved items ( In the future, ICP will provide the confirmation information that has been submitted to the mobile phone user)

10.CMPP_Deliver_REP Send SMS response

Field name

Number of bytes

Attributes

Description

Msg_Id

4

Integer

Message ID

Tls_available

1

Integer

Whether to use the TLS protocol layer

Result

1

Integer

Result

0: Correct

1: Wrong message structure

2: Wrong command word

3: Repeated message sequence numbers

4: Wrong message length

5: Wrong tariff code

6: Exceeded maximum message length

7: Business code error

8: Flow control error

9~: Other errors

11.CMPP_Cancel delete text message

Field name

Number of bytes

Attributes

Description

Msg_Id

4

Integer

Message identification

Tls_available

1

Integer

Whether to use the TLS protocol layer

p>

12.CMPP_Cancel_REP Delete SMS response

Field name

Number of bytes

Attributes

Description

Tls_available

1

Integer

Whether to use the TLS protocol layer

Success_Id

1

Integer

Success identification (0: success; 1: failure)

13.CMPP_Active_Test activation test

Field name

Number of bytes

Attributes

Description

Tls_available

1

Integer<

/p>

Whether to use the TLS protocol layer

14.CMPP_Active_Test_REP activate test response

Field name

Number of bytes

Attributes

Description

Tls_available

1

Integer

Whether to use the TLS protocol layer

Success_Id

1

Integer

Success identification (0--success)

15. CMPP_Fwd SMS forwarding

Field name

Number of bytes

Attributes

Description

Source_ Id

4

Octet String

Source gateway code

Dest_Id

4

Octet String

Destination gateway code

NodesCount

1

Integer

Number of gateways passed

Tls_available

1

Integer

Whether to use the TLS protocol layer

Msg_id

4

Interger

Message ID

Pk_total

1

Integer

The total number of messages with the same Msg_id

Pk_number

1

Integer

Message sequence number with the same Msg_id

Msg_level

1

Integer

Information Level

Service_id

10

Octet String

Business Type

Msg_Fmt

1

Integer

Message format

0: ASCII string

4: Binary information

8: UCS2 encoding

15: Contains GB Chinese characters

Srcterminal_id

21

Octet String

Source terminal identification (can be empty)

DestUsr_tl

1

Integer

Receive Number of users who received the message

Dest_terminal_id

21*DestUsr_tl

C-Octet String

Mobile phone number to receive the service

Msg_src

6

Octet String

Information content source

FeeCode

2

Octet String

Tariff code

Valid_Time

1or17

C-Octet String

Validity period ( When the number of bytes is 1: do not specify the sending time, set it to NULL)

At_Time

1or17

C-Octet String

Time for scheduled transmission (when the number of bytes is 1: do not specify the transmission time, set it to NULL)

Msg_Length

1

Integet

Message length<

/p>

Msg_Content

Msg_length

C-Octet String

Message content

Reserve

8

M

Reserved

16. CMPP_Fwd _REP SMS forwarding response

Field name

bytes Number

Attribute

Description

Msg_Id

4

Integer

Message ID

Pk_total

1

Integer

The total number of messages with the same Msg_id

Pk_number

1

Integer

Message sequence number with the same Msg_id

Tls_available

1

Integer

Whether to use the TLS protocol layer

Result

1

Integer

Result

0 : Correct

1: The message structure is wrong

2: The command word is wrong

3: The message sequence number is repeated

4: The message length is wrong

5: Tariff code error

6: Maximum message length exceeded

7: Service code error

8: Flow control error

9: Wrong forwarding judgment (this ICP should not be sent to this ISMG)

10~: Other errors

17. CMPP_Route routing request

Field name

Number of bytes

Attributes

Description

New_Gate

1

Integer

0: Ordinary gateway; 1: Newly added gateway

Request_Total

2

Integer

0: Request one; 1: Request multiple routing table data (if the following fields are empty, request all routing tables)

Service_Type

10

Octet String

Requested business type

Service_Code

4

Integer

Requested business code

ICP_ID

6

Octet String

ICP access code (if the Service_Type field is set, this field is empty)

18. CMPP_Route_REP routing request response

Field name

Number of bytes

Attributes

Description

Request_Number

2

Integer

The number of routing table data returned. If the value of this field is greater than 1, the following 5 fields will appear repeatedly

Service_Type

10

Octet string

Business type

Service_Code_Start

4

Integer

Business code start flag

Service_Code_End

4

Integer

Business code End flag

ICP_ID

6

Octet String

ICP connection

Enter the code (if the Service_Type field is set, this field is empty)

ISMG_ID

4

Octet String

The gateway corresponding to the above conditions Code

……

8. Number

8.1 ISMG_ID

Location

Number (ISMG_ID is temporarily identified by area code)

Description

Beijing

(010)

Stitch

Jiangxi

(0791)

Tsinghua Shenzhen News

Guangzhou

(020)

Tsinghua Shenzhen News

Tianjin

(022)

Others to be determined

8.2 ICP number

ICP name

Number (ISMG_ID)

Description

Sina

p>

(To be determined)

Sohu

(To be determined)

To be determined)

8.3 Command_ID

Command word name

Command_ID value

Description

CMPP_Connect

0x00000001

Request connection

CMPP_Connect_REP

0x80000001

Request connection response

CMPP_Terminate

0x00000002

Terminate connection

CMPP_Terminate_REP

0x80000002

Termination response

CMPP_Submit

0x00000004

Submit SMS

p>

CMPP_Submit_REP

0x80000004

Submit SMS response

CMPP_Deliver

0x00000005

SMS delivery

CMPP_Deliver_REP

0x80000005

Send SMS response

CMPP_Query

0x00000006

Send SMS status query

CMPP_Query_REP

0x80000006

Send SMS status query response

CMPP_Cancel

0x00000007

p>

Delete SMS

CMPP_Cancel_REP

0x80000007

Delete SMS Response

CMPP_Active_Test

0x00000008

Activate Test

CMPP_Active_Test_REP

0x80000008

Activate Test Response

CMPP_Fwd

0x00000009

Message forwarding

CMPP_Fwd_REP

0x80000009

Message forwarding response

CMPP_Route

0x00000003

Route request

CMPP_Route_REP

0x80000003

Route request response

8.4 FeeType amp; FeeCode Tariff categories and rates

Code (to be determined)

1. Information level

The information level ranges from 1-9, with "9" being the highest and "0" being the lowest

2. Tariff code

The specific definition is:

“00”: free

“99”: monthly subscription

“98”: capped

"01"--"10": 0.01 yuan--0.10 yuan

"11"--"50": in increments of 0.05 yuan

"51"- -"80": in increments of 0.10 yuan

"81"--"97": reserved

[1] is used to identify ICP. Its value is calculated through one-way MD5 hash and is expressed as follows:

AuthenticatorICP =MD5 (Source_Addr 9 zero int ConnectType shared secret)

Shared secret is agreed upon in advance by China Mobile and ICP.

[2] is used to identify ISMG. Its value is calculated through one-way MD5 hash, expressed as follows:

AuthenticatorISMG =MD5 (Status AuthenticatorICP Tls_available shared secret)

Shared secret is agreed upon in advance by China Mobile and ICP, and AuthenticatorICP is The value in the last message CMPP_Request_Connect sent by ICP to ISMG.

[3] When Query_Type is 0, this item is invalid; when Query_Type is 1, this item fills in the business code Service_id.