Streaming MOH

11 posts / 0 new
Last post
witdirect
witdirect's picture
Streaming MOH

Streaming MOH
Sorry for post, but I have read all the threads and links on here and other sites.

I cannot get streaming MOH to work at all.
Please somebody can you give me a detailed step by step instruction on how to set this thing up.

I cannot seem to get my head around this thing.

mickecarlsson
mickecarlsson's picture
Have you read this article

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

witdirect
witdirect's picture
Streaming MOH

Mikael,

I have read them both over and over again. I think I'm getting confused or lost in the musiconhold.conf and musiconhold_custom.conf files somewhere.

mickecarlsson
mickecarlsson's picture
Hmpf, if you are using

Hmpf, if you are using FreePBX 2.5 or later all you have to do is to click on Music on Hold, click on Add Streaming Category, fill in the details and away you go.

You need mpg123 and the details for the stream.

Just follow the Elastixconnection article, go to the heading STREAMING MUSIC ON HOLD FOR FREEPBX 2.5 AND FURTHER

You can start by testing this string for a stream (Application in FreePBX):

/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 1024 http://93.182.176.123

Note, for this to work you need three things:
1. FreePBX 2.5 or later
2. mpg123 (test by typing mpg123 -v in a shell)
3. Patience, the above stream takes almost 30 seconds to start.

Note 2: Don't abuse the above link, it is my favorite radio station Gamla Godingar from Sweden. Just use it for the test.

Note 3: No, I don't answer questions about how to obtain mpg123 if it is not available as that question have been asked and answered many many times.

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

witdirect
witdirect's picture
default MOH

Is there a setting I need to address to make stream default?

witdirect
witdirect's picture
I've tried it all

I have tried this thing in Add stream no go
Tried musiconhold.conf and musiconhold_custom.conf still nothig.

Below is my musiconhold.conf file

; Music on hold class definitions
; This is using the new 1.2 config file format, and will not work with 1.0
; based Asterisk systems
;
#include musiconhold_custom.conf
#include musiconhold_additional.conf
[classes]
default =>quietmp3:/var/lib/asterisk/mohmp3/stream,http://scfire-mtc-aa04.strea$

[moh_files]
default => /var/lib/asterisk/mohmp3,r
#include musiconhold_additional.conf
; class definition for Streaming MOH
;stream => quietmp3:/var/lib/asterisk/mohmp3/stream
; class definitions For A2Billing
acc_1 => mp3:/var/lib/asterisk/mohmp3/acc_1
acc_2 => mp3:/var/lib/asterisk/mohmp3/acc_2
acc_3 => mp3:/var/lib/asterisk/mohmp3/acc_3

This is my musiconhold_custom.conf file

;placeholder for future expansion PIAF Dev Team
[uptemposmoothjazz]
mode=custom
application = /usr/bin/mpg123 -q -s --mono -r 8000 -f 800 -b 0 http://scfire-dt$

mickecarlsson
mickecarlsson's picture
Please, follow suggestions when told

Why are you editing the files????? Don't do that!

musiconhold.conf should only contain this:

;
; Music on hold class definitions
; This is using the new 1.2 config file format, and will not work with 1.0
; based Asterisk systems
;
#include musiconhold_custom.conf
#include musiconhold_additional.conf

When you add the streaming in FreePBX it writes out those changes to musiconhold_additional.conf

If you have followed my example above your musiconhold_additional.conf will look something like this:

[Godingar]
mode=custom
application=/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 1024 http://93.182.176.123
[default]
mode=files
directory=/var/lib/asterisk//mohmp3/
[none]
mode=files
directory=/var/lib/asterisk//mohmp3/.nomusic_reserved

And that is all there is to it. Have you verified that you have mpg123 installed?

And NO, you can't make streaming default

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

witdirect
witdirect's picture
OK

I going to start from a fresh install and try it again just in case i screwed something up. But Im not the only one having trouble with this I check the forums and irc and they all have some kinda of complaint either it worked or they gave up.

I even called some of the so called paid support people who advertise online not FREEPBX support but others and they were just as lost as me.

mickecarlsson
mickecarlsson's picture
Just a thought, if you run

Just a thought, if you run the application line in a shell, do you get garbage on the screen after a while? (ctrl-c to end the garbage)

If you don't get that, you have a network problem, solve that and it should work.

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

witdirect
witdirect's picture
I got it

Thanks I got and i got it to play as default.

Also i deleted your favorite station after testing.

I will NOT leave it that way just wanted to see it done.

terrychen168
terrychen168's picture
Dear Sir, Can u tell more

Dear Sir,
Can u tell more clearly , i am useing freepbx 2.7 , But No voice
thanks
terry