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

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
This is a great place to start:

You can download the PDF of the Asterisk: The Future of Telephony, Second Edition ebook at http://downloads.oreilly.com/books/9780596510480.pdf

I see this being sold for more than 40$ in various online outlets - Oreilly has a free download of the complete doc. Get it while the getting is good.
 

wa4zlw

Member
Joined
Feb 14, 2008
Messages
845
Reaction score
22
Hi there! I have the first version of the book will check it out. Anyone figure out the live streaming/buffering problem? Doesn't make sense why that would happen?

Thanks, Leon
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Hi!
Sorry to dig up a sort of old thread, but I have problems. I can get MOH working fine with the menu but I get no audio. If I choose a local category (non streaming), it works fine. If I choose (known working) streaming it does not work. I am trying to stream radio scanner feeds from: RadioReference.com. They give you the choice of streaming iTunes, WMP, WinAmp, or Real Player. The link I am trying to stream is: http://www.radioreference.com/scripts/playlists/1/1640/258592-5052057512.asx - A WMP link. The server, I am pretty sure, isn't running iTunes, WinAmp, or Real. WMP was the only other choice.
I am running the latest mpg123, PIAF 1.4,
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version : 1.4.21.2
* Zaptel Source Version : 1.4.12.1
* Libpri Source Version : 1.4.10
* Addons Source Version : 1.4.7

Thanks!
Ross
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Please post the command line you have entered in the streaming music category in FreePBX.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
I got it working. I had to use the iTunes type feed because it wouldn't accept the windows media.
Code:
/usr/bin/mpg123/mpg123 -q -s --mono -r 8000 -f 800 -b 0 -@ http://www.radioreference.com/scripts/playlists/1/899/0-5065873752.m3u
The reason I have the /usr/bin/mpg123/mpg123 is because I have a weird install of MPG123. How can I make it so that when I type MPG123 at the cli it works without typing the whole path? Symbolic link?

Thanks !
Ross
 

byersjus

New Member
Joined
Jan 19, 2010
Messages
16
Reaction score
0
My Experiences and Buffer Issue Idea

A couple of things from my experience:

1) I'm using a newer version of mpg123 (1.12.1) and the mono switch has been changed to just -m (not --mono). I can't say I noticed a difference, maybe the --mono still works although it isn't listed in help.

2) I needed an -f value of about 6500 to make my audio sound the best so I think this switch is stream (or system) dependent. Just play with it I guess.

3) I needed to put the full path to mpg123 in my page.music.php per freepbx.org/v2/ticket/3303 in order to get standard file uploads to work.

4) I'm getting the same "stale" audio at the beginning of the stream as everyone else despite setting the buffer -b to 0. However, the -s switch we're using tells mpg123 to output to stdout. Is that not the buffer we're picking up the old audio from? Do we just need to flush it at the start of streaming each time? Any ideas how to do/try that?
 

marv

Member
Joined
Nov 26, 2007
Messages
84
Reaction score
2
I really haven't modified too much from the original config besides changing the stations around a little.
Unfortunately, I don't have as much free time as before, so I have not had the opportunity to try alternative ways to "flush the buffer". I don't remember how the stream is being piped over into asterisk. I would think it would be a fix that would be part of the core install of asterisk's music on hold versus altering the source player (mpg123, sox, etc.)of the sound.
And yes, that was a touch of subtlle finger pointing there! :rolleyes:
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
I'm concerned with the affect that playing streaming audio on the QoS has on the network. My guess is that this is not multicasting but individual streams for each phoneset. I would worry that if this was implemented in a large scale that QoS would drop dramatically for VoIP calls which is exactly opposite of our goals.

As QoS appears to be the make or break for VoIP systems at this time, I would hesitate to implement streaming audio. The less traffic that can be put on the VoIP side of the network the better. That assumes that you do have your network VLAN'd or segmented between voice and data already. Otherwise, you are asking for trouble.
 

vcallaway

Guru
Joined
May 6, 2008
Messages
170
Reaction score
2
My biggest issue was spawning multiple streams. The symptom is choppy voice.

I would look at the server and there would be 5 or more streams running.

I finally gave up on it.
 

ddorminey

Member
Joined
Dec 11, 2007
Messages
78
Reaction score
0
John, Do you have a public stream i can use for testing? I;ve set up the moh stream as indicated but i just get silence. I'm not confident the stream i chose is valid.
 

jmullinix

Guru
Joined
Oct 21, 2007
Messages
1,263
Reaction score
7
No, actually I don't. I never used public streams for fear of RIAA folks. The only streams that I have set up were from streaming servers that I had internally that were monitoring the actual on-air signal from that radio station. Since the radio station was already paying ASCAP and BMI for the music they were playing, I figured we were OK.

The only advice I can give would be to try different streams until you find one that works. Then work backwards from that one to the one your want.

Be careful about the licensing of the content you are using. If RIAA, BMI or ASCAP suspect you are playing copyrighted music as music on hold, they will come after you with lawyers-a-blazing.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
for those who have setup multi streams etc, when you are listening to 1, so you have than 1 copy of mpg123 running?

I have 3 streams setup, listen to 1, but ps ax shows 3 mpg123 processing running - showing each stream....
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
for those who have setup multi streams etc, when you are listening to 1, so you have than 1 copy of mpg123 running?

I have 3 streams setup, listen to 1, but ps ax shows 3 mpg123 processing running - showing each stream....

Id be ineterested in knowing what version of mpg123 you have loaded.

I know that it takes it a few minutes for a stream to time out once its been started. When I have a single line listneing to music, I see one stream active. It takes about 40 seconds or so to time out usualy. Sometimes longer.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
right now i have 2 streams defined and have not used any of them for almost 1.5+ hrs - here is my ps list

Code:
root@pbxtcs:/etc/asterisk $ ps ax | grep mpg123
 8871 pts/0    S+     0:00 grep mpg123
28799 pts/0    R     97:03 /usr/bin mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://uplink.duplexfx.com:6000
28801 pts/0    R     96:59 /usr/bin mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://uplink.duplexfx.com:6102
it still shows the processes and they are 96+ min running....

and the router shows traffic from those urls as well
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Yikes - Id be ineterested in knowing what version of mpg123 you have loaded.
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
root@pbxtcs:/etc/asterisk $ mpg123 --version
mpg123 1.8.1

it was the version recommended at the beginning of this thread i think....
 

MyKroFt

Guru
Joined
Oct 31, 2008
Messages
659
Reaction score
3
i killed them off, asterisk restarted them and so far they have been running for 16+ min

asterisk is idle
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
You mean they just started out without anyone using the function from a phone? Double yikes.

Have you sniffed to see if its really using bandwidth the entire time? - I don't think the older versions behaved that way.
 

Members online

Forum statistics

Threads
25,812
Messages
167,760
Members
19,240
Latest member
nikko
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