Solved

Asterisk: How do I reduce the volume of the MOH

Posted on 2006-11-09
5
3,540 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Although VoiceOver IP has been around for a while, internet connections have only recently become fast enough to provide good call quality. Now, VoIP has become a real option for businesses looking at ways to improve their business model. In this ar…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now