Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Phone number and number of msgs 1

Status
Not open for further replies.

oleggrk

MIS
Feb 24, 2005
59
Hello everyone,

Does somebody know where IP Office keeps total number of messages (could be a simple count I guess) and the phone number of the person who left the message for the particular mailbox? I'm trying to automate the message processing so that they will be moved to client's folder after processing just to keep history of transactions...

Thanks a lot.

Oleg
 
It is inherited with the IPO and VMPRo. There is not a file that has total number of messages. Only files that have details about each file. This info does not include SMDR info.

Hence why we are creating a Voicemail Archive Manager which will support these options.

 
Thanks for your reply, cjinsocal581.

Do you know the file name(s) where this information is stored? I mean the phone numbers... It must be somewhere since when I'm logging into my voicemail box, it knows the number from where this message came...


Oleg
 
When you say phone numbers, do you mean what the caller id info was for the call?
 
That information is generated by the IP Office and is stored into binary form in the VMPro database.

Unfortunatelky it is not user accessible.
 
Oh well, thanks anyway... I thought I will try to find out...
 
This is not 100% true.
It stores some of the informaion in the actual WAV file as well. Which is where VMPro pulls the Call Time from as well (I've tested this and spoofed recorded voicemail messages). If you are programatically inclined, if you open up the WAV file in a hex editor you will see the information. Check at offset 0x0000004C (Decimal 76). That has the Caller ID information.
 
Thanks a lot, mallgood!

That is a very useful information....

Oleg
 
If anyone wants I have completely disected the .WAV files and have all the offsets for all the IPO specific information. The thing you have to be careful of is that the .WAV file format header can change a bit and expand which will cause problems with offsets.

Anyone with interest?
 
I will just post the info here, so everyone can get to it easy:

First it helps to know about the WAV file format. Here are some good docs.

If you read through those.
Then here are the offsets.
First skip the first 8 bytes.
Then read the next 4. Make sure they are "WAVE". Then read the next 4 bytes. Check to see if they are "ALCH". If not, read the next 4 bytes and skip that many more. (eg if the 4 bytes said 16 then you would skip 16 more bytes).
Keep doing this till you come to one that *does* give you "ALCH" (this is the "chunk" ID btw).

One you have located the ALCH chunk, the offsets are as follows.
Offset 0 Chunk ID - should *ALWAYS* be "ALCH"

Offset 4 Chunk Size - From what I can tell, should always be 100. (probably a carry over from Alchemy)

Offset 8-36 Unknown - There appears to be nothing here.

Offset 37 Internal/External. - I *believe* this signals whether it was an internal vs. external call. Haven't checked. this.

Offset 38-39 Unknown

Offset 40-71 (32 bytes) Caller ID - This is the caller ID information.

Offset 72-103 (32 bytes) Displayed Call Info - this is the information that was displayed when the call came to the user. Eg - if it was transfered, etc.

Offset 104-108 (4 bytes) Call time - This is the time offset (in seconds) to be added to the "magic" time to get the real date/time of the voice message.

That's It! Fairly easy to decode. There are a few things there that I am not sure on. I'm sure that there are flags for the different priorities etc, but I haven't had the time to finish reverse engineering it.

HTH somebody. It took me about 2 days to get that much.

Oh. The magic date seems to be: #12/31/1900 5:00:00 PM# Or there abouts. It seems to take into accound daylight savings etc, so I'm not sure on the exact magic date/time. (I'm MST and that seems to be right).

Anyways. If you have questions, let me know.
 
If I get bored in the next few days (possibly likely >_<) I will see if I can decipher the priority codes, etc.
 
Mallgood,

I can't seem to decipher the date time. I can however read the obvious "modified" date which appears to be the original date that is was created. Any ideas on the Date time?
 
I use mostly VStudio .NET 2003. The code I wrote was all done in VB.NET. I started doing it in C# but ran into problems. So I switched to VB.NET
I don't know if you are familiar with VB.NET (I know I wasn't when I started playing :) )but it might help you decode the date/time if I give you my few lines that relate to the date/time:

Private OriginDateTime As DateTime = "#12/31/1900 5:00:00 PM#"

Dim TempUInt32 As UInt32
TempUInt32 = System.BitConverter.ToUInt32(AvayaChunk.ChunkData, 96)
RecordTimeinSeconds = System.Convert.ToInt64(TempUInt32)
Dim FileTimeSpan As TimeSpan = New TimeSpan(RecordTimeinSeconds \ SecondsPerDay, 0, 0, RecordTimeinSeconds Mod SecondsPerDay)
Me.AvayaDateTime = Me.OriginDateTime.Add(FileTimeSpan)
 
I do not know how reliable this is yet since I am still testing, but I ran this and it seems to bring back the original dte the file was created:

Dim dt2 As DateTime = Directory.GetLastWriteTime(txtFILE.Text)

txtDateCreated.Text = dt2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top