Spam Eliminator Setup

phoneThis is a companion to the blog post, the Spam Eliminator Telephone System.

To set up this system, first get a raspberry pi with at least 8GB SD card, you’ll also need a monitor and a keyboard to set it up with a hardwired ethernet connection to the internet.  The next step is to follow the steps laid out here: http://www.raspberry-asterisk.org/downloads/ to download a raspberry pi image with asterisk and freepbx to your computer, you’ll then have to burn a disk image from your computer to an SD card to boot in the raspberry pi.  Here is a tutorial for a MAC, your on your won for a PC:  http://www.raspberrypi.org/documentation/installation/installing-images/mac.md

Once you have an image from raspberry-asterisk burned onto an SD card, you can follow these steps to get it up and running:  http://www.raspberry-asterisk.org/documentation/ this should get your PBX up and running.

Make sure you use a Static IP address for the raspberry pi, not the default dynamic IP address, since lots of devices will be looking for the pbx, it should have a known address.

Next plug in the OBI110.  This device has the weirdest configuration I’ve ever encountered.  First off you need a telephone connected to it as part of the configuration.  You’ll need to plug the OBI110 into an ethernet port connected to the internet.  Some parameters of the OBI110 are set from obihai.com and some are locally configured.  Google ‘use obi110 as fxo for freepbx’ to find info on how to configure it.  Here is a good starting place: http://wiki.freepbx.org/pages/viewpage.action?pageId=4161594

I had a lot of trouble configuring a local configuration only to have the device clobbered with the default config 5 minutes later that was downloaded from Obihai.  The user interface is very not intuitive, especially how and where the configuration gets set.

From the info above you can configure the Freepbx to connect to the OBI110.

Now connect a VOIP phone.  you’ll need to configure the phone to connect to the pbx, and on the pbx, you’ll need to configure and extension.  Search google for your phone type and freepbx.  Cisco phones are VERY complicated to configure.  The first problem is finding them on your network, each SPA phone has a menu which you can access by the handset to figure out what IP address was configured by default, once you have this you can configure the phone with your browser.

Once you have an extension configured and working, you can configure the rest of the PBX using the freepbx interface.  using a cell phone keep dialing and listen to the obi110 and watch what happens.

You’ll need to configure incoming and outgoing trunks, and set up an IVR with the new phone extension.  Mine says “Hi You’ve reached the kellys, press 1 for bill or 2 for lisa”.  The IVR has a setup where you then point #1 to the extension that is bill and 2 to the extension that is lisa.  Configure voicemail for both of these extensions, and you can have the voicemail emailed to a specific email address.

I also signed up for vitelity.com and paid $35 for measured outgoing calls.  The pbx can be programmed using outgoing trunks to route emergency calls out the OBI110 (therefore the landline) and everything else with a Called ID of the landline to vitelity.com.  It’s been a few years and I haven’t used much of the $35.

Once everything was up and running, I moved both the PI and the OBI110 to my garage where in the internet and my phone lines originate.  This keeps me from bumping the PI and taking it offline.

Things not to repeat:

1.  After running for 6 months, my pi crashed without a backup.  I needed to remember everything I did.  It would have taken me a few hours of pbx downtime to copy the image and have a backup.  Now I do.

2.  For a while I opened a hole in my internet firewall and installed fail2ban in the pi.  What I found was hundreds of port scanners where trying to reach my pbx.  I scrapped this idea (I wanted remote extensions on my iphone), and I built a VPN gateway instead on a separate raspberry pi.

Other Ideas:

1.  The PBX keeps a call log in mysql.  I wrote a daily report that emails me who was calling every morning.  I did this for my mom and it’s an amazing thing to see the spammers knocking.

Modifications I made for my mother:

1. You can create lists of phone numbers that trigger different paths in the PBX.  By default if you call my mother, you end up hitting and IVR which says “Hi you’ve reached <name> please press 1” this routes to extension #150 which immediately goes to voicemail and says “<name> is not avaible please leave a voicemail” this immediately routes to my email inbox.  If You are on the ‘list’ of approved numbers she has two working extensions #100 which is her answering machine and portable phone and #101 which is a phone by her bed.  I linked the two in a ring group and if you are on the list of 35 numbers you go directly to the ring group.  If she’s not available her answering machine kicks in.

 

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.