cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1119
Views
0
Helpful
1
Replies

How to parse msExchRecordedName from Linux?

kartik_subbarao
Level 1
Level 1

I'm trying to parse the recorded name attribute in Active Directory (msExchRecordedName) on a Linux system. I'm using the OpenLDAP version of ldapsearch:

% ldapsearch -x -t -h ad.server.name cn=username msExchRecordedName

I get the binary contents of the msExchRecordedName attribute successfully dumped to a file in /tmp.

But here's where I get stuck. This file seems to have no resemblance to an audio file. It doesn't have a WAV header, for example.

I checked the encoding format for voice recordings:

http://www.cisco.com/en/US/docs/voice_ip_comm/unity/white/paper/cuaudiocodecs.html#wp67287

This shows up as:

.wav
Microsoft Mu-Law
64kbs
8khz
8bit
mono

I then try using the sox command to generate a wav file with this format, from the raw data:

sox -c 1 -r 8000 -t raw -U msExchRecordedName.raw recordedname.wav

But when I play this file, I get a static-filled tone. I tried this with a number of users whose name recordings should be correct, but can't get it to work.

Any suggestions on how to decode and parse this attribute?

    -Kartik
1 Reply 1

kartik_subbarao
Level 1
Level 1

Figured it out. The binary contents of the msExchRecordedName attribute
are actually stored in UTF-8. The UTF-16LE values can be recovered with
this:

iconv -f utf-8 -t utf-16le msexchrecordedname.raw > recordedname.wav.base64

As the extension implies, the resulting UTF-16LE file is a base64 file
which can be decoded to reveal the WAV file.

    -Kartik