A way to set a default sound device of your FreePBX server

FreePBX offers an ability to have your Music-On-Hold (MOH) to be a streaming from the audio line in of your server. This involves using “arecord” function of the linux that uses the selected capture device of the default sound card. If you want to use a USB sound card instead ob on-board and it is not default (does not pop-up when you run alsamixer command), you might find yourself in loss. There is a way to esaly set any of the sound devices to be used as default by alsamixer and arecord.

Run “cat /proc/asound/cards” and take a note of available cards and the index in the beginning of each entry. Remember the index of the card you want to use

Go to /usr/share/alsa
Open alsa.conf
Scroll down a page and edit

default.ctl.card 1
default.pcm.card 1

default.timer.card 1

above I use “1” , which is the index of the desired card form the first step.

After that you do not need to reboot, just open alsamixer and your card should be default and you can set the settings.

Now arecord will go for that soundcard when is called in your MOH script.

It is possible that some other alsa.conf settings could to be changed as well, but above provides a functional solution.