Professional Documents
Culture Documents
Version 1.0
Introduction
Audience Focus
Pre-sales team Developers
Provide the basics on this feature Provide a method to send multi-part text MT SMS via Netsize Messaging Gateway
Applications
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
Table of Contents
1.
a) b) c) d) a) b)
2.
3.
a) b)
Samples
Segmentation UDH setting Text message encoding & insertion Additionnal parameters setting
Multi-part text MT SMS Request Sample for Netsize API for SMS in C++ Multi-part text MT SMS Request Sample for Fast HTTP Customer Interface (HTTP GET)
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
the end-user will only receive the first 160 characters. The rest of the message will not be transmitted to the end-user.
4
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
A feature that enables to send a text message longer than 140 bytes by:
splitting it up into several smaller parts (Segmentation) and sending each part as a single SMS message so that the receiving mobile phone is able to automatically reassemble the original message (Reassembly).
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
c)
Max. Size of Whole Message Max. Size of Each part Max. nb of parts Handset Compatibility
Main Features
Vary from about 300 characters to over 1000, depending on the mobile phone. Netsize recommends to split the message into 2 messages. (3 at most) 152/153 characters in Windows-1252 (depending on the type of UDH used) In theory, you can concatenate up to 255 SMS. However, most mobile phones support multi-part texts including up to 6 or 8 parts. Multi-part text SMS are support by most mobile phones, except first-generation mobile phones.
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
d) Availability
Coverage
Standard SMS traffic only
Spain France
Customer Interfaces
Netsize Messaging Gateway Customer Interface Netsize API for SMS HTTP Fast HTTP SMPP XML over HTTP Multi-part text MT SMS Supported Yes No Yes No No
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
a) Main Steps
1. 2. 3. 4. 5. Segmentation UDH (User Data Header) setting Text message encoding & insertion Additional parameters setting Sending
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
S ending
R eassem bly
S M S 1/3
UDH
S M S 2/3
UDH
S M S 3/3
Segmentation Text Message must be segmented into smaller parts & encoded in binary
UDH (User Data Header) setting Each part of the multi-part includes a UDH. It will be used by the mobile phone to combine each part of the multi-part in correct order.
Note: Since each part of the multi-part starts with a UDH, you can send less characters than in a classic SMS message
Sending
Reassembly The mobile phone reassembles Each part of the messages into 1 long the multi-part message. If the parts arrive in is sent as a random order, it checks that all single SMS parts have been received before message. putting them together.
I.
Segmentation
You split the text message of your multi-part into several parts. Each part can include a text message of up to:
153 characters (if you use a UDH of type '00') 152 characters (if you use a UDH of type '08')
Example:
Your text message includes 200 characters. You want to use a UDH of type '00'. You multi-part will be split in two parts.
Part 1 includes the first 153 characters of the text message. Part 2 includes include the 47 following characters.
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
10
II.
The UDH is always set in the first bytes of the SMS. It includes segmentation information 2 types of UDH (identifiers):
Type "08"
Defines a multi-part message with a 16-bit reference number Enables to define up to 65000 different multi-part reference numbers Enable to send up to 152 characters per SMS.
Type "00
Defines a multi-part message with a 8-bit reference number. Enables to define up to 256 different multi-part reference numbers Enables to send up to 153 characters per SMS.
UDH Components
Length
Identifier Length
Reference Number
Information Element
Data
Number of parts Part number in sequence
Length
1 byte
1 byte Indicates that the SMS is a multi-part. 2 possible Ids: 0x00 or 0x08
1 byte
4 octets
Description
05
Value Example & interpretation
5 bytes follow
00
Indicator for multipart text messages
03
3 bytes follow
5F
Multi-part Message ID
02
The multi-part has 2 parts
01
This is part 1
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
11
III.
Each segment of your text message must be encoded in binary. In each part of the multi-part SMS, you must insert your text message in a buffer before putting it in the Message field of your MT request.
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
12
IV.
Parameter
Explanation
Indicate to Netsize gateway that this is a multi-part text message (characters are not compressed) Indicate to Netsize gateway that the SMS message include a UDH
Value
Data Type
Long
Binary
TPUDHI
"EXTENDED.TPUDHI"
bTPUDHI
True
Bool
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
13
3. Samples
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
14
a)
Multi-part text MT SMS Request Sample for Netsize API for SMS in C++ (Part 1/3)
MAX_MULTIPART_TEXT_LENGTH 153
#define
CAGCppEndpoint oEndpoint; // The connection of the Endpoint to the Netsize gateway is not detailed in this exemple. CAGArray oRequests; // Filling login request slots // A frame is created containing the AG_EXTENSION_REQUEST slot that contains the AGSMS_REQ_LOGIN slot which // means that this frame contains login information. CAGFrame oLogin; oLogin.SetSlotValue(AG_EXTENSION_REQUEST, AGSMS_REQ_LOGIN); // Login provided by Netsize oLogin.SetSlotValue(AGSMS_REQSLOT_LOGIN_NAME, _T("mylogin")); // Password provided by Netsize oLogin.SetSlotValue(AGSMS_REQSLOT_LOGIN_PWD, _T("mypassword")); oRequests.AddArraySlot(oLogin); // Message Request CAGString sInitialMessage = _T("this is a test message that contains more than 160 characters. We have to split it into several parts before sending it, otherwise the message will be truncated and will become meaningless.");
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
15
a)
Multi-part text MT SMS Request Sample for Netsize API for SMS in C++ (Part 2/3)
// we check if the message has to splitted or not if(sInitialMessage.GetLength() > 160) { BYTE nNumberOfParts = (sInitialMessage.GetLength() / MAX_MULTIPART_TEXT_LENGTH)+1; BYTE nMessageID = 123; for(int nPartIndex = 0; nPartIndex < nNumberOfParts; nPartIndex++) { CAGFrame oSend; CAGString sTempMesssage = sInitialMessage.Mid((nPartIndex)*MAX_MULTIPART_TEXT_LENGTH, MAX_MULTIPART_TEXT_LENGTH); CAGBuffer oMessage; oMessage += (BYTE)0x05; // Length of the full UDH oMessage += (BYTE)0x00; // Multi-part Indicator oMessage += (BYTE)0x03; // Length of the Indication oMessage += (BYTE)nMessageID; // Multi-part Message-ID oMessage += (BYTE)nNumberOfParts; // Number of Part oMessage += (BYTE)nPartIndex+1; // Current Part oMessage += sTempMesssage; oSend.SetSlotValue(AG_EXTENSION_REQUEST, AGSMS_REQ_SEND); oSend.SetSlotValue(AGSMS_REQSLOT_SEND_TARGET, _T("+3400112233")); oSend.SetSlotValue(AGSMS_REQSLOT_SEND_MESSAGE, oMessage); oSend.SetSlotValue(AGSMS_REQSLOT_OPT_SEND_EXTENDED_PARAMS _T(".") AGSMS_REQSLOT_OPT_SEND_EXTENDED_TPUDHI, BOOL(TRUE)); oSend.SetSlotValue(AGSMS_REQSLOT_SEND_BINARY, 3L);
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
16
a)
Multi-part text MT SMS Request Sample for Netsize API for SMS in C++ (Part 3/3)
oRequests.AddArraySlot(oSend);
} else {
CAGFrame oSend; oSend.SetSlotValue(AG_EXTENSION_REQUEST, NMG_REQ_SEND_SMS); oSend.SetSlotValue(AGSMS_REQSLOT_SEND_TARGET, _T("+3400112233")); oSend.SetSlotValue(AGSMS_REQSLOT_SEND_MESSAGE, sInitialMessage); // More slots can be added...
oRequests.AddArraySlot(oSend);
// Filling sent frame. // The send frame is created. In this frame, the AG_EXTENSION_REQUEST slot contains an array (previously // created) containing useful information used to send sms messages. CAGFrame oSendFrame; CAGFrame oSendParams; // Not used oSendFrame[AG_EXTENSION_REQUEST] = oRequests; // The oSendFrame frame is sent. AGReturnCode nReturnCode = oEndpoint.Send(oSendFrame, oSendParams); // the analyse of nReturnCode is not detailed in this example.
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
17
b) Multi-part text MT SMS Request Sample for Fast HTTP Customer Interface (HTTP GET)
GET /Request.aspx ?sExtensionName=AGSMSExt%5ENetsize &sEndpointName=URLEncodedEndpointName &sLogin=URLEncodedLogin &sPassword=URLEncodedPassword &sTarget=%2B33612345678 &oMessage=0500031202017468697320697320612076657279206C6F6E67206D657373616765207468617420 77696C6C20626520656E636F64656420696E746F20322070617274732E204561636820706172742077696C6C2 062652073656E742073657061726174656C7920616E64207468652068616E647365742077696C6C2070617374 207468652074776F20706172747320746F2073686F77206F6E6C79206F6E65 &nClassType=1 &nBinary=3 &bTPUDHI=1 oMessage = [UDH Length = 05][UDH-Information Element [Identifier = 00][Length = 03][Data [ReferenceNumber = 12][NumberOfParts = 02][PartNumberInSequence=01]]][text=this is a very long message that will be encoded into 2 parts. Each part will be sent separately and the handset will past the two parts to show only one] using Windows 1252 Encoding GET /Request.aspx ?sExtensionName=AGSMSExt%5ENetsize &sEndpointName=URLEncodedEndpointName &sLogin=URLEncodedLogin &sPassword=URLEncodedPassword &sTarget=%2B33612345678 &oMessage=050003120202206D657373616765 &nClassType=1 &nBinary=3 &bTPUDHI=1 oMessage = [UDHLength = 05][UDH-Information Element [Identifier = 00][Length = 03][Data [ReferenceNumber = 12][NumberOfParts = 02][PartNumberInSequence=02]]][text= message] using Windows 1252 Encoding
Netsize 2008 - All rights reserved For internal use only - Version 1.0 -
18