How to convert and play a wav file in an Avaya Modular Messaging Caller Application

One of my clients uses  Avaya Modular Messaging (aka Messaging Application Server). I recently needed to write a caller application to just hold a channel open for a few minutes. I was working in a quiet environment and didn’t want to sit in a cube and speak “blah blah testing 1 2 3 testing hello nothing to hear keep moving” into the phone for 30 seconds or more, so I figured I would use a wav file I had of some open source music. It’s not obvious, but Avaya Modular Messaging supports drag-and-drop of a wav file onto the “record a prompt” screen.

Drop the wav file onto the media controls

The problem is, the docs are pretty vague on the exact encoding that MAS supports for these files. Surprisingly, I couldn’t get Audacity to export a file in the right format. Nor could I use a variety of other GUI utilities.

I finally decided to try sox. This is a great open source utility that I typically use with Asterisk sound files. In the end, the following command converted the file to a format that MAS liked:

sox source_music_file.wav -eu-law -b8 -c1 -r8000 music4mas.wav

When I deployed the app, the audio was a little too loud, causing static and distortion on the channel. If you need to lower the volume, you can add a volume adjustment to the sox command line (on the input file!) with:

sox -v-0.1 music.wav -eu-law -b8 -c1 -r8000 music1v.wav

That did it for me. Happy caller-apping everyone.


Leave a Reply

Your email address will not be published.