How to get the voicemail infromation from CDR record?

I need to write a program to parse each CDR record in Master.csv file.
and I found it’s hard to tell the CDR record is a normal call or an voicemail.

Even if sometimes I can guess tihs CDR record is an VoiceMail from check the LastApp Field, but this is not the right way to do.

Anybody can give me some suggestions?
And also anybody knows the format of MSG000*.txt file which is in INBOX folder.


Why would that not be the correct way to create it ? FYI: I think if you used real time CDR’s it would be a bit faster then accessing a file every time.

What do you mean by format ? The first message would be MSG0001.txt, the second MSG0002.txt etc, etc.