I thought report success in my attempt to use live streaming MP3 as a music
on hold source, in case anyone else is interested. Here is what I did...

First, create a bash script. For example, /home/stream-wnyc-fm.sh with the
following two lines.

#!/bin/bash
 wget -q -O - http://wnycfm.streamguys.com:80/ | sox -t mp3 -r 32000 - -t ul
-r 8000 -c 1 -

Explanation... use wget to pull the raw MP3 stream from a URL, send result
to stdout. Pipe this into sox indicating source is of type mp3, sampled at
32kbps from stdin send output of type ulaw sampled at 8kbps with one channel
(mono) to stdout.

Now edit your Asterisk musiconhold.conf file and create a new context (or
change your default) to the following...

[streamwnycfm]
  mode=custom
  format=ulaw
  application=/bin/bash /home/stream-wnyc-fm.sh

And there you have it.  I have this working on an ALIX 2C3 board running
latest 0.6 branch.

David
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to