Solved

Asterisk: How do I reduce the volume of the MOH

Posted on 2006-11-09
5
3,606 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
  • 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 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In my office we had 10 Cisco 7940G IP phones that were useless as they were showing PROTOCOL APPLICATION INVALID when started. I searched through Google and worked for a week continuously on those phones, and finally got them working. This is a di…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 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