Archive for the ‘Hardware’ Category.

RasPBX, FreePBX Trunk setup for MyNetFone

As per my previous posts, I use MyNetFone as my SIP provider and I run a Raspberry Pi with RasPBX (which is FreePBX for the Raspberry Pi ready to install/tweak and configure).

Below is a quick run down on how you can configure your SIP Trunk for MyNetFone on this device, which is working for me currently.

General Settings:

Trunk Name: mynetfone
Outbound CallerID: [configure based on your 09nnnn number or your DID if you have one]

Outgoing Settings:

Trunk Name: mynetfone-sip-out
Peer Details: (as below)
disallow=all
allow=alaw&ulaw
authname=09nnnn
canreinvite=no
dtmfmode=rfc2833
fromuser=09nnnn
host=sip00.mynetfone.com.au
insecure=very
nat=yes
pedantic=no
qualify=yes
secret=password
type=friend
username=09nnnn

Registeration String:

09nnnn:password@sip00.mynetfone.com.au/09nnnn

Raspberry Pi and RasPBX

Last week, on a Friday night of all things. Decided I would give RasPBX another go. After spending a bit of time on it had managed to configure my DID, my extension and setup inbound routes.

I configured enough to be able to leave it running until I can configure the other features I was using on my more manual setup. Which includes time based rules and IVR. Will get to those items in the next few days.

Will do another post shortly that shows how I got my SIP provider (MyNetFone) setup via the Trunks.

 

Raspberry Pi and Asterisk

I’ve had my Raspberry Pi and Asterisk setup running now for nearly 2 months. It hasn’t failed me once in this time.

If you remember back I ended up installing Raspbian and configuring Asterisk manually from command line. This setup suits me, as I want to learn about how it all works, not learn how to use one of the dedicated images that has a fancy web GUI (and learn how to use that). I might end up changing to that type of setup eventually, however what i have now works with all the features I need.

Will be sure to post back as time progresses with this setup.

 

Realtek RTL2838 DVB-T tuner with TvHeadEnd

I’d really love to get my USB based tuner to work on my Raspberry Pi for use with TvHeadEnd. My tuner as seen via lsusb output is below..

Bus 001 Device 004: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T

Anyone had any luck getting this to work with TvHeadEnd? If so add something in the comments.

SDR and paging messages

Following from my other post here, I’ve managed to finally secure a cable I needed to hook up my USB DVB-T tuner to an outside antenna. I’ve subsequently configured my Raspberry Pi as per the forum post here with the required software.

Basically I have enabled SDR (Software Defined Radio) and using it to decode paging messages on the paging network.

I setup the tuner on Windows at first and used SDR# to find the frequency range. A friend told me roughly where to look and what to listen out for. He said you’d hear bursts every so often. Sure enough I did. I found based on my location in South West Sydney that 148.630 was the band that enabled me to get what I needed.

If you get it working, you will see output like so from the command line below;

Command:
rtl_fm -f 148.630M -s 22050 | multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -f alpha /dev/stdin

Output:
POCSAG1200-: Alpha: 1957499:XMPROD PET_SYD_WATER_2 Regular heartbeat 1 to VHA

It appears that the paging network is still very much used by many. From looking at what comes over it, you can see that the medical industry uses it, in addition to other corporations for notifications etc.

I should add I found the following page helpful too. Click here.

Ubuntu 12.04.2 LTS and lxc

Have completed my Ubuntu 12.04.2 LTS install and configured lxc (Linux Containers). I am so far very impressed just how easy it was to get this working out of the box. I think the Ubuntu team who produce Ubuntu 12.04.2 LTS has to be given a big clap. Very fine job.

I’ve install some Debian squeeze lxc’s and Ubuntu ones. All seem to work great and I will post more details soon on what I have done and how it was performed, as it might help anyone thinking of doing the same.

I wanted to do this so I could run some other software on the containers and not clutter the host install. Although the host will see the processors for the container etc. But that’s fine and expected on how lxc works.

My aim was to install Mythtv as a master backend into a container and have it use my HDHomerun network based tuner. This has actually worked, and I am currently running it now, however I noticed during reboot/auto start of the container that the mythtv-backend wouldn’t start. Turns out the upstart configuration is not going to work on a linux container. Wiki page here┬áis the link to the config that ships in Ubuntu 12.04.2, and below is my change I made so that I could get it to start automatically, it’s a hack and needs some further investigation, but I was in a rush to get it working in my environment.

root@delta:~# cd /etc/init
root@delta:/etc/init# cat mythtv-backend.conf | grep start
#start on (local-filesystems and net-device-up IFACE!=lo and started udev-finish)
start on net-device-up IFACE!=lo

As per above, I hash out the original start on line and create the amended one below it. This is perform in the file /etc/init/mythtv-backend.conf

Now it will start correctly in my container at boot.

Upgrades and installations

These days I run a HP Microserver N40L with 3 x 2TB drives in a software raid5 on Debian linux. This machine has been performing a number of tasks, I did upgrade it to Debian 7.1, however wanted to really rebuild it.

I’ve been wanting to implement lxc, however I got it working on a virtual machine with some hacking around with a Debian host, however when i went to redo it couldn’t get it to work. Despite the research I did.

Looks like Ubuntu 12.04.x LTS has a good out of box setup for lxc, and based on that fact I think the first time in a long while I am going to change the machine from Debian to Ubuntu purely to make use of lxc which seems to work out of box without much fuss.

I attempted to do the install lastnight and as part of that install I changed my boot drive from a 500Gb to a 250Gb drive. Post install all I got during grub boot was GRUB displayed in top left corner. I tried all sorts of things to resolve it. Wasted a bit of time doing so. In the end I went hang on I changed the drive, is it possible the drive boot order got screwed up. Sure enough it had, and once I set the order correctly we could now boot. Looks like when the system tried to boot one of the other drives which had no grub files (basically nothing for stage 2 etc).

Raspberry Pi with RTL8188CUS 802.11n wifi adapter

I did my research and determined that if I wanted WiFi on my Raspberry Pi I should stick to a model that can also run in Access Point mode for hacking around with, and sure enough I settled on a Realtek RTL8188CUS chipset one.

If anyone is interested, I purchased mine from this ebay seller here. This is a direct link to the one I actually got, in fact I bought two since they were cheap and I do have two Raspberry Pi’s after all.

I am using the blog post here, to determine if I can get it to do something. So far so good, see the output below;

michaelf@tom ~ $ dmesg | grep rtl
[ 6.792640] usbcore: registered new interface driver rtl8192cu
michaelf@tom ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

I followed the post and sure enough it works. if you want your RPi to still use a static IP with the br0 interface you can use the sample one below.

#/etc/network/interfaces
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
bridge_ports eth0 wlan0
bridge_fd 1
bridge_maxwait 0
bridge_hello 3
bridge_maxage 10
bridge_stp off
address 192.168.n.14
netmask 255.255.255.0
network 192.168.n.0
broadcast 192.168.n.255
gateway 192.168.n.254

allow-hotplug eth0
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual

If you want to setup the WiFi adaptor in client mode, you can follow the information on this post here. Which I can confirm works, as I got it working with my adapter.

Asterisk and Voice Over IP

Purchased a humble Linksys/Cisco IP phone SPA922 and installed it earlier in the week. However wasn’t able to use it until the power brick I ordered arrived. It came later in the week.

Been a long time since I installed asterisk, but I have fond memories that it was very awesome once you got it working. I struggled a little, but somethings were easy and others not so. Thanks to a friend who helped I managed to configure everything I needed and even got it to talk to my provider MyNetFone which I purchased a DID from to use from Sydney 02 region.

After tinkering Friday evening I got the inbound working and outbound working. My next step was to get IVR working on the inbound calls. I got this done on Saturday morning and evening.

Very happy with the setup so far, have subsequently copied over my configuration and voice files onto a Raspberry Pi where I have setup raspbian and installed asterisk. I choose to run it like this as I found the pabx based distro with the nice web interface confusing. What I have got works, and works well so far more me. Will continue to work/tweak it.

So far so good and very impressed.

Raspberry Pi

Purchased 2 new Model B Raspberry Pi’s. The model now that has 512Mb ram. Plan is to use one for some SDR stuff and the other looks like might end up being used for Asterisk, as I am getting a Linksys desktop VoIP phone configured with it. Looking to setup a DID with a provider and do some testing against it.

Purchased a single unit first and after testing for a week found the new models to be very good, so purchased a 2nd unit this week.