There is a -g n switch for mpg123 - called set audio hardware output gain. I have no idea if it will change the volume of the stream or not. If you try it let us know.
/usr/bin/mpg123 -q -s --mono -r 8000 -f 800 -b 0 http://64.62.194.49:2792
I only recently got to start playing with PBXIAF 1.3 (getting ready to upgrade a few 1.0-1.2 versions), and found that most everything just sorta works the way its supposed to.
Tom, Ward, Joe - what can we all say but WOW.
There were just a couple things that seemed a little odd "out of the box" about music on hold, and streaming music on hold.
1. When we tried uploading our mp3 formatted audio files for MOH, we got the dreaded sh:mpg123 error, and no WAV versions were produced. The MP3 version were listed, and music on hold DID still work. But we prefer the old functionality of having the WAV versions on the list in FreePBX.
2. The new extra cool streaming music on hold category would not work - period.
It turns out the solution for both was to install mpg123. After searching around the forums, most of the instructions didn't work, or referenced really old versions of mpg123.
This procedure gets version 1.3.1.1 of mpg123 which is much newer than other version Ive seen referenced - but I decided to try it anyway.
Here is what we did to install it:
First install a dependent file:
yum install libltdl.so.3
Second, install mpg123
wget ftp://194.199.20.114/linux/dag/redhat/9/en/i386/dag/RPMS/mpg123-1.3.1-1.rh9.rf.i386.rpm
rpm -ivh mpg*.rpm
rm mpg123-1.3.1-1.rh9.rf.i386.rpm
amportal restart
That fixed the MP3 to WAV MOH issue, as well as the streaming MOH. To test that, (using FreePBX 2.5.1) goto MOH, add streaming category. Use a line like this in the APPLICATION field:
/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://160.79.128.61:7826
Many users have asked for the ability to listen to streaming internet music on their telephone. To do that - we make the following additional dial plan to [from-internal-custom]:
exten => 69,1,Answer
exten => 69,2,MusicOnHold(stream)
exten => 69,3,Hangup
We program a speed dial key on the telephones and label it 'RADIO', which dials ext 69 (change as you see fit), and plays the Streaming MOH - which we so creatively named stream.
I have been trying to get streaming to work for a long time. I hope that this may help someone in the same situation.
There is a good reason I didn't talk about using live streams for an actual "Music On Hold" purpose. These techniques should only be used for your personal listening enjoyment in a household setting. Any other use probably breaks laws. Expensive ones.
Good luck!
Yes. Twice this has occurred were one stream would play what appearred to be the buffer and then the music would stop. Trying all the other streams resulted in the same outcome.Does it happen on more than one stream?
Yes. Twice this has occurred were one stream would play what appearred to be the buffer and then the music would stop. Trying all the other streams resulted in the same outcome.
One other instance, all but one stream stopped working.
I only use this while I am at my desk, about an hour per night. This behavior usually happens after two or three days of using the MOH stream this way.
Category Name: Christmas
Application: /usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://160.79.128.61:7826
Customer Destination: music,s,1
Description: Telephone Music
Description: Telephone Music
Feature Code: 68742
Destination: Custom Destinations: Telephone Music
[music]
exten => s,1,Answer
exten => s,2,Background(custom/telephonemusic)
exten => s,3,WaitExten(,)
exten => s,4,NoOp()
;dial users
exten => 1,1,MusicOnHold(showtunes)
exten => 2,1,MusicOnHold(60s)
exten => 3,1,MusicOnHold(Christmas)
exten => 4,1,MusicOnHold(SkyFM)
exten => 5,1,MusicOnHold(Classical)
exten => 6,1,MusicOnHold(default)
exten => 9,1,Background(custom/musicmenu)
exten => 9,2,WaitExten()
exten => 9,3,Goto(music,4)
exten => t,n,Hangup
Welcome to telephone music.
Please press 1 through 6 to select your music channel.
or
press 9 for a menu of channels and their descriptions.
Welcome to telephone music.
Please press 1 through 6 to select your music channel.
Channel 1 is the Show Tunes channel..
Channel 2 is Music from the sixties.
Channel 3 is mixed Style Christmas Music.
Channel 4 is Sky F.M. - Mostly Classical Music.
Channel 5 is All Classical Music All of the time.
Channel 6 is the Standard "Hold Music".
Press 9 to here the menu again.
swift -f telephonemusic.txt -o telephonemusic.wav
swift -f musicmenu.txt -o musicmenu.wav
or
flite -f telephonemusic.txt -o telephonemusic.wav
flite -f musicmenu.txt -o musicmenu.wav
I am curious how you `turned off` music on hold, and also exactly what you mean when you say the `channel isn't hanging up`.The problem is that Asterisk wouldn't restart after starting and stopping MOH. I have to do an amportal restart twice for asterisk to start.
Link up your team and customers Phone System Live Chat Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.