MOD_L1->MOD_AS | L1_AS_SAP | FN: 762420 | T=442242 | MSG_ID_LAPDM_RR_DATA_IND | BS => MS //手机端接收的短消息
Channel_Type=SDCCH //短消息传输信道
>l3sms tif=0 ti=1 N(SD)=0 CP_DATA :
RP-DATA BS->MS (RP-MTI=1)
RP-Message Reference = 0
RP-Originator Address:
Type of Number = International number
ISDN/telephony Numbering plan (Rec. E.164/E.163)
Num SC = 8613800210500 // 短消息中心
RP-Destination Address: length = 0
== RP-User Data: ===== SMS-DELIVER: (TP-MTI=0)
TP-MMS=1: No More messages are waiting for the MS in this SC
TP-SRI=0: A status report will not be returned to the SME //短消息状态报告(deliver report),没有
TP-UDHI=0: TP-UD field contains only the Short Message
TP-RP =0: TP-Reply-Path parameter is not set in this SMS-DELIVER // 回复路径(reply path), 不需要
TP-OA:
Type of Number = International number
ISDN/telephone Numbering plan (Rec. E.164/E.163)
-- If it's a normal message :
Length = 13 semi-octet(s)
Num = 8613817803555 // 接收终端号码
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=00h:
// TP-PID 和 TP-DCS 这两个参数组合起来,可以判断本条是一普通的短消息.
The text is uncompressed
Alphabet = Default Alphabet
TP-SCTS:
November 28th 06
15h 13m 35s Time Zone: GMT + 8h0m (23h=32) // 短消息到达消息中心的时间戳
TP-UDL = 24 (18h) // 短消息长度, 24 bytes
TP-UD (SMS Message): ("Default 7 bit Alphabet") // 短消息编码方式
Text : sms[SP]test:[SP]send[SP]with[SP]GPRS // 短消息文本内容
2. Class SMS
a. Class 0
b. Class 1
c. Class 2
d. Class 3
2.1 Class 0: 自动显示在手机终端上,无论手机或者SIM的容量是否已满,但是不能自动保存在手机或者SIM卡上。(可以称作 闪信,现在也有些手机终端也会提供手动保存的功能。)
MOD_L1->MOD_AS | L1_AS_SAP | FN: 808002 | T=487824 | MSG_ID_LAPDM_RR_DATA_IND | BS => MS
Channel_Type=SDCCH
>l3sms tif=0 ti=1 N(SD)=0 CP_DATA :
RP-DATA BS->MS (RP-MTI=1)
RP-Message Reference = 0
RP-Originator Address:
Type of Number = International number
ISDN/telephony Numbering plan (Rec. E.164/E.163)
Num SC = 8613800210500
RP-Destination Address: length = 0
== RP-User Data: ===== SMS-DELIVER: (TP-MTI=0)
TP-MMS=1: No More messages are waiting for the MS in this SC
TP-SRI=0: A status report will not be returned to the SME
TP-UDHI=0: TP-UD field contains only the Short Message
TP-RP =0: TP-Reply-Path parameter is not set in this SMS-DELIVER
TP-OA:
Type of Number = International number
ISDN/telephone Numbering plan (Rec. E.164/E.163)
-- If it's a normal message :
Length = 13 semi-octet(s)
Num = 8613817803555
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=10h:
The text is uncompressed
Message Class = Class 0
Alphabet = Default Alphabet
TP-SCTS:
November 28th 06
15h 17m 05s Time Zone: GMT + 8h0m (23h=32)
TP-UDL = 11 (0Bh)
TP-UD (SMS Message): ("Default 7 bit Alphabet")
Texte : sms[SP]class[SP]0
2.2 Class 1: 保存的方式和Normal SMS一样,由用户手动设置决定手机或者SIM卡.
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=11h:
The text is uncompressed
Message Class = Class 1 (Default meaning: ME-specific)
Alphabet = Default Alphabet
2.3 Class 2: 默认保存在SIM卡上,当SIM卡慢应该提示一些协议错误等提示信息,但是现在许多手机终端厂商做成优先保存在SIM卡,当SIM卡满后,自动保存到手机中.
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=12h:
The text is uncompressed
Message Class = Class 2 SIM-specific message
Alphabet = Default Alphabet
2.4 Class 3: 直接保存到PC上,如果手机和PC没有连接,按照Class 1执行.
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=13h:
The text is uncompressed
Message Class = Class 3 (Default meaning: TE-specific)
Alphabet = Default Alphabet
3. Replace SMS
a. Replace type 1
b. Replace type 2
c. Replace type 3
d. Replace type 4
e. Replace type 5
f. Replace type 6
g. Replace type 7
3.1 Replace这种类型的短消息,主要特点是当TP-PID和TP-DCS一样的时候,可以将之前的短消息内容更新至最新收到的. 至于Replace 1~7 只是表示7种类型,没有什么特殊的含义。需要提的一点是Replace SMS主要由TP-PID来决定,但可以和TP-DCS配合使用.
MOD_L1->MOD_AS | L1_AS_SAP | FN: 791282 | T=471104 | MSG_ID_LAPDM_RR_DATA_IND | BS => MS
Channel_Type=SDCCH
>l3sms tif=0 ti=1 N(SD)=0 CP_DATA :
RP-DATA BS->MS (RP-MTI=1)
RP-Message Reference = 0
RP-Originator Address:
Type of Number = International number
ISDN/telephony Numbering plan (Rec. E.164/E.163)
Num SC = 8613800210500
RP-Destination Address: length = 0
== RP-User Data: ===== SMS-DELIVER: (TP-MTI=0)
TP-MMS=1: No More messages are waiting for the MS in this SC
TP-SRI=0: A status report will not be returned to the SME
TP-UDHI=0: TP-UD field contains only the Short Message
TP-RP =0: TP-Reply-Path parameter is not set in this SMS-DELIVER
TP-OA:
Type of Number = International number
ISDN/telephone Numbering plan (Rec. E.164/E.163)
-- If it's a normal message :
Length = 13 semi-octet(s)
Num = 8613817803555
TP-PID=42h: Replace Short Message Type 2
TP-DCS=00h:
// 可以判断这是一条Normal SMS类型的Replace 2 短消息.
The text is uncompressed
Alphabet = Default Alphabet
TP-SCTS:
November 28th 06
15h 15m 48s Time Zone: GMT + 8h0m (23h=32)
TP-UDL = 14 (0Eh)
TP-UD (SMS Message): ("Default 7 bit Alphabet")
Text : test[SP]replace[SP]2
4. Message type 0
这种类型的短消息,终端用户是感觉不到的,因为它是不会在上层显示给用户看到的,在手机后端收到后要立即删除掉,只是表示手机支持本类型消息的能力而已.作者: wright_wu 时间: 2010-9-15 10:04
5. WAP Push Message
这种类型的消息我们实际应用中碰到还是很多的,比如我们将彩信设置成手动接收或者彩信自动接收失败,会收到一条有彩信在彩信中心的短消息通知;还有就是某个网站会主动推送一条Push Message给手机终端,某某地方有打折信息、好的图书…;Push Mail邮件接收服务,当邮箱账户内一旦有新邮件到达,可以采用的一种方案是先推送一条Push Message给手机终端给予提示.
所以这些消息中,有两个主要的共性: 一是通过短消息途径传送;二是消息体中包含URL链接.
下面我们看一个彩信的Notification (wap push message)消息:
MOD_L1->MOD_AS | L1_AS_SAP | FN: 2044199 | T=1020595 | MSG_ID_LAPDM_RR_DATA_IND | BS => MS
Channel_Type=SDCCH
>l3sms tif=0 ti=1 N(SD)=0 CP_DATA :
RP-DATA BS->MS (RP-MTI=1)
RP-Message Reference = 0
RP-Originator Address:
Type of Number = International number
ISDN/telephony Numbering plan (Rec. E.164/E.163)
Num SC = 8613800210500
RP-Destination Address: length = 0
== RP-User Data: ===== SMS-DELIVER: (TP-MTI=0)
TP-MMS=1: No More messages are waiting for the MS in this SC
TP-SRI=0: A status report will not be returned to the SME
TP-UDHI=1: TP-UD field contains a header + the Short Message
TP-RP =0: TP-Reply-Path parameter is not set in this SMS-DELIVER
TP-OA:
Type of Number = National number
ISDN/telephone Numbering plan (Rec. E.164/E.163)
-- If it's a normal message :
Length = 5 semi-octet(s)
Num = 90022
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=04h:
The text is uncompressed
Alphabet = 8 bit
TP-SCTS:
November 28th 06
16h 52m 03s Time Zone: GMT + 8h0m (23h=32)
TP-UDL = 139 (8Bh)
TP-UD (SMS Message): ("8 bit Alphabet")
TP-UDHL length = 6 (06h)
Application port adressing scheme, 16 bits address : IEI= 05h
Length: 0x4 (4)
Destination Port:
Port Number: 0x0b84 (2948)
Meaning: As allocated by IANA
Originator Port:
Port Number: 0x23f0 (9200)
Meaning: As allocated by IANA
WSP Data Unit Structure
TID = 0x30
PDU Type = Push (0x06)
Length (Header + ContentType) = 36
ContentType: 0x616170706c69636174696f6e2f766e642e7761702e6d6d732d6d657373616765
application/vnd.wap.mms-message
Header:
(0xb487)
Push-Flag : 7
(0xaf84)
X-Wap-Application-Id :FFFFFF84
*** MMS Header ***
X-Mms-Message-Type: m-notification-ind (0x82)
X-Mms-Transaction-ID: cQ0G5FiedAQA
X-Mms-MMS-Version: 1.0 (0x90)
X-Mms-Content-Location: http://211.136.112.84/cQ0G5FiedAQA
X-Mms-Expiry (relative): 0x302a2eb => 1 year(s) 7 month(s) 8 day(s), 13:00:27
From (address-present): 13621981888/TYPE=PLMN
X-Mms-Message-Class: Personal (0x80)
X-Mms-Message-Size: 72597 bytes
*** No MMS Body ***作者: wright_wu 时间: 2010-9-15 10:05
6. Voice Mail Message
就是语音留言的提示消息.
MOD_L1->MOD_AS | L1_AS_SAP | FN: 833522 | T=513344 | MSG_ID_LAPDM_RR_DATA_IND | BS => MS
Channel_Type=SDCCH
>l3sms tif=0 ti=1 N(SD)=0 CP_DATA :
RP-DATA BS->MS (RP-MTI=1)
RP-Message Reference = 0
RP-Originator Address:
Type of Number = International number
ISDN/telephony Numbering plan (Rec. E.164/E.163)
Num SC = 8613800210500
RP-Destination Address: length = 0
== RP-User Data: ===== SMS-DELIVER: (TP-MTI=0)
TP-MMS=1: No More messages are waiting for the MS in this SC
TP-SRI=0: A status report will not be returned to the SME
TP-UDHI=0: TP-UD field contains only the Short Message
TP-RP =0: TP-Reply-Path parameter is not set in this SMS-DELIVER
TP-OA:
Type of Number = International number
ISDN/telephone Numbering plan (Rec. E.164/E.163)
-- If it's a normal message :
Length = 13 semi-octet(s)
Num = 8613817803555
TP-PID=00h: No interworking, but SME-to-SME protocol
TP-DCS=C0h: Discard Message:
Set Indication Inactive / Voicemail Message Waiting
TP-SCTS:
November 28th 06
15h 16m 44s Time Zone: GMT + 8h0m (23h=32)
TP-UDL = 1 (01h)
TP-UD (SMS Message): ("Default 7 bit Alphabet")
Texte : @