Hi,
I almost got this to work, but I must be missing something very stupid. I can hear faint music (played from an MP3 player) but there is way too much static
over it. Here is what I did (derived from a trixbox post). Any hints? Anyone got thos (or similar) working?
1. Add the following into musiconhold.conf:
[default]
mode=custom
directory=/var/lib/asterisk/mohmp3
application=/var/lib/tb-playlinein
2. Check and make sure In /var/lib/asterisk/mohmp3 there should be at least one
mp3 file.
3. Now we need to create a simple script for MOH to run when called. Create a
script file /var/lib/tb-playlinein by using nano:
vi /var/lib/tb-playlinein
copy following 2 lines of code and paste it in vi:
#!/bin/bash
/usr/bin/arecord -q -c 1 -r 8000 --buffer-size=2048 -f S16_LE -t raw
now set ownsship and make it executable but make sure you are in the
appropriate directory:
chown asterisk:asterisk /var/lib/tb-playlinein
chmod 777 /var/lib/tb-playlinein
4. now we need to allow asterisk to have access to the sound device/files. We
will need to create a group called audio and give root and asterisk access to
it.
groupadd -g 525 audio
usermod -G audio root
usermod -G audio asterisk
5. In order for asterisk to use the card we will need to add a couple of lines in the amportal startup script. When your TB boots up it will set the appropriate
permissions allowing MOH to access the card and play the line in souce. Use nano and add 2 lines of code to accomplish this:
vi /etc/rc.local
Add the following:
chown -R root:audio /dev/snd
chmod -R a+rwX /dev/snd
6. just for the heck of it reboot your pc. This will load the startup script
and set the right permissions to access your sound card for the MOH line-in
7. You can then plug into the line-in port or the mic port your FM-tuner or external audio player. Then you need to configure your mixer to turn on any line in
and capturing or any mic or mic capture. to do this launch the following command:
alsamixer
--
----
Andre Courchesne - Consultant
Tel: (514) 667-8448
Cel: (514) 712-4064
web: http://www.net-forces.com
email: [EMAIL PROTECTED]
Skype: voipforces
MSN: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]