FreePBX Offers SIP Service

Not only does FreePBX provide one of the most feature rich PBXs in the market, with a price that can’t be beat, it is has also been the key for thousands of businesses to escape the lock that traditional telephony providers have had on them for so many decades.

With SIP phone service so readily available, it has led to hundreds of SIP VoIP telephony providers and with that, a lot of confusion as to what providers to use and who is going to provide reasonable service and be ready to support a FreePBX/Asterisk based platform, or who is even going to continue to be around as many have gone out of business. Having worked with hundreds of customer systems, I can tell you that the reliability and technical knowledge amongst these providers varies across the board and choosing who to use or trusting what they are telling you when things go wrong can be a daunting task for the customer base.

With the affiliation of Bandwidth.com as the primary corporate sponsor of FreePBX, we decided to help our customer base by developing a service that would be mutually beneficial to FreePBX users looking for reliable SIP trunking services and for the FreePBX project to gain a revenue stream to further support its development efforts. Bandwidth.com has one of the best VoIP infrastructures in the US market with a nationwide network and multiple points of redundancy across the country. They are also a strong and financially healthy company, with three INC 500 awards from 2005-2008, one of only nine companies to win the award three years running. Of those nine privately held companies, Bandwidth.com was the 4th fastest growing overall and the only Telecom firm on the list.

Although Bandwidth.com has been supplying one of the best SIP trunking services in the industry, they have not offered their service using instant online activation nor is it available to systems that do not have static IP addresses. In order to address this we have created a new FreePBX branded SIP Trunking service delivered on Bandwidth.com’s network with the goal of seamless interoperability with FreePBX and available for quick and easy activation so you can be up and running in minutes. Our initial offerings will target the commonly requested Unlimited 2-Way SIP Trunk service complete with one or multiple DIDs on an account and E911 enabled service across the US.

Although our service will not be free in the same way that FreePBX is, we are striving to create an excellent service at a reasonable price and will evolve the capabilities as new customers come online and provide feedback for what they are looking for. One example of “reasonable” is the cost of DIDs (inbound phone numbers). We have found that many providers serving SOHO and small SMB businesses charge $5-$15 per additional DID per month! There is no good reason for that and as a result, we will price our DIDs for only $1 each per month, so purchase as many as you need!

Are you looking to obtain top quality SIP service that runs on one of the best VoIP network in the country, is designed to work with FreePBX and will directly support the further development of the project?

Cisco Unified CM 6.1 to Asterisk and FreePBX SIP Trunks (Powered by Bandwidth.com)

One of the systems I manage is an 875 Extension Cisco Unified Call Manager(UCM). At the moment the system uses SCAN trunks for long distance calling. These SCAN Trunks are provided by the state of Washington and interconnect via a four port FXO card. Callers use a PIN to make long distance calls. This is some seriously old school technology and as such has sound quality to match.

So, armed with a four port SIP trunk account from Bandwidth.com, I set forth to make a SIP trunk from the UCM to Bandwidth.com. Long story short… it does not look like I can. I can set things up that should work, but don’t. There is an active TAC open with Cisco and when(if) we make it work then I’ll be back in a new blog entry.

Instead, we have “Cisco Unified CM 6.1 to Asterisk as SIP Proxy for Long Distance service.”

What is difficult to impossible with UCM is trivial in Asterisk w/FreePBX.

For Bandwidth.com I made a new SIP Trunk with the name of “freepbx” and here are the PEER Details:

username=myusername
type=peer
sendrpid=yes
secret=mypassword
qualify=yes
insecure=very
host=trunk.freepbx.com
fromdomain=trunk.freepbx.com
context=from-trunk

The Register name was formated like this:

myusername:mypassword@trunk.freepbx.com/360746XXXX
——-
For the UCM, I made a SIP Trunk named “ucm” and here are the PEER Details:

type=peer
context=from-callmanager
host=10.XXX.XXX.XXX
disallow=all
allow=ulaw&alaw
nat=no
canreinvite=no
qualify=yes

and in extensions_custom.conf, courtesy of Philippe, I added ( to have these calls bypass most of the dialplan logic )

[from-callmanager] include => from-internal
exten => _1NXXNXXXXXX,1,Dial(${OUT_12}/${EXTEN});
exten => _1NXXNXXXXXX,n,hangup

NOTE: the the “OUT_12” reflects the “freepbx” trunk and the last thing to do is allow anonymous SIP as the calls are routed w/o authentication from the UCM ( for now.)

From CallManagerToSIP

Now on to UCM.

From CallManagerToSIP

Since we are using no authentication to send calls from UCM to Asterisk this part is somewhat straight forward. First step is to define a “SIP Trunk Security Profile Configuration” making sure the “Outgoing Transport Type” is UDP, which looks like:

From CallManagerToSIP

Then we create the SIP Trunk, noting that the “Calling Search Space” in this case is “Reserved Incoming Calls” which basically does not allow inbound calls to go anywhere:

From CallManagerToSIP

The last three items to set up are the “Route Group, Route List and Route Pattern.”

Here is the Route Group:

From CallManagerToSIP

Here is the Route List:

From CallManagerToSIP

And since we need a way to direct calls out this SIP Trunk to make long distance calls, here is the Route Pattern so users dial “891NXXXXXXXXX” to dial out:

Bare in mind, I only want calls going out this trunk ( not in) so if you wanted bi directional calls… You would adjust the “Calling Search Space” in the trunk to allow it.

Otherwise, that is the setup that is live for now. Once an Authenticated SIP Trunk can be sorted out on the UCM, I plan to go directly to Bandwidth.com and skip the proxy.

Hello, again. I’m all a-twitter over coming back.

As some of the more observant have noticed, I’ve been doing [url=http://freepbx.org/trac/changeset/7725]some[/url] [url=http://freepbx.org/trac/changeset/7723]commits[/url] to FreePBX recently. Does that mean that I’m back? Well. Yes. Yes it does.

For those that don’t know, back in the mists of time – almost [url=http://freepbx.org/news/2007-06-22/time-for-me-to-hand-over-the-reigns]two years ago[/url] – I discovered that I had run out of hours in the day. This meant that I had to give up the most enjoyable hobby I’d had in years (FreePBX, that is. You with your dirty minds!) to concentrate more on stuff happening in the real world.

Phillipe grabbed the ball and ran with it, and I have been exceptionally happy with where he’s taken FreePBX. Yes, of course I’ve been watching, and even occasionally updating my home FreePBX machine. I’m loving it.

I have, however, been doing some low profile work for some long term VoIP customers here in Australia (Oh yes – I’m Australian for those that don’t know. I live in Queensland, on the coast. It’s great here! Uh.. unless you Americans want to come over. In that case it’s terrible, and we’ll feed you to the sheep) which is starting to bear fruit. This means that I can get paid for doing FreePBX work. And, of course, any FreePBX work must be GPL’ed (or [url=http://en.wikipedia.org/wiki/Affero_General_Public_License]AGPL’ed[/url], of which I will post about later) so I’ve been able to do some commits.

Those [url=http://freepbx.org/trac/browser/contributed_modules/modules/cidroute]first commits[/url] gave me the taste for more, and last week I discovered I had time on my hands, so I went charging into the bug tracker and [url=http://freepbx.org/trac/search?changeset=on&q=xrobau]went to work.[/url]

Also in those two years, the Net has been evolving, and growing. 2 years ago, the Facebook App platform was released, which lead to the astonishing growth of Facebook into the dominant force it is today. Twitter wasn’t even AROUND. But they both are now.

So, because I’m as cool, hip and froody as the next Pyro, I’ve started tweeting to the [url=http://twitter.com/FreePBX]FreePBX twitter account.[/url] This I hope to keep up for as long as possible, or until I get bored, whichever comes first! I’m also planning on having some sort of tweet bot that posts to a different account that alerts people of changes and patches, if they’re interested. Note that those accounts will solely be about FreePBX. I’ve got [url=http://twitter.com/xrobau]my own twitter account[/url] which will have general geekism and family stuff in there. Don’t subscribe to me unless you also want to have [url=https://twitter.com/xrobau/status/1833792436]random iPhone pictures of clouds[/url] and vitally important (to me) [url=https://twitter.com/xrobau/status/1810749451]baby status announcements[/url].

I’ll be handling ‘twitter’ support requests too. Feel free to tweet @freepbx and I’ll reply. Of course, that reply may be wrong, abusive, or totally irrelevant, but I’ll try my best. This isn’t, I hasten to point out, any form of Official Support Channel. If you want real, paid, support, then there’s a [url=http://freepbx.org/freepbx-official-paid-support/]link you need to click on[/url]. Operators are standing by to take your calls. Call now! But wait, there’s more – you also get a free set of steak knives! [sup][Not really][/sup]

In summary – it’s great to be back. And I hope that everyone enjoyed reading this post as much as I enjoyed writing it. I’ll see you on IRC, or on Twitter, or somewhere in my travels.

–Rob

Restricting outbound calls in FreePBX (whitelist)

Previously, we discussed [b]preventing [/b]outbound calls from FreePBX by using two methods: Misc Applications and outbound routes. There is also (at least) two ways to [b]allow [/b]outgoing calls using a whitelist, i.e. allowing calls [b]only [/b]to the numbers specified.

The first one is extremely simple, and I can already hear you saying “Duh!”. But sometimes the answer to a problem is staring us right in the face and we miss it anyway. So at the risk of insulting some of you, and hopefully enlightening some of you, here it is: Password protect your outbound routes. Yes, extremely primitive – but it works! Password protect those routes that you don’t want your users calling, and just leave the others unprotected. This will allow for an environment where you have very tight control over outbound calls.

The second way to restrict outbound calls is much more sophisticated and allows for refined control of which extensions/user are restricted and which aren’t (obviously without the use of a password). One of the goals of this method are to restrict the outbound calls but [b]nothing else[/b]. This method will keep all other FreePBX applications available to the restricted user: Voice Mail, Conferences, Paging, Call Forwarding, etc. – will all be available. The only thing restricted will be outgoing calls.

The first step is to segregate the restricted context form the other users. Start by opening /etc/asterisk/extensions_custom.conf and adding the following context:

[from-internal-restricted] #exec /var/lib/asterisk/bin/restricted.sh

The next step is to make sure asterisk will ‘follow’ the ‘exec’. Open /etc/asterisk/asterisk.conf and make sure you have a line that reads:

execincludes=yes ; support #exec in config files

(specifically, ensure there is no ; at the begging of the line). Next download this script, and save it to /var/lib/asterisk/bin/restricted.sh. Now, create /etc/asterisk/whitelist and add a list of numbers that you want whitelisted. Here a helpful hint: you can a space and a description after the number so that you remember who’s number it is and why its there. Here’s an example:

2125551212 bob
6565552121 marry
4264441212 bill

The last step is to place any extension that you want restricted in to the restricted context. In FreePBX, click Extensions -> select the extension -> and scroll down to the context option. Append -restricted to the text and click submit.

Finally, from the linux cli, type amportal chown and reload the asterisk dialplan in your usual way, either by clicking the orange reload bar in FreePBX or by entering dialplan reload from the asterisk cli.

Now, try to place a call from your restricted context – it should be blocked!

The way this works is as follows: when you reload asterisk, it executes the restricted.sh scrip and includes its output in the dialplan (dynamically). The scipt reads the FreePBX generated dialplan and copys the entire from-internal-additional dialplan in to our custom context (well, not the entire dialplan per se – just the includes. For more on how this works see my previous articles). It then reads the numbers listed in your whitelist file and creates routes for them as Local channels (which are callable by restricted extensions as they can call all [b]internal[/b] extensions).Cool, eh?

Got another way to restrict outgoing calls? Lets hear about them in the comments!

[b]Moshe Brevda, FreePBX Development Team[/b] lazytt – FreePBX forums
hi365 – IRC

Open Telephony Training in the Pacific Northwest

Sometime early in 2006 I started building systems with AA@H. About the only inexpensive way to learn Asterisk was in the forums and blogs. It was in the Nervittles blog of Ward Mundy that I won entrance to the first Fonality trixbox® Open Communications Certification (FtOCC, pronounced “F-talk”) workshop, held in LA – March 2007.

The best thing that came out of FtOCC was putting faces to names I’d seen online. The technical level of FtOCC ended up being a bit too basic for me, and I started to ask around the greater Asterisk community if anyone, including Fonality, had plans to hold more of an engineers course in the near future. Fonality was dead silent. Philippe Lindheimer, the lead developer of the FreePBX project, whom was taking over for Rob Thomas at the time… wasn’t.

Philippe and I engaged in lengthy discussions and I even enticed some of the FreePBX team out for a gourmet meal to talk about what would make the ultimate Asterisk/FreePBX seminar. As things progressed, I was introduced to Tony Lewis and Ethan Schroeder of Schmoozecom (a successful Asterisk based solutions provider) when FreePBX and Schmoozecom collaborated to create the Open Telephony Training Seminar or OTTS for short. The 1st of which February 27-29th , 2008 in Charleston, SC.

I helped shape the OTTS experience with FreePBX and Schmooze, providing my parts of the expertise and producing parts of the content that I have spoken publicly on in other venues and I was invited along to teach the E911 section of the course. It was a roaring success and a great time was had by all.

Fast forward to 2009 and I am organizing the first OTTS in the Pacific Northwest. On April 21st, 22nd and 23rd, 2009 the trainers at FreePBX.org have cooked up something very nice for the next offering of the Open Telephony Training Seminar as the venue is located in the northwest corner of Washington State , halfway between Seattle and Vancouver, BC sits Lummi Island, home of The Willows Inn , an historic Bed and Breakfast retreat. FreePBX-athon redux. This time Philippe Lindheimer and I will be teaching this course in a slightly modified version to fit the venue. Most of the marketing section has been omitted and the class is three days instead of four. It will feature a live lab for demonstration and student use during the course.

The Open Telephony Training Seminar provides some of the best Asterisk®/FreePBX® VoIP training available and has an additional constant source of enjoyment – trainers and learners tend to stick together through meals and enjoy good conversation into the evening. These adhoc roundtables are not planned, it just happens and is said to be one of the great joys of the Open Telephony Training Seminar.

Learners are in for a treat at the Willows Inn as its organic, authentic farm-to-table fine dining is consistent with Slow Food, making The Willows Inn one of the most sought after B&Bs and agritourism destinations in the San Juan Islands. And just as small class size benefits our children in school, small class size in technology training is also better for the adult learner and with chef prepared organic meals the trainers and learners will have plenty of time together. Arrangements can be made for spouses to attend meals and otherwise relax as their significant other learns. Learners considering bringing a spouse along may want to book early as all the rooms at the Inn are great, but each is different and you can choose until they are filled.

After the seminar, On April 26th and 27th the tenth annual LinuxFest Northwest 2009 is being held in nearby Bellingham, Wa. As an added bonus, learners who want to stay and attend Linuxfest will be offered weekday rates that weekend at the Willows Inn. Book early if that is something you are interested in.

We need to fill ten seats to make our new format a reality and as these events are always great, the value is there. The Willows Inn has allowed us to block off their entire facility, but it means filling it up to make the class a reality. So with that note, we need to get 10 participants – and are offering a 20% discount for the first 3 to sign up by March 15th date to make sure we reach that goal. Contact me at rkeller at legoebayuc.com for the coupon code.

Please consider joining us.