Setting Voicemail Waiting Indication via SMS
Posted Under: SMS
- Sending out an SMS in text mode
- Sending out an SMS in PDU mode
- More on the SMS PDU
- Sending a flash SMS message
- What are EMS messages?
- Combining SMS messages
- WAP Push over SMS
- WAP Push SMS encoding
- EMS and WAP Push support
- Another WAP Push over SMS encoding
- SMS based applications
- Text formatting with EMS
- GSM-7 Encoding with the GNU iconv library
- How to pack GSM-7 characters into septets
- References
- Setting Voicemail Waiting Indication via SMS
- SMS via Email
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 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 a 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 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 a 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 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 cause 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 a 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 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 other message (discard)
- 0xC0 – turn off voicemail (discard)
- 0xC1 – turn off fax (discard)
- 0xC2 – turn off email (discard)
- 0xC3 – turn off other message (discard)
- 0xD8 – turn on voicemail (store)
- 0xD9 – turn on fax (store)
- 0xDA – turn on email (store)
- 0xDB – turn on other message (store)
- 0xD0 – turn off voicemail (store)
- 0xD1 – turn off fax (store)
- 0xD2 – turn off email (store)
- 0xD3 – turn off other message (store)
- 0xE8 – turn on voicemail (store)
- 0xE9 – turn on fax (store)
- 0xEA – turn on email (store)
- 0xEB – turn on other message (store)
- 0xE0 – turn off voicemail (store)
- 0xE1 – turn off fax (store)
- 0xE2 – turn off email (store)
- 0xE3 – turn off other message (store)
The Data Coding Scheme is just one octet, but the spec 3GPP TS 23.038 dedicates a whole chapter to it.







Reader Comments
Jeroen:
Your contribution is incredible.
Thanks again!.
Regards
Franco
Jeroen:
Tried DCS(0xDA) Trun on e-mail (Store).
Works perfect.
A sms is stored at my inbox OK.
Is there a way to make such sms as a wap push sms?
What I actually do is to send a text link and from there the broweser, via get, takes you to the URL.
Using a Carriage Return, I send two links; one goes to the ‘mail server wap main page’ and the second one automatically ‘downloads via sms the headers of the mail’ received.
If such message could be turned into a wap push, I think
it would be much better!:
Regards
Franco
Franco,
No, you can’t do this with WAP push. There is a way of doing it without setting the DCS though. There is an UDH IE that has the same effect as setting the message waiting flags in the DCS. It has an additional feature: it lets you set the message count (how many message are waiting). I haven’t seen any device showing the message count though.
Here is a brief description of the IE
- IEI = 0×01 (this identifies this IE as a “special SMS message indication”)
- IE length = 0×02 (this IE always has 2 octets of data)
- 1 Octet = message type
- 1 Octet – message count
The message type is
- 0×00 for voice message
- 0×01 for fax message
- 0×02 for email message
- 0×03 for other message
Set the first bit of the message type (0×80) to let the device store the message, discard is the default
Jeroen
Jeroen:
This is what you have up here !:
AT+CMGS=27
0001AB0B91
0585785777F5
00
C8
0F
3190BB7C07D9DFE971B91D4EB301
This is what I have been working on:
1 octets 0×09 header length is 9 octets. UDH
1 octet 0×01 IEI 0×05 source and dest. port.
1 octet 0×02 IEDL. Content is 2 octets.
1 octet 0×02 Message type. 00(Voice) 02(Mail)
1 octet 0x0F Message count.
1 octet 0×00 IEI 0×00 concatenation information
1 octet 0×03 EIDL. Content is 3 octets.
1 octet 0xF0 Reference number
1 octet 0×01 Total 1 parts
1 octet 0×01 This is the 1st (and only) part
This is what I came up with:
AT+CMGS=35
0001AB0B91
0585785777F5
00
090102020F0003F00101
3190BB7C07D9DFE971B91D4EB301
I get errors and I have tried about twenty different arrangements and do not seem to come up with a successful message.
Your help will be appreciated.
Regards
Franco
Franco,
I think you forgot to the the UDH bit in the first octet of the PDU (you have 0×01 for SUBMIT PDU, change this to 0×41 for SUBMIT PDU + UDH). You don’t need the concatenation IE.
Jeroen
Thanks a ton for the detailed explainations….Really useful and easy to understand…Much Appreciated !
So Jeroen, Franco, Vikrant,
What was the final PDU “string” necessary to send a send the message count along with the message waiting indicator. I’ve been having some trouble replicating your results. Thanks!
-Karl
Got it!
0041AB0B911234567890F100C806040102000100