SMS technology has been specified by the ETSI in GSM 03.40 and 03.38 documents (3GPP TS 23.040 and 3GPP TS 23.038 respectively). These documents only describe how to use SMS over mobile networks (nothing for IP networks).
In real world there are two way to receive SMS messages over mobile networks: Binary (PDU) and Text mode.
In this post I will explain how to use SMS technology over IP within the IP Multimedia (IM) Core Network (CN) subsystem based on the Session Initiation Protocol (SIP) and SIP Events as defined in 3GPP TS 24.229.
Note: In the coming chapters, « SMS over IMS Network » and « SMS over IP Network » have the same meaning.
Text mode
The message payload is transfered « as is ». This mode is out of scope.
Binary mode
Also know as PDU (Protocol Data Unit) mode, it is use to encode the payload of the SMS sent over IMS networks. In this case the payload only contains a sequence of hexa-decimal octets or decimal semi-octets strings. The overall PDU string contains some useful information (SMSC address, Service center time stamp, sender number, message reference ...) plus the actual message.
The message length can be up to 160 characters where each character represent 7bits [160/7bits], [140/8bits] or [70/16bits]. By default, each character represent 7bits encoded as per GSM 03.38.
For IMS Networks, SMS message shall be encapsulated in RPDUs (Relay Protocol Data Unit) data string as defined in 3GPP TS 24.011, subclause 7.3. The RPDU data is transfered from SM entity to SM entity using SIP MESSAGE requests. These SIP requests shall use the MIME type "application/vnd.3gpp.sms" for this purpose.
GSM 7 bit Default Alphabet
Each character represent 7bits. For more information see 3GPP TS 23.038 or ETSI GSM 03.38.
3GPP IMS Registration
On sending a REGISTER request, the IMS Client shall indicate its capability to receive traditional short messages over IMS network by including a "+g.3gpp.smsip" parameter into the Contact header according to RFC 3840.
Mobile-Originated SMS (MO-SMS)
The IMS Client sender shall build and populate RP-DATA message (RPDU encapsulating TPDU data string), containing all the information that a mobile station submitting an SMS message according to 3GPP TS 24.011 would place, for successful delivery. The sender shall parse and interpret RP- DATA, RP-ACK and RP-ERROR messages, containing all the information that a mobile station receiving an SM according to 3GPP TS 24.011 would see, in a SM submission or status report.
Figure 3: Signaling flows demonstrating successful UE originated SM submit procedure over IP as per 3GPP TS 24.341
** [1,2,4] RP-DATA (SMS-SUBMIT)
Below is represented the first request (RP-DATA(SMS-SUBMIT)) sent from the IMS Client to the P-CSCF.
The SIP MESSAGE (Figure 4) request sent from the IMS client to the P-SCSF carry the RP-DATA (Mobile station to IMS Network) message encoded as per 3GPP TS 24.011 chapter 7.3.1.2.
The SIP MESSAGE content (Figure 4) can be dissected as following:
RP-MESSAGE: 000000069133010000F019069133010000F011000A9133163254760000AA05F330BB4E07
RPDU:000000069133010000F019
TPDU (SMS-SUBMIT):069133010000F011000A9133163254760000AA05F330BB4E07
RPDU:000000069133010000F019
The RP-MESSAGE can be dissected as follow (Figure 6):
** [9,10,11] RP-ACK(SMS-SUBMIT-REPORT)
The SIP MESSAGE payload includes the RP-ACK message. Its RP-User-Data information element includes a TPDU of type SMS-SUBMIT-REPORT.
RP-MESSAGE:020009069133163254760080
For more information, see 3GPP TS 24.011 subclause 7.3.3 for RPDU (RP-ACK) data and 3GPP TS 23.040 subclause 9.2.2.2a for TPDU (SMS-SUBMIT-REPORT) encoding. If error occurs when decoding the message, RP-ERROR (3GPP TS 24.011 subclause 7.3.4) message is sent instead of RP-ACK.
Mobile-Terminated SMS (MT-SMS)
** [2,3,4] RP-DATA(SMS-DELIVER)
This request sent from the IP-SM-GW includes a vnd.3gpp.sms payload that includes the short message and routing information for the S-CSCF to forward the short message.
The payload includes the RP-DATA message. Its RP-User-Data information element includes a TPDU of type SMS-DELIVER.
The payload includes the RP-DATA message. Its RP-User-Data information element includes a TPDU of type SMS-DELIVER.
RP-MESSAGE: 0100069133010000F0001E069133010000F0040A91331632547600000000000000000005F330BB4E07
For more information, see 3GPP TS 24.011 subclause 7.3.1.1 for RPDU (RP-DATA) data and 3GPP TS 23.040 subclause 9.2.2.1 for TPDU (SMS-DELIVER) encoding.
** [8,9,11] RP-ACK(SMS-DELIVER-REPORT)
RP-MESSAGE:020109069133163254760080
** [8,9,11] RP-ACK(SMS-DELIVER-REPORT)
This request includes a vnd.3gpp.sms payload that includes the SMS-DELIVER-REPORT and routing information for the IP-SM-GW to forward the delivery report.
The payload includes an RP-ACK message. Its RP-User-Data information element includes a TPDU of type SMS-DELIVER-REPORT.
The payload includes an RP-ACK message. Its RP-User-Data information element includes a TPDU of type SMS-DELIVER-REPORT.
RP-MESSAGE:020109069133163254760080
For more information, see 3GPP TS 24.011 subclause 7.3.3 for RPDU (RP-ACK) data and 3GPP TS 23.040 subclause 9.2.2.1a for TPDU (SMS-DELIVER-REPORT) encoding.
If error occurs when decoding the message, RP-ERROR (3GPP TS 24.011 subclause 7.3.4) message is sent instead of RP-ACK.
If error occurs when decoding the message, RP-ERROR (3GPP TS 24.011 subclause 7.3.4) message is sent instead of RP-ACK.
References:
- 3GPP TS 23.038 - Alphabets and language-specific information
- 3GPP TS 23.040 - Technical realization of Short Message Service (SMS)
- 3GPP TS 24.011 - Point-to-Point (PP) Short Message Service (SMS) support on mobile radio interface.
- 3GPP TS 24.341 - Support of SMS over IP networks; Stage 3
- 3GPP TS 24.451 - Support of SMS and MMS over NGN IMS subsystem; Stage 3 [Endorsement of 3GPP TS 24.341 Release 7]
3 comments:
This is a great post! very helpful.
I have a question, though. In 3GPP TS 24.011, it mentions one octet ahead each information element as information element identifier(IEI) to identify what element it is, e.g. the IEI for RP-User Data is 0x41. but the spec doesn't mention IEI values for RP-Originator Address etc..which really confuses me because here I don't see IEI in your examples. Are they really required?
Hi Zhi,
Thanks for your feedback.
I updated the post (The RP-UDL was incorrect).
Regards,
Hey, it is so good to know about this. The business sms marketing is absolutely perfect way to get good number of sales. I am really very happy with the app that allows us to receive and send sms to slack. It is absolutely perfect and the best thing is that we did not have to spend a lot of money on it.
Post a Comment