如何将SIP链路Message短信转为CDMA短信通过SIGTRAN链路发送
前言
近期遇到一個問題,將將SIP鏈路Message短信轉(zhuǎn)為CDMA短信通過SIGTRAN鏈路發(fā)送。Message短信通過SIP鏈路送到業(yè)務(wù)處理平臺,業(yè)務(wù)處理平臺將該Message消息重新打包為CDMA短信體通過SIGTRAN鏈路發(fā)送出去。所以此解決方案的前提需要打通SIP鏈路及SIGTRAN鏈路。
下面將我的解決方案給網(wǎng)友分享下。SIP Message 短信體介紹
SIP Message短信體與普通的SIP消息,不同的地方主要有兩個,一是Content-Type;二是Message Body。其他基本都是相同的。
普通短信實(shí)例如下
真正的短信就藏在Message Body中,遵照GSM 03.04規(guī)范。
Session Initiation Protocol (MESSAGE)
Request-Line: MESSAGE sip:+8618911709510@bj.ims.mnc011.mcc460.3gppnetwork.org SIP/2.0
Method: MESSAGE
Request-URI: sip:+8618911709510@bj.ims.mnc011.mcc460.3gppnetwork.org
Request-URI User Part: +8618911709510
E.164 number (MSISDN): 8618911709510
Country Code: China (People’s Republic of) (86)
Request-URI Host Part: bj.ims.mnc011.mcc460.3gppnetwork.org
[Resent Packet: False]
Message Header
[Expert Info (Warning/Undecoded): Trailing stray characters]
[Trailing stray characters]
[Severity level: Warning]
[Group: Undecoded]
Via: SIP/2.0/UDP 192.168.46.135:5060;branch=z9hG4bK388395731j192.1.0.40235711
Transport: UDP
Sent-by Address: 192.168.46.135
Sent-by port: 5060
Branch: z9hG4bK388395731j192.1.0.40235711
From: sip:ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org;tag=hyjjxh192.1.0.0.68159442.118278645100
SIP from address: sip:ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
SIP from address Host Part: ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
SIP from tag: hyjjxh192.1.0.0.68159442.118278645100
Call-ID: 0190e69c00a900000d43_692035611j192.1.402357110@192.168.46.135
[Generated Call-ID: 0190e69c00a900000d43_692035611j192.1.402357110@192.168.46.135]
CSeq: 100 MESSAGE
Sequence Number: 100
Method: MESSAGE
Max-Forwards: 70
To: sip:+8618911709510@bj.ims.mnc011.mcc460.3gppnetwork.org
SIP to address: sip:+8618911709510@bj.ims.mnc011.mcc460.3gppnetwork.org
SIP to address User Part: +8618xxxxx
E.164 number (MSISDN): 861891ssssss0
Country Code: China (People’s Republic of) (86)
SIP to address Host Part: bj.ims.mnc011.mcc460.3gppnetwork.org
Route: sip:scscf14ahw.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org:5060;lr
Route URI: sip:scscf14ahw.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org:5060;lr
Route Host Part: scscf14ahw.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
Route Host Port: 5060
Route URI parameter: lr
P-Asserted-Identity: sip:ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
SIP PAI Address: sip:ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
SIP PAI Host Part: ipsm11bze.bj.bj.bj.ims.mnc011.mcc460.3gppnetwork.org
Request-Disposition: no-fork
Accept-Contact: *;+g.3gpp.smsip
Content-Length: 38
Content-Type: application/vnd.3gpp.sms
Message Body
GSM A-I/F RP - RP-DATA (Network to MS)
Message Type RP-DATA (Network to MS)
RP-Message Reference
RP-Message Reference: 0xad (173)
RP-Originator Address - (460030934101200)
Length: 9
1… … = Extension: No Extension
.001 … = Type of number: International Number (0x1)
… 0001 = Numbering plan identification: ISDN/Telephony Numbering (ITU-T Rec. E.164 / ITU-T Rec. E.163) (0x1)
Called Party BCD Number: 46xxxxxxxxx
RP-Destination Address
Length: 0
RP-User Data
Length: 24
TPDU (not displayed)
GSM SMS TPDU (GSM 03.40) SMS-DELIVER
0… … = TP-RP: TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER
.0… … = TP-UDHI: The TP UD field contains only the short message
…1. … = TP-SRI: A status report shall be returned to the SME
… 0… = TP-LP: The message has not been forwarded and is not a spawned message
… .1… = TP-MMS: No more messages are waiting for the MS in this SC
… …00 = TP-MTI: SMS-DELIVER (0)
TP-Originating-Address - (xxxxxxx)
Length: 11 address digits
1… … = Extension: No extension
.010 … = Type of number: National (2)
… 0001 = Numbering plan: ISDN/telephone (E.164/E.163) (1)
TP-OA Digits: 1xxxxxx
TP-PID: 0
00… … = Defines formatting for subsequent bits: 0x0
…0. … = Telematic interworking: no telematic interworking, but SME-to-SME protocol
…0 0000 = The SM-AL protocol being used between the SME and the MS: 0
TP-DCS: 0
00… … = Coding Group Bits: General Data Coding indication (0)
Special case, GSM 7 bit default alphabet
TP-Service-Centre-Time-Stamp
Year: 20
Month: 7
Day: 1
Hour: 14
Minutes: 54
Seconds: 20
Timezone: GMT + 8 hours 0 minutes
TP-User-Data-Length: (5) depends on Data-Coding-Scheme
TP-User-Data
SMS text: ààààà
Deliver的結(jié)構(gòu)如下:
短信狀態(tài)報告示例如下:
SIP短信報告體如圖所示:
RP-User Data Deliver Report的示例如下:
GDM 03.04解釋如下:
SIGTRAN CDMA 短信體介紹
和SIP Message 一樣,會介紹CDMA普通短信。普通的CDMA短信,采用SMS Deliver Point to Point消息承載。
ANSI Transaction Capabilities Application Part
queryWithPerm
identifier: 74d5194c
componentPortion: 1 item
ComponentPDU: invokeLast (9)
invokeLast
componentIDs: 01
operationCode: private (17)
private: 2357 SMS Delivery Point to Point
ANSI Mobile Application Part
sMSDeliveryPointToPoint
mobileIdentificationNumber - xxxxxx
BCD digits: xxxxxx
electronicSerialNumber:xxxxxx
sms-BearerData: 000310eec0010620136a5c5ea803061808071058040a0140
sms-NotificationIndicator: Notify when available (1)
sms-OriginalDestinationAddress - 8XXXXX
Type of Digits: Not Used (0)
00… … = Reserved: 0
…00 … = Screening indication: User provided, not screened (0)
… 0… = Reserved: False
… .0… = Number available indication: Number is available
… …0. = Presentation Indication: Presentation Allowed
… …1 = Nature of Number: International
0010 … = Numbering Plan: Telephony Numbering (ITU-T Rec. E.164,E.163) (2)
… 0001 = Encoding: BCD (1)
Number of Digits: 13
BCD digits: 8618964970195
sms-OriginalOriginatingAddress - 15338169221
Type of Digits: Not Used (0)
00… … = Reserved: 0
…00 … = Screening indication: User provided, not screened (0)
… 0… = Reserved: False
… .0… = Number available indication: Number is available
… …0. = Presentation Indication: Presentation Allowed
… …0 = Nature of Number: National
0010 … = Numbering Plan: Telephony Numbering (ITU-T Rec. E.164,E.163) (2)
… 0001 = Encoding: BCD (1)
Number of Digits: 11
BCD digits: 1xxxxxx
sms-TeleserviceIdentifier: 1002
ANSI IS-637-A (SMS) Teleservice Layer - CDMA Cellular Messaging Teleservice (4098)
Message Identifier
Teleservice Subparam ID: Message Identifier (0)
Length: 3
0001 … … … … … = Message Type: Deliver (mobile-terminated only) (1)
… 0000 1110 1110 1100 … = Message ID: 3820
… … … … … 0… = Header Indicator: The User Data field contains only the short message (0)
… … … … … .000 = Reserved: 0
User Data
Teleservice Subparam ID: User Data (1)
Length: 6
0010 0… … … = Encoding: UNICODE (4)
… .000 0001 0… = Number of fields: 2
Encoded user data: 測試
… .000 = Reserved bit(s): 0
Message Center Time Stamp
Teleservice Subparam ID: Message Center Time Stamp (3)
Length: 6
Timestamp (Year): 2018 (18)
Timestamp (Month): August (08)
Timestamp (Day): 7
Timestamp (Hours): 10
Timestamp (Minutes): 58
Timestamp (Seconds): 4
Reply Option
Teleservice Subparam ID: Reply Option (10)
Length: 1
0… … = User Acknowledgement Requested: No
.1… … = Delivery Acknowledgement Requested: Yes
…0. … = Read Acknowledgement Requested: No
…0 … = Delivery/Submit Report Requested: No
… 0000 = Reserved bit(s): 0
3GPP2 C.S0015-B中對于SMS Point-To-Point的定義:
CDMA短信響應(yīng)格式如下
ANSI Transaction Capabilities Application Part
response
identifier: 74d5194c
componentPortion: 1 item
ComponentPDU: returnResultLast (10)
returnResultLast
componentID: 01
[private: 2357 SMS Delivery Point to Point]
ANSI Mobile Application Part
sMSDeliveryPointToPointRes
消息響應(yīng)的如下:
Message短信轉(zhuǎn)CDMA短信的流程
短信總體為將Message的Deliver消息轉(zhuǎn)為CDMA的Point-TO-Point消息;將CDMA的響應(yīng)消息轉(zhuǎn)為Message消息的Deliver Report。
Message的字段有RP_Message_Reference、TP_Oriinator_Address、TP_Orinating_Address、TP_Destination_Address、TP_PID、TP_DCS、TP_Service_Center_Time_Stamp、TP_User_Data。
CDMA的Deliver的字段有mobileIdentificationNumber、destronicServerNumber、sms_NotificationIndicator、sms_OriginalDestionationAddress、sms_originalOriginatingAddress、sms_TeleserviceIdentifier。其中UserData與Message中的User_Data進(jìn)行對應(yīng)。
這種需要注意的GSM短信與CDMA短信的User_Data的轉(zhuǎn)換方法,CMDA短信的USER_DATA有移位和對齊的操作。
總結(jié)
參照SIP及GSM規(guī)范將Message消息解碼;參照CDMA規(guī)范將消息封裝為SMS Point-to-Point消息,即可完成消息的轉(zhuǎn)換。
總結(jié)
以上是生活随笔為你收集整理的如何将SIP链路Message短信转为CDMA短信通过SIGTRAN链路发送的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: win10应用商店打不开_首发!打不开苹
- 下一篇: 数字孪生配电网的应用价值