Rafael Micro R820T tuner as USB SDR source for hold music in asterisk PBX

So you want to play a local radio station, HAM repeater or other radio source 24MHz-1700MHz as hold music in asterisk. $8-$18 buys you the USB radio, antenna and all depending on source. Here is how you do it.

# Install git and libusb
$ sudo apt-get install git-core libusb-1.0-0-dev

# Change to your build directory
$ cd /usr/src/

# Download the source
$ git clone git://git.osmocom.org/rtl-sdr.git

# Build with autotools
$ cd rtl-sdr/
$ autoreconf -i
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

# In order to be able to use the dongle as a non-root user, you may install the appropriate udev rules file by calling
$ sudo make install-udev-rules

# Plug in the USB radio, and check if it is detected
$ lsusb
Bus 001 Device 008: ID 0bda:2838 Realtek Semiconductor Corp.

#Test by playing FM 91.1MHz to local speaker
$ rtl_fm -f 91.1M -W -r 32k - | aplay -r 32k -f S16_LE

# Update your Asterisk Music On Hold config
$ vi /etc/asterisk/musiconhold.conf

[default]
mode=custom
application=/usr/local/bin/rtl_fm -f 91.1M -W -r 8k -

# Restart
/etc/init.d/asterisk restart


http://sdr.osmocom.org/trac/wiki/rtl-sdr
http://kmkeen.com/rtl-demod-guide/
http://www.nooelec.com/store/software-defined-radio/sdr-receivers/nooelec-nesdr-nano-sdr-dvb-t-usb-stick-r820t-w-antenna-and-remote-control.html

Software Defined Radio

I am getting a $18 RX only Software Defined Radio but expect to be able to do many of the same things as in this b200 video with the cool GNURadio software.
http://b200.ettus.com/
http://www.nooelec.com/store/software-defined-radio/sdr-receivers/nooelec-nesdr-nano-sdr-dvb-t-usb-stick-r820t-w-antenna-and-remote-control.html
4 Jan 2014 $8.75 http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItemVersion&item=141115437304&view=all&tid=908074057004
http://www.rtl-sdr.com/about-rtl-sdr/
http://sdr.osmocom.org/trac/wiki/rtl-sdr  rtl_fm -f 96.3e6 -W -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
http://www.rtl-sdr.com/tag/r820t/
http://sdrsharp.com/index.php/downloads
http://www.sm5bsz.com/linuxdsp/linrad.htm
http://www.sm5bsz.com/linuxdsp/usage/newco/newcomer.htm
http://www.sm5bsz.com/linuxdsp/hware/rtlsdr/rtlsdr.htm
http://freedv.org/
http://www.rowetel.com/blog/?p=2782
http://www.rowetel.com/blog/?page_id=452