Solved

Asterisk: How do I reduce the volume of the MOH

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Article by: user_n
How Sip Phone (User Agent) works and communicates with sip servers 1.  There is a sip server and a sip registrar.  The sip server and sip registrar can be one server or two different servers. The sip registrar is the server on which it is record…
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

790 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