[Asterisk-Users] MOH sourced from a sound card?

asterisk at b-great.net asterisk at b-great.net
Wed Feb 1 02:42:13 MST 2006


Hello,

MP> Can I couple this to the sound card in the Asterisk server and then have
MP> it play into the MOH? If so how?

Yes, it's possible. I've tried it last week.

1. Add the following into musiconhold.conf:

[default]
mode=custom
directory=/var/lib/asterisk/mohmp3
application=/usr/sbin/ast-playlinein

In /var/lib/asterisk/mohmp3 should be at least one mp3 file.

2. Create script file /usr/sbin/ast-playlinein and make it executable:

#!/bin/bash
/usr/bin/arecord -q -c 1 -r 8000 --buffer-size=2048 -f S16_LE -t raw

3. Then you need to configure your mixer to turn on LINE-IN capturing.
You may plug into line-in FM-tuner or external audio player.

Don't forget to reload (should be enough) asterisk.

--
Grigoriy Puzankin




More information about the asterisk-users mailing list