DIY Open VOIP

Figure 1:  Home Network (click to enlarge)

Ever considered doing your own Voice Over IP (VOIP) system in your home?  There are a number of ways to do this but I thought I would share my experience.  It may not be entirely comprehensive for everyone but perhaps it will provide a few ideas of what works, or what to avoid, and relative complexity of the effort.

First some background, prior to this effort I had Vonage.  Vonage is a very easy out of the box VOIP provider.  Incidentally, I messed up my Vonage install because I over think the install.  For Vonage, the process is very easy.  Follow the instructions online, setup your account, Vonage then sends a small box to your home that is provisioned to your number.  Plug the box in, plug your phone lines into the Vonage box, and your done.  It’s that simple.  My mistake was I setup my online account and then I purchased a Vonage adaptor at the store.  You either need to purchase online or purchase at the store and follow the online setup instructions.

Figure 2:  Cisco SPA 303 IP Phone

My main grumbling with the Vonage VOIP solution and it’s nothing major but I wanted an open solution using the Session Initiation Protocol (SIP) protocol.  The Vonage solution proprietary and does not support SIP devices (so far as I know).  Continuing on, SIP is a common protocol used in offices through the world to deliver telecommunication services.  I wanted to use standard SIP devices like Soft Phones (e.g., XLite, free, or Bria purchase).  Soft Phones allow you to answer or initiate phone calls from a computer or other devices like your cell phone.  This is useful if you travel on occasion and want your business and personal calls to follow you as you move. There are also a large number of hardware devices that support the SIP protocol.  For example, Cisco provides a wide variety of office phones used in organizations throughout the world.  Being a security guy, I like to experiment with everything and see how it works.  I purchase a Cisco SPA303 IP Phone for my desk.  These are a high quality low cost desktop phones.  You can find these for around $50-$70 dollar US almost anywhere.  I purchased mine on Amazon.  Originally, I wanted to setup my own home PBX server like Asterisk but I felt it would probably be too much IT administrative overhead.  If your PBX system crashes your entire phone system goes down.  I didn’t want to be traveling on business, have the system crash, and my family be without operating phone system.  Running SIP devices and choosing a PBX hosting provider allows you all the flexibility and power of the advanced features without all the IT administrator or costs for hardware, backup, patching equipment software, etc.

Figure 3:  Cisco SPA 2102-SF

Another component I required for my project is an analog line adaptor.  This takes the analog phones and converts them to IP to work with your VOIP provider.  The Cisco SPA 2102 is highly configurable and the menus are very similar to configuring the SPA 303 phone.  You may have noticed in Figure 1 I included a little devil next to the SPA 2102 and for good reason.  I will explain, the customer ratings on the Cisco SPA 2012 adaptor are very favorable.  The device provides connection for two analog lines and it’s rugged and reliable.  Cisco also provides a number of features that make provisioning these devices very desirable for VOIP providers.  So for example, it’s possible to configure these devices in your home network by navigating to a link in your web browser or pre-provision them at the VOIP provider offices.  Provider configuration is downloaded into the device easily.  Cisco also provides an administrative account VOIP providers can use and a user level account for customers to use.  This is a great feature for VOIP providers however it’s terrible if you happen to purchase a pre-provisioned device.

Figure 4:  Box for Clear Voice Adaptor (SPA 2102)

The first adaptor I purchased (not shown) was admin locked to some VOIP provider called TalkBBS.  After a few days of hair pulling I figured out my unit was bricked (no admin password, no factory reset possible).  I liked the reviews for the SPA 2102 so I figured instead of ordering a used unit this time, and someone else’s provisioned garbage, I will order a new unit.  I jumped on to Amazon and found another adaptor.  I review my order, everything looked good, when my adaptor arrived I received the a SPA 2102 provisioned for the Clear (a VOIP provider) shown in Figure 4.  The vendor never mentioned the device was provisioned for the Clear.  At this point I was frustrated.  I know when I opened the box this device would be pre-provisioned for Clear service and locked.  And sure enough, that was the case, the documentation instructions were OEM from the Clear to type in your 10-digit phone number to get started.  I called the Clear company support line to see if I could get the administrative credentials to reset the device to factory settings.  No luck.  I read the MAC address to the support person and she said the device is not in her system and not a Clear device (lol, look at Figure 4).  Anyway, she was very kind but I knew there was nothing more she could do.  I was on my own.  My stroke of luck was finding some Cisco IVR codes.  The IVR codes allow you to dial certain numbers from the handset of Cisco devices and perform basic administrative activities.  In my case, I was using nmap to recon my home network and find the DHCP IP address of the adaptor that kept changing.  With the IVR codes it’s easy to find the IP  address and nmap is unnecessary.  There is a code you can dial on your phone (*110) and a voice will tell you the IP address of the adaptor.  There is also a code I entered to turn on the web server so I could configure the device.  One the web interface is active, the device is no different to configure than a SPA desk phone.  Enter your SIP credentials and your ready to go.  For security purposes, don’t forget turn off the web servers when your done.  This is where I can appreciate the power the PBX.  Provisioning a few phones is not a big effort but provisioning many would be very challenging so I can image the PBX is important to manage phone and line resources.  Anyway, maybe I will spin up a PBX someday.  I noticed there is a version of Asterisk that runs on the Raspberry PI microcontroller.

Cisco has some great hardware and all these devices are infinitely configurable.  The biggest challenge for me was getting an unlocked analog adaptor.  Incidentally, analog phones on SIP service seem to work reasonable well but there are some side effects.  For example, my Cisco desktop phone integrates very well.  When a voice mail arrives I get the big red indicator light at the top of the phone.  My voice mail for my provider uses *21 to activate voice mail service (then you enter a pin number).  It’s very easy to assign the voice mail key on the phone to be compatible with your VOIP provider.  Missed call indicators, every thing works as expected.  I’m a little disappointed in the SPA 303 since the display is not lighted.  Perhaps that’s a configuration option I overlooked.  Maybe I will upgrade, a lighted display is handy at dusk before I turn on the lights (I work from home).  On the analog lines you must type *21 then the pin to listen to the mailbox.  From my wife’s perspective accessing the voice mail will be a little more complicated.  Cutting over the numbers was pretty transparent.  Currently I’m having slight trouble with my office number.  When some colleagues dial the number it does not ring my desk but instead forwards to my backup cellphone.  I was thinking this is an issue with transferring my phone number but since it forwards to my cellphone my provider is definitely receiving and processing the call.  However, if I call my office phone from my daughters cell phone it rings through to my desk as expected.  Perhaps there is some intermittent network connectivity or refresh issue since the SPA 303 is NAT’ed device behind my firewall.  Anyway, love playing around with this stuff and I feel like I understand VOIP much better, how to configure Cisco VOIP gear, SIP protocol, audio codecs, etc.  The audio quality seems very good so far.

–Milton

Author: milton

For bio see, https://www.securitycurmudgeon.com/about/