?
Solved

Asterisk: How do I reduce the volume of the MOH

Posted on 2006-11-09
5
Medium Priority
?
3,778 Views
Last Modified: 2011-10-03
In order to resolve some performance related issues with using the older MOH conf file format, we update the syntax of the file to the newer format, per the instuctions on the asterisk wiki (http://www.voip-info.org/wiki-Asterisk+config+musiconhold.conf) and made copies of the mp3's in raw format.  After doing so, the volume of the MOH increased to an unacceptable level.  I've looked over the asterisk wiki but have not found anything that shows how to reduce the playback volume.

We are running version 1.2.12.1 and have installed the asterisk-addons.  Here are the before and after configs.

Old musiconhold.conf
; Music on hold class definitions

[classes]
default => mp3:/var/lib/asterisk/mohmp3
loud => mp3:/var/lib/asterisk/mohmp3
random => quietmp3:/var/lib/asterisk/mohmp3,-z


New musiconhold.conf
; Music on hold class definitions

[default]
mode=files
directory=/var/lib/asterisk/mohmp3
random=yes

[raw]
mode=files
directory=/var/lib/asterisk/mohraw
random=yes
0
Comment
Question by:FishMonger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 36

Expert Comment

by:grblades
ID: 17913087
The only way to reduce the playback volume is to reduce the volume of the audio files during the conversion process. If you use the SOX program you can specify the -v option to reduce the volume. For example :-

sox -v 0.5 file.mp3 file.wav
0
 
LVL 28

Author Comment

by:FishMonger
ID: 17915463
Thanks, I'll give that a try, but if that's true, why do I have a "normal" volume level when using the older style syntax in the conf file?  The playback volume when using the newer syntax is about 2 to 3 times louder than the older syntax.
0
 
LVL 28

Author Comment

by:FishMonger
ID: 17915613
Would the sound file format make a difference in the volume level and which is the best format, wav, raw, or mp3?
0
 
LVL 36

Accepted Solution

by:
grblades earned 2000 total points
ID: 17916098
The reason the volume is different is that the new system plays the volume at the actual volume of the source music file. The old system used a separate program to playback which supported varying the volume level and since it was for background music the default volume was lower than maximum.

The sound format wont make a significant difference to the volume level. Ideally you should create the music in all formats the phone system is likly to support so that it will have to do the minimum abount of converting which takes CPU usage. Therefore :-

wav - for any external telephone interfaces
ulaw/alaw (G711) - for commonly used voip connections
gsm - for low bandwidth voip connection which are using that codec

There are lots of possible codecs but that should cover most of them and any others you happen to use occasionally will be simple to convert from wav on the fly.
0
 
LVL 28

Author Comment

by:FishMonger
ID: 17916448
Thanks for the info.

A little while ago I received a response from the trouble ticket I opened with Digium and they confirmed that using sox to adjust the volume is what I need to do.  Response from Digium: "Currently there is  no way to adjust the gains for native music on hold.  The only work around is to redo the files with “sox”."
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
Hey there Heard about jingle, the add on for XMPP that enables point to point audio between two XMPP clients. No server config necessary. Actually quite a cool feature. However, how good is it if you can not use those voice capabilities to do a P…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question