longMessageMode - a crucial parameter in Alaris HTTP API

Due to HTTP messaging having no clear specification, some of the message processing parameters must be defined by users to allow for smooth and standardized workflow. One of the notable parameters included in Alaris HTTP API is longMessafeMode, which determines how a message, fit to be segmented by SMPP standards, will be processed.

There are several possible values for this parameter (please bear in mind, that this parameter is being sent to the system by client and must be defined on client's side):

cut (trim message text to 140 bytes) - shortens the message leaving only first 140 bytes to be sent.

split and split_sar - split the message according to the logics described below. The difference between them is in the header to be used, for split it is UDH header, for split_sar it is sar accordingly.

single_id_split - split the message but return the message ID common for all segments

payload - message_payload field is used for sending the message text

split_or_payload: serves for sending long messages received over HTTP to SMPP vendors. The mode is not supported if several numbers have been received in the dnis parameter within a single request from the client. When the Send text in payload option is enabled in the vendor channel, the message will be sent in the payload field as a single submit_sm packet. Also, a single delivery report is expected for it, whereas the client will be sent as many reports as the number of received parts. Besides, a single EDR will be written, therefore, the bill by segments option must be set in the client product for correct billing of the client. In case Send text in payload option is disabled, the message will be split.

The default value is "cut". It is applied when the parameter isn't defined.

Cut and split options operate based on number of bytes in the message text, which in turn is determined by message's datacoding. Let's use an example message to demonstrate (pipeline | symbol will be used for segment division):

- dataCoding = 0, 1 or 3: one message can contain up to 160 bytes. If more: segment count = 'message length in symbols / 153 symbols' (or: 'message length in bytes / 153 bytes') Ex.:

Hello, this message contains an activation code for your app. Please, do not tell it to anyone. The code will be valid for 15 minutes. In case it expires| before you use it - please request another one. The code is: 123456.

- dataCoding 2, 4 - 7: one message can contain up to 140 bytes, if more – segment count = 'message length in symbols / 134 symbols' (or: 'message length in bytes / 134 bytes') Ex.:

Hello, this message contains an activation code for your app. Please, do not tell it to anyone. The code will be valid for 15 minutes. |In case it expires before you use it - please request another one. The code is: 123456.

- dataCoding 8: one message can contain up to 140 bytes, if more – segment count = 'message length in symbols / 67 symbols' (as 1 symbol occupies 2 bytes, that is: 'message length in bytes / 134 bytes') Ex.:

Hello, this message contains an activation code for your app. Pleas|e, do not tell it to anyone. The code will be valid for 15 minutes.| In case it expires before you use it - please request another one.| The code is: 123456.

So it is crucial to use the right datacoding and longMessafeMode parameters when dealing with long messages over HTTP, as having a wrong one may result in parts of the message being lost, or incorrect billing.

You can find the description of this and other possible HTTP parameters in Alaris HTTP API.

 

AKBSMS - Alaris Knowledge Base

Related Questions:
Incomplete message
HTTP segmented message
Message cut off
Not receiving full message
Translation cuts off
LongMessageMode
HTTP segments
HTTP payload
Cropped message

Link to this Article: https://helpdesk.alarislabs.com/en/knowledge_base/article/254/category/131/