I would like to set up some extensions to use for streaming web radio. For example, the cordless phone has a speaker option. I would like to be able to dial an extension and hear the radio station. I don't care about hifi sound, it would mainly be for NPR, foreign language talk radio and sports radio.
I set up an extension and use MP3Player to call the URL but most URLs don't work. Most of the time, I will hear nothing over the line and then the call times out. Here's my situation.
Using:
asterisk 1.4
mpg123 1.4.2 (documentation points to 0.59r, but the posts are years old. I'm hoping that 1.4.2. will work with Asterisk)
This setup in extensions_custom.conf works:
exten => 601,1,Answer
exten => 601,2,MP3Player(
http://wbez-sclo.streamguys.us/)
exten => 601,3,Hangup
However using any shoutcast .pls or other see below doesn't.
http://www.publicbroadcasting.net/wfcr/ppr/wfcr.pls/ http://webchannels.sr-online.de:8000/sr1klassiker/
These URL, however, do work when I run mpg123 from the command line with the -@ option.
Can someone point me in the right direction? I started to go down the MOH route but MP3Player seems like such an easier solution. If I could pass arguments from MP3Player to mpg123 or figure out how to get MP3Player to work. I even tried System(mpg123
http://URL/) but that didn't work either.
Here's the log message from asterisk when I call the URL that doesn't work:
[Oct 13 21:31:13] VERBOSE[9813] logger.c: -- Executing [600@from-internal:1] Answer("SIP/210-09dc3cf8", "") in new stack
[Oct 13 21:31:13] VERBOSE[9813] logger.c: -- Executing [600@from-internal:2] MP3Player("SIP/210-09dc3cf8", "@ http://www.publicbroadcasting.net/wfcr/ppr/wfcr.pls/") in new stack
[Oct 13 21:31:16] NOTICE[9813] app_mp3.c: Poll timed out/errored out with 0
[Oct 13 21:31:16] DEBUG[9813] app_mp3.c: No more mp3
[Oct 13 21:31:16] VERBOSE[9813] logger.c: -- Executing [600@from-internal:3] Hangup("SIP/210-09dc3cf8", "") in new stack
Thanks.