Configuring Asterisk to connect to my iPhone VOIP client over a cellular connection

Background:

Over the last 25 years, I’ve started several companies, each with a different name, and a different telephone number. Several years ago I found myself with multiple landlines that I used for different company names. Each line had it’s own voicemail. In order to answer each phone line ‘live’, I used to have multiple cell phones, and when I’d leave the office, I would forward the each phone number to a different cell phone, which I could answer, and if I missed the call, each cell phone had ‘matching voicemail messages’ with company names that matched land line names/numbers. I did this so that I could answer the incoming phone calls, and minimize the confusion from the customer’s point of view.

Problem:

Unfortunately, it made my life more complicated, and those phone bills were very expensive.

In order to simplify things, I decided to centralize using Asterisk (an open source PBX) and FreePBX, a web interface to configure settings in Asterisk. A PBX is a Private Branch eXchange, a hardware system that handles routing and switching of calls between a business location and the telephone network. By doing so, I could cut the telephone company charges and change to VOIP telephone service to 1/20 of the price, get rid of the redundant cell phones, and many other benefits.

Thanks to the instructions on EngineeerTim.com, I installed Trixbox, and saved more than $6,000/year in landline and cell phone telephone bills. We can save that for another blog post!

Fast forward to about 2 years ago, I had an iPhone, and wanted to configure it as a ‘cordless phone’ when I was at work. To do this, I installed CounterPath’s SIP phone app: Bria iPhone Edition, on my iPhone. Then I set it up an extension on the PBX, and added it to various ‘call groups’ of incoming phone calls. (A call group is a group of extensions that ring when a phone call is received… i.e. the phone at your house rings on all extensions: kitchen, basement, upstairs, etc. when someone calls your home number.)  Now when I was at work, and someone called, my cellphone would act as a cordless phone, and I could answer the call as if I was sitting at my desk phone. Unfortunately, when I left the building, the iPhone unhooked from the PBX, and I was back where I started. That’s where the VPN connection over the cell phone system comes in…

Here’s what we are going to do…

Let’s get started…

Add an extension in Trixbox system:

Log into your Trixbox PBX, or whatever you use for your asterisk based PBX, in ‘admin’ mode, and then go to ‘PBX settings’, ‘Extensions’, ‘add extensions’:

trixbox_add_an_extension

Since we will be using the CounterPath Bria iPhone sip client, select the ‘Generic SIP Device’ and then click on the ‘Submit’ button.  You will then see the following table that you would need to fill in…

extension_details_802

Note the extension number, and secret, you will need this for configuring your Bria iPhone SIP phone client.

Save and apply your changes.

Now let’s setup the iPhone using CounterPath’s Bria iPhone Edition

Go to the app store, and purchase the Bria iPhone Edition, (I paid less than $10 for it… it’s a great value!). Install and open, go to ‘Settings’, ‘Accounts’, ‘+’ in upper right hand side header, and then fill in your information:

Bria iPhone SIP settings

Fill in the following:

Username: the extension number you just setup in Trixbox
Password: the ‘secret’ that you setup in the Trixbox extension
Domain: the ip address or FQDN of your Trixbox installation

Once you are all done, if you are on the same subnet as the Domain setting, or can reach it via the FQDN, then you should see that the SIP client is registered with the PBX, and is ready to use…

This screen shot shows that we are connected to the lan/internet via a wifi connection, and that the SIP client has successfully registered with Trixbox:

SIP_client_registered

Now, let’s modify the ‘ring groups’ in Trixbox,

and add the iPhone as an extension for the various incoming phone lines… here’s an example… I went into the ‘Ring Groups’ menu, selected the ItRingGroup (601), and added the extension 802 to the Extension List:

Add extionsion to ring groups

Now, ‘Save’ your changes, and ‘Apply Configuration Changes’

At this point, when someone calls in to the phone number that is routed to the ItRingGroup (601), all those extensions ring at the same time. When one of the extensions answers, then the other extensions go back into ‘standby’ mode for the next call.  In this example, I can answer the phone on extension 802 (the iPhone running the Bria iPhone Edition app), and roam around the building while talking on the iPhone, which is acting like a cordless phone extension.

Use the VPN for remote use of the pbx

The problem is, how can I be away from the office, and still answer the phone as if I was in the office?  With my VPN that I setup, I just activate the VPN, which provides a secure connection to my LAN and the Trixbox pbx via the data connection on the Sprint wireless cellular service. My Bria iPhone Edition app can now register with the pbx, and we’re back in business!

Sprint LTE data connection,VPN,Bria SIP Phone

Comments are closed.