Setting Voicemail Waiting Indication via SMS

voicemail

As shown in an earlier post, the Data Coding Scheme (DCS) octet in the SMS PDU can be used to turn a regular text message into a flash message.

Another feature of SMS that is enabled through the use of the DCS is the Message Waiting Indication:

  • When someone leaves you a voicemail, the voicemail system communicates with the SMSC to send your phone a special SMS message that turns on the little icon on your phone that indicates that you have a new voicemail.
  • When you listen to your voicemail, the voicemail system also communicates with the SMSC to send your phone an SMS message that turns the little icon off again.

Using the DCS you can turn the voicemail icon on or off yourself.

This is an example of PDU to set a voicemail indication:

AT+CMGS=27
0001AB0B915121551532F400C80F3190BB7C07D9DFE971B91D4EB301<Ctrl-Z>

Here is what the individual octets represent:

SizeValueDescription
1 octet00We don’t supply an SMSC number.
1 octet01PDU type and options. This is a plain SUBMIT-PDU.
1 octetABOur message reference.
1 octet0BSize of the destination telephone number (in digits)
1 octet91International numbering plan.
6 octets5121551532f4This represents the destination and it translates to 1 512 555 1234
1 octet00Protocol identifier.
1 octetC8Data Coding Scheme. This is the value that causes the message to be a voicemail notification as opposed to a standard SMS. The first nibble can be:

 

  • 0xC for Message Waiting Discard (do not store the text that is in this message)
  • 0XD for Message Waiting Store (do store the text that is in this message

The second nibble’s first bit represents on/off:

  • 0×0 is a set indication inactive
  • 0×8 is a set indication active

The second nibble’s last 2 bits determine the type of message:

  • 0×0 stand for voicemail
  • 0×1 stands for fax
  • 0×2 stands for email
  • 0×3 stands for other messages.

So 0xC8 stands for turn on voicemail message waiting and discard this message.

1 octet0FUser Data Length or payload size (in characters).
15 septets3190BB7C07D9DFE971B91D4EB301The payload, also known as User Data. In this case, it is just GSM encoded text. This particular string represents “1 new voicemail”

And for completeness, here is a command to turn it off again:

AT+CMGS=28
0001AC0B915121551532F400C011EE37C85DBE83ECEFF4B8DC0EA7D973<Ctrl-Z>
Size Value Description
1 octet 00 We don’t supply an SMSC number.
1 octet 01 PDU type and options. This is a plain SUBMIT-PDU.
1 octet AC Our message reference.
1 octet 0B Size of the destination telephone number (in digits)
1 octet 91 International numbering plan.
6 octets 5121551532f4 This represents the destination and it translates to 1 512 555 1234
1 octet 00 Protocol identifier.
1 octet C0 Data Coding Scheme. 0xC8 stands for turn off voicemail message waiting and discard this message.
1 octet 11 User Data Length or payload size (in characters).
17 septets EE37C85DBE83ECEFF4B8DC0EA7D973 The payload, also known as User Data. In this case, it is just GSM encoded text. This particular string represents “no new voicemails”

You can play with the DCS field:

In the messages with these DCS the text is discarded:
  • 0xC8 – turn on voicemail (discard)
  • 0xC9 – turn on fax (discard)
  • 0xCA – turn on email (discard)
  • 0xCB – turn on another message (discard)
  • 0xC0 – turn off voicemail (discard)
  • 0xC1 – turn off fax (discard)
  • 0xC2 – turn off an email (discard)
  • 0xC3 – turn off other messages (discard)
In the messages with these DCS, the text is stored in the SMS inbox and the text is GSM-7 encoded:
  • 0xD8 – turn on voicemail (store)
  • 0xD9 – turn on fax (store)
  • 0xDA – turn on email (store)
  • 0xDB – turn on other messages (store)
  • 0xD0 – turn off voicemail (store)
  • 0xD1 – turn off fax (store)
  • 0xD2 – turn off an email (store)
  • 0xD3 – turn off other messages (store)
In the messages with these DCS, the text is stored in the SMS inbox and the text is UCS-2 encoded:
  • 0xE8 – turn on voicemail (store)
  • 0xE9 – turn on fax (store)
  • 0xEA – turn on email (store)
  • 0xEB – turn on other messages (store)
  • 0xE0 – turn off voicemail (store)
  • 0xE1 – turn off fax (store)
  • 0xE2 – turn off an email (store)
  • 0xE3 – turn off other messages (store)

The Data Coding Scheme is just one octet, but the spec 3GPP TS 23.038 dedicates a whole chapter to it.

Total
0
Shares
Related Posts
>