Maybe, the asterisk community is not as helpful as everybody is saying. I posted for some simple advice to get the community input on something and not even a single reply…

anyone care to to point me in the right direction?

Ok, so I need some advice from the professionals. I have a client that is looking for a new phone system. I have convinced myself and them, that Asterisk is the best solution for their budget, and it is reliable enough for production environment. Now, I have a very long IT technical background in about everything Telephony, Windows, Cisco, Mitel, Avaya… everything that is except for Asterisk and Linux.

With that being said, which product should I use to pull this installation off.

  1. Switchvox
  2. Trixbox
  3. Elastix
  4. VoIPTelecaster
  5. Intutiave Voice, Evolution

Now, my client has a central distribution center with 30 phones and about 15 remote locations that will need phones.

Any help would be great !!


For me Pure Asterisk has been always the best choice, and i’ll put switchvox in the second position.

Very few people will have experience of more than one of these options, and even fewer of them will be monitoring this forum.

However, my impression is that power users would always use bare Asterisk.

Maybe, the asterisk community is not as helpful as everybody is saying.

Alright, you asked for it buddy boy… get some coffee :smile:

I don’t know about any of the products. I ditched that idea when I saw the prices and uncertainty about how easy it would be to modify such a “turnkey” solution. Not to mention cheap (free) is just so damn attractive to the suits.

Pure Asterisk is the only solution IMO. You might want to look into FreeSwitch too since you are just beginning this adventure. The gentleman making FreeSwitch has some very compelling arguments about the drawbacks of the Asterisk architecture in general. However, I have found Asterisk currently very reliable in a production environment and have too much development in it. But you are at the beginning so…

FreePBX, AsteriskNow, PbxInAFlash etc. all $%$ $#&$$ $(#*. Completely, Totally, and Horribly. I don’t mean to offend anyone involved in them (seriously I don’t, kudos for starting such a project with awesome potential), but I had messed around with those initially and it did not work straight out of the box by any stretch of the imagination. However, the biggest drawback was that the GUI was sorely lacking. It needs a couple more notches on its belt in the versions. They were all just horrible, especially to a newcomer. Did not work with the changes half the time, and the initial installations quite often had serious fundemental failures. Basically, it was a nightmare to configure anything. So don’t waste your time with them as a newbie. The whole idea was to be easy and PNP like and ease somebody gently into Asterisk. It’s not. It’s more like being kicked out of plane without a parachute :wink: /end_friendly_rant

What I am using for server hardware?

I am using some pretty simple server hardware with no FXS/FXO hardware of any kind. Just a decent machine with a few gigs of memory (you will need it if you have a lot of connections and especially for conferences and meeting rooms). Also, get the virtualization extensions on the server if you plan on using Citrix XenServer (will talk about that later).

You can build a very decent Asterisk Server for $500.

I can’t really steer you any direction with regards to analog connectivity, certainly not with extensive experience. I deal with SIP/IAX exclusively for internal/origination/termination. You really don’t need anything else, and I don’t think you can use existing analog keysets used with traditional PBX’s anyways. Certainly not with products like USB Astribanks by Xorcom. If you need fax support, get something like a Mediatrix 2102. That will connect up the Asterisk server with SIP and the T.38 passthrough support should work just fine to connect to fax machines at remote locations and main central distribution center. You get two FXS lines on them each which could be used for two fax lines and are only $100 bucks a piece approx., although they just got discontinued by the manufacturer recently. Still plenty available on eBay.

If you want me to guess, I would say go with Astribanks by Xorcom. A unit with 8 FXO ports should run you right around $500. In my “youthful innocence” the salesmen sold it to me as a solution that would support the legacy analog keysets that were in use. Yeah… Anyways, they seemed to work just fine with regular analog phone lines coming in. Just not applicable to my situation, especially since FXO is meant to be connected to the Telco, and FXS is meant to connect to the analog phones, LOL.

I would still heavily advise you to port all the phone numbers to a reputable SIP provider and ditch analog circuits all together. Will ultimately be much cheaper than analog circuits, trust me.

Keep in mind, you will still need a single cheap landline for alarm systems if they are at any of the offices. Not a good idea to even try running that through Asterisk and most security companies I talked to would not support it and are heavily against it. The telephone company even told me that it was illegal to run the alarm system on a line that had DSL on it. I think they are full of it, but it seems like everybody on all sides wants alarm systems to have pure unadulterated analog circuits.

What I am using for software?

Pure source Asterisk compiled on CentOS 5. Add tftp, php5, curl, apache etc. You will need it. I am using 1.4.26 right now. I have not needed to go to 1.6 yet.

The only sane installation is virtual using Xen, VMware, whatever. I use XEN/Convirt and since we are heavily developed and experienced in it, we decided against Citrix XenServer once it went free and we tried it (that was bullshit by the way, the really useful stuff is of course still expensive). Citrix XenServer is slick as you know what (I loved testing it. It It is so choice. If you have the means, I highly recommend picking one up) but it will require the VT extensions even if you are not putting a Microsoft VM on it. Something wierd about getting CentOS installed since most of the templates complain about VT extensions missing.

Once you have a virtual CentOS 5 setup, just download and install Asterisk, etc. on it. It will take some time and directions, but you should get the hang of it in a few days at most and have a succesfully compiled and working installation. Only took me 5 hours the first time, and that was not smooth at all. If you are going to use any g729 codecs by Digium (you know those guys right :stuck_out_tongue: ), which I highly recommend btw, you are going to want to write the MAC address down and back that up with the licenses.

Once you have the setup working with some tests, back that sucker up and/or you can clone it for further provisioning of new Asterisk servers. You are going to want to set it up in the DMZ since quite a few SIP origination providers have DTMF problems that seem to only be resolved by having the Asterisk server with a public IP address and nothing in front of it. We use Sonicwalls to protect it so, it still has a strong firewall and we have it locked down to communicate with a few IP ranges for the SIP providers. Fairly safe, or at least acceptable level of risk.

What I am using for phones?

Aastra 9143i’s. Very decent, good feature set, and fairly cheap per seat. Most importantly:

  • Built in Ethernet Swtich so you can set it up right next to existing workstations without running new Cat5/6.
  • 3 lines with call appearences and 9 lines total. It’s confusing at first, but pretty much all the manufacturers list how many buttons have the word LINE printed on it, and then ultimately how many SIP connections the unit will support. Not easy to figure that out at first what the heck they meant.
  • 7 Progammable keys and 1 touch Call Park support, Shared Line Appearences, BLF’s, all the good stuff.
  • Nice decent backlit 4-line LCD display.
  • POE support for those installations that will be standalone and wall-mounted where you don’t want the hassle of also providing power.

What I am using for connectivity?

The Asterisk server itself is colocated along with other hardware and is hooked up the phones exclusively by VPN tunnels to all the offices, and roaming VPN clients are also using connected with hardware phones in some cases, but mostly software SIP phones like X-Lite by Counterpath.

The branch offices all have T1’s at a minimum and the call quality so far has been excellent. No problems. Even from my house which can only get a really crappy 1.2 Mb/s connection is still surprisingly good over VPN. 9/10 if I was to give an honest rating.

Ahhhh, what about configurations without a GUI?

Asterisk - The Future of Telephony - 2nd Edition covering 1.4. Download it in PDF. It will be your bible. Sleep with it. Make love to it. Whisper sweet nothings to it when nobdy is looking…

Once you verified a successful installation and have run Asterisk -rvvvvv you will see it up and running. You can probably move forward.

You are concerned with one directory above all else on the server. /etc/asterisk

Here are the configuration files. There are lot of them and your first instinct is to be a little overwhelmed. Most of it does not apply to you initially. Most likely in fact. Most of them that you open up… just delete ALL OF IT with very few exceptions. You can make backups for looking at in the future, but it will just confuse you initially. Your much better off beginning a journey that will ultimately lead to total mastery of these files which is far superior to any GUI… in fact, you can write your own GUI once you attain mastery. It won’t take you as long as you think, especially with your new Bible. I went from from a clumsy moron to Qwai Kai Chang in about 10 days. It’s not complicated once you get into it. Easier than PHP and most coding languages in fact.

The really important ones:

SIP.CONF - Here is where you define how hardware and sip phones can even connect to your Asterisk Server. This is where you put passwords and assign them labels in brackets which to make it easy should be a numeric extension.
You will begin here FIRST. Start HERE grasshopper. You need to make configurations here to even get a phone to connect succesfully at all. This is where you will put SIP origination and termination providers as well. They make it easy too, they will just give you the code, you only have to modify one line, and most give you pretty good instructions on where the code pieces go in SIP.CONF. That one line needing to be modified is called the context that maps to the next file EXTENSIONS.CONF. Just rename it something else and remember it. For our example we will just call it incoming_calls written as “context=incoming_calls” on a single line.

In the beginning of this file you will have a section that starts with [general]. Save everything generated under here and delete everything else (comments begin with a “;”, get rid of them too). Right under all that put an [authentication] section on a single line. All your SIP entries for the phone will be below this at the end of the file. The exception will be the registration lines for the SIP providers which will be under the [general] section.

Here is an example of an entry for one of the Aastra phones:

[1100] ;<<-- this is the numeric label. It’s the context that is referenced from other files. This is what people would dial to reach it.
type=friend ; <<-- this just means it can receive and make calls.
context=phones ;<<-- this is the context that you will be using in EXTENSIONS.CONF
host=dynamic ;<<-- DHCP is being used for the phone, or basically it’s IP address o the other end is not limited to something in here.
secret=mysecret ;<<-- the password for this connection. Make it random, and long. Otherwise, at some point you might be in for a fantastic buttraping if not careful. There are some mean people out there.

It’s that simple for this file. All of that other stuff would have just confused you. There are quite a few more parameters for each SIP entry, and you can look them up in your Bible. These are just the basics to get it working, you can add as neccessary if you actually need it.

EXTENSIONS.CONF - This is what you will keep hearing referred to as the dialplan. You figured that they might just freakin’ call it dialplan.conf for us newbie/morons, but noooooooooooooooo.

This file is where you define the HOW, as SIP.CONF was defining the WHAT. Now dear GOD, this file starts out premade with a lot of confusing crap too. More than SIP.CONF. There are two sections here [general] and [global] keep everything under these two sections not remarked out with a “;” and just check the rest. Afterwards it should clean up remarkably well.

This is all that was left of mine after I deleted everything:

static = yes
writeprotect = no
clearglobalvars = no
CONSOLE = Console/dsp ; Console interface for demo
IAXINFO = guest ; IAXtel username/password
TRUNK = Zap/G2 ; Trunk interface
TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)

That’s it. Starts out with freakin’ pages like the plans to the fuckin Matrix…

Anyways… Now you need to start with the simplest of sections… your section that handles the SIP origination (incoming calls to your phone numbers). Remember what that context was defined as? “incoming_calls”.

Create a section like this with these 3 lines in it: (pretty much everything is going to begin with “exten =>”, btw)

[incoming_calls] ; <<-- you defined this for that SIP provider in SIP.CONF with the context="" line.

exten => _.,1,Answer() ; <<-- This just means answer the call when it comes in from any phone number being called that you have. If it is specific, it would like exten => 17145551212,1,Answer() instead. This answers everything sent to it period. The underscore means that we are using pattern matching, and the period is like a *. It’s not a * btw, since… yep * is on telephones and it would get confusing wouldn’t it? So period is the wildcard.

exten => _.,2,Dial(SIP/1100,30,tTkK) <<-- This will immediately send the incoming call that phone you registered with extension 1100.

exten => _.,3,Hangup() <<-- Hangup the call when completed. With this right after, there won’t be any busy line handling, sending to voicemail, etc. The phone would just hangup after 30 seconds if not answered.

You will notice that there is a 1,2, and 3 in them. Those are the specific order that is completed when any number matches the _. pattern (which is everything). It is not limited to that, which is why the initial file can be confusing since it will hold a lot of stuff like s,n, blah blah blah instead. Start out with 1,2,3. Baby steps.

Now what if your extension 1100 wants to dial an outside number? Remember the context for your phone in SIP.CONF? – “phones”

exten => _1NXXXXXXXXX,1,Dial(SIP/${EXTEN}@your-sip-provider) <<-- This will support only full 11 digit dialing, but it will take any 11 digit number beginning with a 1, the 2nd digit being a 2 or higher, and then followed by 9 digits between 0 and 9 and send it out to your SIP termination provider (more than likely the same one providing origination). You will want to replace the “your-sip-provider” with the context given to you by your SIP provider. It will be between the []'s in the SIP.CONF. The ${EXTEN} is a variable which is the number YOU are calling from the phone.

Let’s say you had two phones and you want them to be able to call each other. Just add this under the phones context:

exten => _1XXX,1,Dial(SIP/${EXTEN},30,tTkK)
exten => _1XXX,2,Hangup

That ${EXTEN} once again is replaced with either 1100 or 1101 depending on who is calling each other. That SIP/1100 by the way simply represents that you are using SIP to make the connection, 11oo is the extension. The 30 is a timeout, and the tTkK are just some options you will figure out later. This will only work with extensions that are 4 digits and start with a 1.

There it is. This simple setup will get you a single phone that will accept inbound calls and make outbound calls. Just like a landline in a house, with just the basics.

A few other conf files you will be interested in like agents.conf, voicemail.conf, users.conf, features.conf, and musiconhold.conf. They all hold more “advanced” features that you can ease yourself into.

Ohhhh, and IAX.CONF. That one is “sister” to SIP.CONF. Most hardware phones like the Aastra are going to be SIP, but Asterisk Servers can communicate to each other with IAX instead. Some phones and origination/termination providers use it as well. It’s used pretty much like SIP.CONF. Not much different other than some different parameters, but largely the same stuff.

So there you go. This might start you in the right direction. You can be running the Asterisk Server at the central distribution center with the 30 phones and just use site-2-site VPN tunnels to connect the remote phones into it. If you throw yourself into it (and have a reasonable skill set) you should be able to be up and running with something pretty decent inside of a month being realistic. Your startup costs will be $500-$1000 dollars for the server, $150 per phone to be conservative, and let’s say about $200 dollars a month at most for your SIP provider service assuming something like 15,000 minutes a month with 11-15 phone numbers in your setup.

P.S - Yes, I had a few glasses of wine and your post started out like a complaint/challenge. G’nite!

That was a serious reply EDIII

I just set up a 11 extension system for my office, with 2 remote sites. Took me about 8/9 hours to set up with no previous linux experience. (6 of which was sorting out teething problems with Asterisk config).

I have 3 Cisco small business/linksys/sipura (they have brand identity issues) SPA962 with SPA932 attendant consoles and 7 SPA942 and 1 Cisco 7941 all working fine.

I had the best fun yesterday calling our monopoly-don’t-want-to-help phone-service-provider, and cancelling about €400/month with them. I my new phone bill will be around €80. Only spent about 1000 on phones, ROI will be bloody quick.

If he has a linux computer (as in my case I bought one for NAS) throw Asterisk on to it. Use 1.4, download the Asterisk GUI for it so that the owner can manage it himself in future. Buy zyxel vpn router/firewalls for the remote sites, they have really good IPSEC VPNs and they all come with QoS i think. When choosing internet connection don’t just go for the one with most bandwidth, your looking for low latency/low contention connections.

Also buy some stuff from digium. If he has 30 employees across 15 offices during this recession im sure he can spare a buck for the lads.