[asterisk-users] Format_MP3, Streaming, File Formats, MOH

Asterisk [Submusic] asterisk at submusic.ch
Wed Sep 20 06:57:45 MST 2006


Hi,

 

This config is working for me:

 

_____________________________________________________________________

 

musiconhold.conf

 

[shoutcast]

mode=custom

application=/usr/local/bin/mpg123 -s --mono -y -f 8192 -r 8000
http://stream128.submusic.ch:8004/

 

; The  '/' in the stream URL is important !

 

_____________________________________________________________________

 

extensions.conf

 

exten => 17,1,Answer

exten => 17,2,MusicOnHold(shoutcast)

 

_____________________________________________________________________

 

 

Regards

 

 

Frederic

 

 

  _____  

De : asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] De la part de Robert
Chadwell
Envoyé : mardi, 19. septembre 2006 14:47
À : asterisk-users at lists.digium.com
Objet : [asterisk-users] Format_MP3, Streaming, File Formats, MOH

 

Format_MP3 appears to play MOH files starting at the beginning of each file,
using the .wav file format, making for some repetitive hold music unless you
alter the file itself to begin somewhere in the middle.

 

Solution: One stream that all users connect to – giving dynamic hold music
(tried and tested in A1.0x using mpg123 with some success, and Icecast or
Slimserver or Shoutcast)

 

Format_MP3 doesn’t seem to stream, and the wiki is wrong about streamplayer
being used to play streams, as it is only used to play raw TCP streams. 

 

There are many questions in forums on the web with no answers about how to
solve this dilemma, How do you get users connected to a constantly-changing
stream of music instead of streams starting from the beginning (regardless
of whether Linux counts them as one stream or not where the processor is
concerned)?

 

Hopefully, at the end of this thread, I will have enough information to go
back to these web-forums and post the answer. To get it started – here is
what I have tried that hasn’t worked. In most all cases the response is
“Music on hold started”, immediately followed by “Music on hold stopped”
with no sound in any case.

 

;[classes]

;mode=custom

;application=/usr/bin/streamplayer 194.158.114.67 8000

;format=ulaw

----------- Straight From The Music On Hold Wiki

 

;default => quietmp3:/var/lib/asterisk/mohmp3-dummy
-@,http://www.shoutcast.com/sbin/tunein-station.pls?id=7733&filename=playlis
t.pls

----------- From the Nerd Vittles Tutorial with the -@ added because mpg123
seemed to ask for it since the file was a .pls

 

;default => mp3:http://127.0.0.1:9000/stream.mp3

---------- From a forum of someone using mpg123 to stream SlimServer
(installed mpg123 v0.60 with no success here)

 

[default]

mode=files

directory= /var/lib/asterisk/mohmp3-dummy,http://127.0.0.1:9000/stream.mp3

---------- Tried a 1.2 format

 

;default =>
quietmp3:/var/lib/asterisk/mohmp3-dummy,http://193.251.154.243:8000/

---------- Thought maybe it was SlimServer – so tried to stream the top
Shoutcast station

 

;default =>
quietmp3:/var/lib/asterisk/mohmp3-dummy,http://127.0.0.1:9000/stream.mp3

---------- Tried to stream Slimserver using the old format

 

 

Thank you in advance – I have been at this for a week now. How did you make
it work in Asterisk 1.2x?

 

Rob

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060920/c8a6e8c4/attachment.htm


More information about the asterisk-users mailing list