Discussing the nuts and bolts of software development

Tuesday, June 17, 2008


Obtaining the voicemail number on Windows Mobile phones

The voicemail number, if available, may be stored in various locations on the Windows Mobile phone device depending on the type and carrier. In most cases, the number will show up somewhere in the registry. From experience I have found them in one of several locations under HKEY_CURRENT_USER:


On some GSM devices however the number isn’t always updated properly in the registry. In that case you would have to fetch it direct from the SIM card. In fact it is probably safest to fetch it from the SIM card first since this ensures a more accurate number.

If you do some internet searches and dig through some of the 3GPP specifications for (U)SIM (i.e. 3GPP TS 31.102, 51.011) you will find that the voicemail number is stored in the EFMBDN (Mailbox Dialing Numbers) file located at either 6FC7 for 3G devices or 6F17 for 2G.

We can get the voicemail file from the SIM using the SIM Manager API. Note that some of these are privileged functions. You also have to make sure to add “cellcore.lib” as a dependency to your project. The code would look as follows:

// include the SIM Manager API

// set the voicemail addresses
#define EF_MBDN_2G 0x6F17
#define EF_MBDN_3G 0x6FC7

std::string getVoicemailNumber()

std::string number;
HSIM hSim = 0;

// initialize
hr = SimInitialize (0, 0, 0, (LPHSIM)&hSim);

if (S_OK == hr)
DWORD address = EF_MBDN_2G;
SIMRECORDINFO simRecordInfo = {0};
simRecordInfo.cbSize = sizeof(SIMRECORDINFO);

// check the 2G address for the file
hr = SimGetRecordInfo(hSim, address, &simRecordInfo);

// The file may hold more than one number for devices with
// multiple lines; however we will assume only one line.
// A valid file needs to be "linear" type and at least 14 bytes.
if ( S_OK != hr ||
SIM_RECORDTYPE_LINEAR != simRecordInfo.dwRecordType ||
simRecordInfo.dwItemCount == 0 ||
simRecordInfo.dwSize < 14 )
// no valid 2G file, check the 3G address
address = EF_MBDN_3G;
memset(&simRecordInfo, 0, sizeof(simRecordInfo));
simRecordInfo.cbSize = sizeof(SIMRECORDINFO);
hr = SimGetRecordInfo(hSim, address, &simRecordInfo);

if ( S_OK == hr &&
SIM_RECORDTYPE_LINEAR == simRecordInfo.dwRecordType &&
simRecordInfo.dwItemCount > 0 &&
simRecordInfo.dwSize >= 14)
// allocate the specified size
LPBYTE buf = (LPBYTE)LocalAlloc(LPTR, simRecordInfo.dwSize);
DWORD bytesRead = 0;

// read the SIM file
hr = SimReadRecord(hSim, address, SIM_RECORDTYPE_LINEAR, 1,
buf, simRecordInfo.dwSize, &bytesRead);

if (S_OK == hr && bytesRead >= 14)
// handle the bytes received

Now that we have the file, we need to interpret the bytes into a useful number. The 3GPP specifications show the EFMBDN structure as follows:

Bytes Description M/O Length
1 to X Alpha Identifier O X bytes
X+1 Length of BCD number/SSC contents M 1 byte
X+2 TON and NPI M 1 byte
X+3 to X+12 Dialling Number/SSC contents M 10 bytes
X+13 Capability/Configuration2 Record Identifier M 1 byte
X+14 Extension 6 Record Identifier M 1 byte

The first few bytes (1 to X) are the optional identifier. In most cases it will just show the words “voicemail”. The last 14 bytes describe the voicemail number with up to 10 bytes representing the number as binary coded decimals. For our purpose we can ignore Capability/Configuration2 Record Identifier and Extension 6 Record Identifier. The way to interpret the bytes is described in the 3GPP specifications 31.102 clause for EFADN (Abbreviated dialing numbers). We can proceed to get the number from the bytes as follows:


// use the last 14 bytes
char data[14];
memcpy(&data, &buf[bytesRead-14], 14);

// byte 0 (X+1) is the length of dialing number
int length = data[0];

std::stringstream ss;

// TON and NPI determines the type of number
// see 3GPP specifications 31.102 clause
if (0x90 == (0xF0 & data[1]))
// add the + for international numbers
ss << '+';

// convert the BCD bytes to Ascii chars
for (int idx=2; idx < length+1; idx++)
// break the byte into 2 nibbles
BYTE nibble[2];
nibble[0] = data[idx] & 0xF;
nibble[1] = (data[idx] >> 4) & 0xF;

for (int i=0; i<2; i++)
if (nibble[i] == 0xA)
// 0xA represents a *
ss << '*';
else if (nibble[i] == 0xB)
// 0xB represents a #
ss << '#';
else if (nibble[i] < 0xA)
// add the number
ss << (char) ('0' + nibble[i]);

// set the voicemail number
ss >> number;

Now that we have the voicemail number we should free the buffer and sim handle and return the number:

// free the buffer
LocalFree( buf );

// deinitialize
SimDeinitialize( hSim );
return number;


There are a couple of things to note. Here I’ve handled both the 2G and 3G cases, however it is probably better to detect which type is being used beforehand. Also note that I have assumed the case of only one voicemail number. For a multi-line scenario you would have to check if there are more than one number stored in the SIM file. For a more detailed look on how the numbers are stored please refer to the 3GPP specifications.


Thanks, Buddy.

I am sure that education means a lot these days. You can even check this out if you want to know more about writing bibliography.
The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Project Centers in Chennai.

Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully
McAfee programming gives the digital security services to ensure your hardware information.Install mcafee from mcafee.com/activate |
Keep yourself secure with McAfee security .
McAfee activate on your computer.
How to Uninstall or disable McAfee WebAdvisor ?
What is McAfee Safe Connect VPN ?
How to login to McAfee account ?
How to know when does my McAfee Subscription Expire ?

Hiya very cool web site!! Man ...Superb .. I’ll bookmark your site and take the feeds additionally?
McAfee is quick and easy to install.
McAfee cloud security
disable McAfee notification

How to access NETGEAR router login using the nighthawk app?
NETGEAR router login
NETGEAR router setup
NETGEAR Nighthawk setup
NETGEAR WiFi extender setup

QuickBooks is a set of bookkeeping software, and the QuickBooks install diagnostic tool is a tool for repairing and diagnosing technical issues that may arise during the installation process.
I find all of this information fascinating, and it is full of useful information, so I'll be following your blog to learn new things.

Thankyou For Sharing Such An Excellent Post Enjoyed Reading It


[url=https://microsof365setup.com/]microsoft365 setup[/url]

Blink Mini Indoor camera helps to keep eye on your house all round the clock. Cameras have become a necessity now and this blink camera offers a great choice. If you have any query, you can visite my site.
Thanks so much for sharing this nice blog.
If you want to an easy setup guide of ap setup, you can visite my site.
To get started with the Meshforce M3 login and setup process, you can download the Mesh app. Make sure that you install the latest version of it. Your internet connection must be stable and smooth. Get expert supervision if you face any doubts or issues with the login or setup process. You can also visit the website for any further reference.
Meshforce M1
You can Belkin Router Login using the default IP address anytime. Just make sure that you are using a compatible browser only. Once you input the default IP address, you can press enter and the login window appears. Fill in the default login credentials and you will access the control panel of the Belkin router. Chat with our experts now on the toll-free number if you have any issues.

If you want good quality plants online then you can buy these indoor plants in Saharanpur online by visiting our website.best place to buy online plants
Here are the guide steps to start MSRM US750 Extender Setup via or via WPS.
bose soundbar 500 factory reset without remote
Follow the instructions from our website to successfully download and install Download Brother Printer Drivers to enhance the current features of the printer.
To login to the Asus wireless router, use the default web address router.asus.com. Enter the default web address in the web browser and you will reach the Asus Router Login page. Put down the username and password of your router. After that, click on the Login button and you will be logged into the router successfully.
The Google Nest Camera is one of the best yet most reliable smart home security cameras. The Nest camera helps you safeguard your kids, parents, pets, and other things in your home from security break-ins or intrusions. To set up the Google Nest camera, you can download the Nest app or the Google Home app.
Nest Camera Login
Hello friends I am Camila Jones and I am software developer, recently I have created an amazing website, which tells you ip location of your device with just one click on instant ip address lookup .
If you are facing technical issues while accessing setek web address, then feel free to contact us. and you can solve your problem.
Der Einrichtungsprozess des Devolo dLAN 550 duo+ ist sehr einfach und unkompliziert. Folgen Sie den hier angegebenen Schritten, um Devolo dLAN 550 duo+ powerline zu konfigurieren.
dlan 550 duo+ einrichten
D-LINK AC1200 Wi-Fi Range Extender DAP-1610 is one of the best plug-in repeaters , You can set up the extender by following a few simple steps.
This Mac filtration process helps you to remove devices from your network or create a whitelist for allowed devices that can connect to the internet.

The find my synology is a web assistance address that allows you to access all the stored data from anywhere. Through this web utility address , you can easily use it to access the Synology Assistant desktop utility.

We are provide the Edimax Router troubleshooting tricks & tips to fixing its occurring issue. Once you have our services you can get in touch with us and get an answer to your query.
After you set the date and timing, you have to connect your thermostat to the WiFi network. Perceive the instructions carefully to finalize the setup operation.
honeywell total connect comfort

With a powerful signal wifi booster, it helps to penetrate all the floors and the walls to expand the internet connection. It can cover 3000 square feet of the area very effectively and is specially designed for the home and the small office use.
If you feel that your crystal is heavier than before or maybe it has lost its shine then it just might need some energy to recharge. We can bring in chanting bowls, singing bowls, and a bell to recharge a crystals . Sound allows a pitch to wash over an area bringing the same vibrations as the tone.
The <a href = "https://devicessetup.com/netgear-nighthawk-raxe500-router/> Netgear Nighthawk RAXE500 router's </a> wifi coverage is 1500 sq. ft. You can connect this router with this computer or smartphone through the wifi or Ethernet cable. Install your wireless dual-band router with given steps and all the steps point to point.
TP-Link Omada AC1200 Extender delivers a maximum of wifi networks up to 1200 Mbps in multiple devices at the same time without any issue. There are some steps for the TP-Link Omada AC1200 Extender installation.
If you want to know the process to reset garbage disposal , read our article properly, here you will be completely aware of the process of resetting garbage disposal properly.
Our team will provide you with a high-end solution for complex and irritating setup problems in Yeedi k650 Robot Vacuum cleaner

Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?