TIPS Streaming MOH / MP3 MOH / Listen to Internet radio by Phone: WORKING

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
i remove the 2 streams from freepbx, reload and the 2 mpg123 processes disappear and my traffic go down to almost nothing.....
 

Hat

Guru
Joined
Dec 18, 2007
Messages
88
Reaction score
0
Interesting, I updated my box via update_source (all three steps) the other day and noticed the same thing. Prior to the upgrade I did not have this issue.

Versions
Asterisk 1.4.34
mpg123 1.12.3
 

shuler

New Member
Joined
Apr 30, 2010
Messages
6
Reaction score
0
You can also shoutcast your own music collection. setup winamp with the shoutcast radio DSP on another PC in the house. Setup shoutcast server on the same machine. now setup your playlist to be random / shuffled and then you have an endless stream of music.
CHeck out the winamp and shoutcast tutorials to setup
if your windows shoutcast server is on 192.168.1.97 then the
mpg123 call looks like this
/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://192.168.1.97:8080

also can verify the shoutcast server is up by going to and verifying it is up.
 

ErikU

Guru
Joined
Mar 16, 2008
Messages
181
Reaction score
6
Does anyone have this working reliably? It works great for a day, then I get 100% CPU use. mpg123 1.8.1
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
I can't get the ShoutCast stream to work. I am using NiceCast on my mac and I can stream it just fine with VLC on any computer on or off my network. I just get dead air on my phone. Would the 8000, mono, or 8192 have anything to do with this?
Thanks!
Ross
 

keyjey

New Member
Joined
Jan 9, 2011
Messages
11
Reaction score
0
Hi, I could install mpg123 and add the streaming radio, but I have 2 doubts:

1.- I still can't hear the radio streaming, I just hear the default samples. Why is this?
2.- Where is that dial plan to add the menu to listen from telephone?

Thanks in advance, good job ! I adore this forum !
 

centoasa

Member
Joined
May 31, 2009
Messages
118
Reaction score
1
all works fine for me, with this configuration:
PHP:
[default]
mode=files
directory=/var/lib/asterisk//mohmp3/
random=yes
[none]
mode=files
directory=/var/lib/asterisk//mohmp3/.nomusic_reserved
[smoothjazz]
mode=custom
application=/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://66.220.3.52:9010
I've modified this file to have the smoothjazz as the default; but when I reboot the pbx, the default become as:
PHP:
mode=files
directory=/var/lib/asterisk//mohmp3/
is there a way to remain smoothjazz as the default?
 

jmullinix

Guru
Joined
Oct 21, 2007
Messages
1,263
Reaction score
7
It appears that you are modifying the file

musiconhold_additional.conf

This file is generated by FreePBX everytime you put the orange bar. You should put your modifications in the

musiconhold_custom.conf

file. That file is there for us to tinker with.
 

centoasa

Member
Joined
May 31, 2009
Messages
118
Reaction score
1
Must I delete all the contents of musiconhold_additional.conf, or simply paste all the contents into musiconhold_custom.conf ?
 

nunya

Member
Joined
Oct 1, 2010
Messages
44
Reaction score
3
Hanging streams

I know this is an old thread, so I was a little hesitant to post...
Following the original directions, I did manage to get a local talk radio station streaming for the Mrs. to use. She dials ext 941, and it plays 94.1 FM's stream.

This is all fine and dandy. However, I noticed that the stream is "always there". It's always running using bandwidth even if no-one is listening. Is there a way to kill this stream when she hangs up?

PIAF Purple
1.8.5
mpg123 1.13.3
 

lordcalin

Guru
Joined
May 19, 2011
Messages
8
Reaction score
0
This method won't work if multiple people are all using streaming, but if it's just your wife you can add at the top of the extensions context

exten => h,1,System(killall -9 mpg123)

that'll cause it to kill all running mpg123's when a hangup is detected.
 

nunya

Member
Joined
Oct 1, 2010
Messages
44
Reaction score
3
Tried that, but it just keeps chugging along when the extension is hung up. Another odd behaviour, a reload will kill the stream, but an amportal restart revives it.
For the intended use of MOH, I'm beginning to think that they want to keep that stream up 24/7/365.
 

panteradrummer66

New Member
Joined
Dec 6, 2010
Messages
37
Reaction score
0
I'm experiencing the same thing. Reloading the dialplan kills the steam, but the process is still loaded. If i reload asterisk, the stream continues to download in the background. I did have an issue previously with getting dead air regardless, and I fixed it by preloading res_musiconhold.so in modules.conf according to

https://issues.asterisk.org/view.php?id=18800#132473

I'm begining to think that the streaming portion of MOH is meant to be "always on." this way users can be placed on hold, and pick up the stream as it's coming in, rather than invoking the mpg123 command each time a user is placed on hold. I wonder if there was a way of invoking the command when one user is on hold, then ending it when there are no users on hold... might cause issues if users are put on and taken off hold too close together though..
 

nunya

Member
Joined
Oct 1, 2010
Messages
44
Reaction score
3
It's a shame, I think this would be a really cool feature for home users. Unfortunately, with the advent of metered bandwidth and caps, keeping a few audio streams running all the time just won't do.
 

bbhenry

New Member
Joined
Sep 25, 2008
Messages
19
Reaction score
0
Change station without hanging up

When I saw this thread, I already have my custom_destination build in the same fashion. And for a long time I have wanted to be able to change the station I am listening to with a few click of the DTMF buttons.

I have finally sit down and started coding. Now I have a working dialplan that allows the caller to hit "*5" (this can be anything) to get back to the selection menu..

You get the idea. If you guys are interested in such setup. Please leave comments, I will then posted it up on my blog.

Henry
 

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,856
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

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.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top