Use message types

<< Click to Display Table of Contents >>

Navigation:  How to... >

Use message types

Message types are used to specify what the message means and how it should be sent. Message types are gateway specific, not all messages types will be understood by all gateways. In those cases the gateway will resort to its default message handling to send the message. In the Paging Gateway the message type is used to select which service is used to send the message. The following message types are the standard message types used in Diafaan SMS Server.

 

 

Text messages


Text messages can be split and later recombined into multiple SMS messages to increase the message length. Splitting the messages takes a couple of character spaces from each message. The maximum number of characters sent in each SMS message also depends on the character set used for the message.

 

sms.automatic

If possible the text is sent in the default GSM SMS alphabet. If the message contains characters that are not in the default alphabet the text is sent as unicode. Since an SMS unicode message has a maximum length of 70 characters and a text in the default GSM SMS alphabet has a maximum of 160 characters the number of characters that are sent to the phone will depend on the characters that are used in the message.

 

sms.text

The default GSM SMS alphabet is always used to send the message. Characters that are not available in the default GSM SMS alphabet are converted to question marks. The message length of a message sent with the default alphabet is usually 160 characters but some characters, like the € symbol take the place of two normal characters and will decrease the maximum message length.

 

sms.unicode

The message will always be sent in unicode text. This means that the maximum amount of characters in one message is always 70 characters, even if the message contains only characters from the default GSM SMS alphabet.

 

Flash message

If implemented on the GSM phone, flash messages are displayed directly on the phone's screen instead of being stored in the message inbox. You can send a flash message with one of the message types:

sms.automatic.flash

sms.text.flash

sms.unicode.flash

 

 

Binary messages


Binary message can contain up to 140 bytes per SMS message. In Diafaan SMS Server all bytes of the binary messages are encoded in two uppercase hexadecimal digits, for example the 'A' byte is encoded to 41. In addition to the data itself, a binary message can also contain a User Data Header. This UDH usually defines the purpose of the data.

 

sms.binary

Binary message can be sent in five ways: data only, with user data header, with data coding scheme, with user data length or with protocol identifier.

 

Data only:

<Data>

Data message:

3C3C6E0000F01CF00C

 

User Data Header plus Data:

<UDH>,<Data>

Data message:

04010203,3C3C6E0000F01CF00C

 

Data Coding Scheme plus User Data Header plus Data:

Usable for data or unicode messages

<DCS>,<UDH>,<Data>

Unicode message:

08,,0055006E00690063006F006400650020006D006500730073006100670065

Data message:

04,04010203,3C3C6E0000F01CF00C

 

Data Coding Scheme plus User Data Length plus User Data Header plus Data:

Usable for data, text or unicode messages

<DCS>,<UDL>,<UDH>,<Data>

Text message:

00,0C,,D4329E0E6A97E7F3F0B90C

Unicode message:

08,1E,,0055006E00690063006F006400650020006D006500730073006100670065

Data message:

04,0D,04010203,3C3C6E0000F01CF00C

 

Data Coding Scheme plus Protocol Identifier plus User Data Length plus User Data Header plus Data:

Usable for data, text or unicode messages with a special protocol identifier

<DCS>,<PID>,<UDL>,<UDH>,<Data>

Text message:

00,00,0C,,D4329E0E6A97E7F3F0B90C

Unicode message

08,00,1E,,0055006E00690063006F006400650020006D006500730073006100670065

Data message:

04,00,0D,04010203,3C3C6E0000F01CF00C

Empty text message with PID value 0x40 (Type 0, silent message):

00,40,00,,

 

See Send a WAP push message for an example of a binary messages.

 

sms.pdu

Only available for GSM Modem Gateways

GSM modems send SMS messages as binary data strings called Packet Data Units. If you use the sms.pdu message type you can send a fully customized SMS PDU.

 

smpp.pdu

Only available for SMPP Gateways

The SMPP protocol uses a binary Packet Data Unit that is different from the SMS PDU format. If you use the smpp.pdu message type you can send a fully customized SMPP PDU.

 

USSD commands


USSD is a standard for transmitting information over GSM signaling channels. It is mostly used as a method to query the available balance and other similar information in pre-paid GSM services. The function that is triggered when sending USSD is network-dependent and depends on the specific services the operator is offering.

 

gsm.ussd

Only available for GSM Modem Gateways

The USSD code should be sent in the to field of the message. The response is sent back as a received SMS message.

 

Example USSD codes:

   * *101#

   * *109*72348937857623#