Setting Voicemail Waiting Indication via SMS

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:
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 | AB | 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 | C8 | Data 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:
The second nibble’s first bit represents on/off:
The second nibble’s last 2 bits determine the type of message:
So 0xC8 stands for turn on voicemail message waiting and discard this message. |
1 octet | 0F | User Data Length or payload size (in characters). |
15 septets | 3190BB7C07D9DFE971B91D4EB301 | The 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:
- 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)
- 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)
- 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.