Slashdot Mirror


Asterisk and Linux to Build Secure VoIP Connection

Beave writes "Using Linux and the Asterisk PBX, it is possible to build a secure, cost effective VoIP (and traditional PSTN) PBX solutions. This article shows you how to take advantage of various hardware, software and tricks to accomplish this goal within a limited budget."

36 of 140 comments (clear)

  1. What will the Romans do? by Anonymous Coward · · Score: 5, Funny
    Oh wait, that was Asterix and Obelix.

    s/Romans/phone comanies/

  2. Shows you how? by Dancin_Santa · · Score: 5, Insightful

    More like tells you in the most general of terms what they implemented.

    Obviously what is going to be the real killer app is VoIP in a wireless setup. Instead of having a wall jack for your desk phone, it just hooks into the wireless mesh seamlessly.

    I'm sure this has already been done. I'd love to see an article about it.

    1. Re:Shows you how? by Tony+Hoyle · · Score: 4, Informative

      It's possible, but the available wireless VOIP handsets are 11b only and don't support WPA (both are showstoppers for me).

      In the future I'm sure they'll become available.

      I use my asterisk server to record incoming/outgoing numbers (the local telco wants paying for this service, although I have to pay them anyway for the callerid so I'm not sure I'm saving much), and to route calls over the cheapest provider (always analogue, as VOIP providers in this country are still 2-3 times more expensive than analogue ones) - which has saved me a fortune.

    2. Re:Shows you how? by Student_Tech · · Score: 3, Informative

      Well you could get a PDA with a VOIP app running on it. For example, the Zaurus can have either KPhone/Pi or tkcPhone(demo version on their website). Both of those apps are SIP compatible.

      So you get a PDA and a WiFi conectivity and there you go.

      Probably not the best or most ideal solution, but it is something that does exist.

    3. Re:Shows you how? by itwerx · · Score: 4, Interesting

      although I have to pay them anyway for the callerid

      You'll still get it even if you don't pay for it because it's a PITA to truly turn it off in the switch and the telcos never bother. :)
      Call 'em up, ask 'em what the caller-id charge is for, when they explain tell 'em you don't need it and please take it off and voila' - you'll still have it without having to pay...

    4. Re:Shows you how? by Cramer · · Score: 2, Informative

      This is incorrect. As one who has dealt with Lucent 5ESS switches, it's as "easy" to turn off as it is to turn on in the first place. It's one of the many line provisioning options.

      Now, I say "easy" as the term is certainly relative when working with telco switches. I won't bore people with stories; suffice to say the CLI is very cryptic and the menu interface (from which all real work is done) is a bit complicated to the uninitiated.

  3. This is cool... by dealsites · · Score: 5, Interesting

    Be sure to check out this article on a sweet Asterisk implementation.
    --
    Watch this page for Black Friday Information!

  4. Useful Asterisk Resources by TheMysteriousFuture · · Score: 5, Informative
    Useful Asterisk Links:

    The Asterisk Wiki
    Note: the wiki search is useless. Search with google instead, use "searchterm site:voip-info.org" (without quotes).

    The Asterisk Documentation Project

    The Asterisk Mailing Lists
    Note: to search the lists use google again. "searchterm site:lists.digium.com" (without quotes)" in google.

    the #asterisk chat room on irc.freenode.org. Drop by and say hello.
    Note that due to problems with massive spambot attacks regisitration is required to join the channel. Simply type
    /msg nickserv register mypassword
    /join #asterisk

    The next time you join you will need to type
    /msg nickserv identify mypassword

    --
    .sig
    1. Re:Useful Asterisk Resources by fiji · · Score: 3, Informative

      Also useful for checking your connection to see if it can handle VoIP: testyourvoip.com (the site has had an overhaul... some interesting new features)

      -ben

    2. Re:Useful Asterisk Resources by ZX81 · · Score: 2, Informative

      Shameless Self Plug:

      For up to date information on Asterisk you can visit the Daily Asterisk News:

      http://www.sineapps.com/news.php - HTML
      http://www.sineapps.com/rssfeed.php - RSS Feed

      The above site contains (as you may have already guessed) daily updates on the Asterisk PABX and all related information.

      Cheers,

      Matt

      --
      -={ Security does not exist - give up }=-
  5. Whoa! by cmcguffin · · Score: 3, Funny

    I had no idea Asterix was a linux geek!

  6. Our solution by frankthechicken · · Score: 5, Interesting

    At my office we all have our own x-boxes, and using the X-box live service, we are able to happily communicate with each other at a very competetive pricing structure.

    The solution offers a simple text messaging scheme, and conference calling facillities.

    I can fully recommend this solution to any businesses looking for a cost effective VoIP.

    1. Re:Our solution by frankthechicken · · Score: 2, Funny

      we just use skype

      Actually, so do we, I was trying to make a little joke, which appears to have been taken seriously.

      I liked the idea of people talking wearing their "Xbox communicator" headsets whilst using the gamepad to furiously tap messages to each other.

      But if some people find it interesting, maybe there is some, small, tiny merit in the idea.

  7. Re:Well, Skype just works. by joormotha · · Score: 4, Interesting

    It is also loaded with spyware. Sharman Networks (creators of Kazaa) wrote this software. Use at your own risk.

  8. A view from the industry by jaymzter · · Score: 5, Insightful

    From an enterprise viewpoint, that is a very large service base, asterisk is dead in the water until it can match the simplicity of the interfaces found on proprietary systems. This isn't a knock on asterisk as a technology solution, but the telcom admin of a large corporation isn't going to want to look at a text file to figure out his dialplan or use some arcane interface when on a more mature system he can use a simple command like 'display dialplan'.
    I don't doubt many people have used asterisk as a voice solution for some companies, but not for any major companies and certainly not for any huge call centers. RTFA, a CIO would sh*t if you showed him snippets from some text file. Not to mention the questionable logic of running your voice system on a white box computer. It may be fine and dandy when e-mail is down for an hour, but five minutes without phones is a lifetime for any serious company. 5 9's is not a joke in the voice world and actually a rational expectation.
    In other words, I support asterisk simply because I love open source, but don't kid yourself, right now it's just a hobby app (as seen from the enterprise)

    --
    If thou see a fair woman pay court to her, for thus thou wilt obtain love
    1. Re:A view from the industry by LittleLebowskiUrbanA · · Score: 4, Informative

      " the simplicity of the interfaces found on proprietary systems"

      Apparently you've never used Avaya IP Office. I YEARN for the simplicity of text files. 3 freaking different GUIs to manage it and they're interconnected but you have to change things using at least 2 of them in many places.

    2. Re:A view from the industry by Damin · · Score: 2, Informative

      "the telcom admin of a large corporation isn't going to want to look at a text file to figure out his dialplan or use some arcane interface when on a more mature system he can use a simple command like 'display dialplan'."

      Hmmm.. You know.. you are absolutely right. Using "display dialplan" on a more mature solution is infinitely easier than using the "show dialplan" command that is found in Asterisk.

      asterisk*CLI> help show dialplan
      Usage: show dialplan [exten@][context]
      Show dialplan

      NEXT!

    3. Re:A view from the industry by DLG · · Score: 2, Interesting

      Likewise, as primary network and telephony guru at my firm, my Cisco CallManager based system, despite being primarily LDAP and SQL based as far as configuration is concerned (except of course where we are using H323 at gateways instead of MGCP) the interfaces necessary for the creation and move-add-changes of users is grueling. It makes me what to develop my own front end, ut of course if I start writing to their databases my support would go out of the window.

      Its easy to build pretty GUI's over configuration files. It would be nice if by following some sort of reasonable open standard for the backend data storage, we could create flexible and extendable interfaces as well as services.

      Does anyone know whether Asterix as any ability to manage MGCP/H323 based hardware such as vg248's or x6608 PRI blades?

    4. Re:A view from the industry by jaymzter · · Score: 3, Informative

      Ok, I'll take next! 'change dialplan', versus what exactly in asterisk? No need to respond, I've read their convoluted explanation of their concept of a dialplan.
      All that aside however, this isn't about knocking asterisk! I compared it to a Large Enterprise, and stated the obvious, that's all

      --
      If thou see a fair woman pay court to her, for thus thou wilt obtain love
    5. Re:A view from the industry by colenski · · Score: 2, Interesting

      >but the telcom admin of a large corporation isn't going to want to look at a text file to figure out his dialplan or use some arcane interface >when on a more mature system he can use a simple command like 'display dialplan'.

      except, 'show dialplan' already works in the asterisk cli, I just typed it a couple of hours ago.

      >Not to mention the questionable logic of running your voice system on a white box computer.

      Netfinity's are cheap on Ebay, I just got one for $400 Cdn 4 way Xeon w/ 4 gig RAM. Fully supported, documented, and you can't kill them with a sledgehammer. My Asterisk install with FC2 runs just fine on it, thank you. I simulated over 100 concurrent SIP sessions and the CPU's barely broke a sweat.

      >match the simplicity of the interfaces found on proprietary systems.

      Oh, it is to laugh. I'm currently supporting 80 seats running a $120,000 Mitel ICP3300 that uses something that can loosely be called a GUI, but is actually a wrapper on the CLI. Even to do simple things you have to go from GUI1 to GUI2 to CLI1 to CLI2...it's a fucking joke. In Asterisk, after you do your intitial setup (allocate your channels to a call processing context etc), you only edit voicemail.conf and extensions.conf. It's a blessing.

      There is a dumbed down GUI at voxbox but it's pretty primitive. Gimme the .conf file any day.

    6. Re:A view from the industry by zmanea · · Score: 2, Informative

      I can speak from experience on this. I work for a company that provides IT services for small companies. We implemented Cisco Callmanager at one of our clients and Asterisk at another. The client running CallManager has about 200 employees and when all was said and done cost about $250k (2 Call Managers, Unity, IPCC, router, switches, 7940s & 7960s). The client running Asterisk has about 15 employees and when all was said and done the cost was about $1000 (Asterisk on a Dell, Digium card, Handytone phones). Both solutions provided nearly identical functionality. CallManager was a PITA to get up and running and is a major PITA to administer and troubleshoot. If a user is going to be in an IPCC queue it can take 30 minutes to set them up. I can setup a new user in Asterisk in about 5 minutes. On average I easily spend 10 hours a week managing the CallManager system and maybe 10 minutes week on the Asterisk system, granted the Asterisk system is being used by a much smaller company. Asterisk is a full blown PBX that can be the best solution for small companies voice needs. It does have its limitations, mainly redundancy and scalability. Even with its limitations it has been a solid solution compared to the Cisco product. Some things are so simple with Asterisk yet nearly impossible with Cisco.

    7. Re:A view from the industry by tylenol3 · · Score: 2, Interesting

      I'm in the industry also, and I don't understand why Asterisk couldn't be an enterprise-grade application. Sensis here in Australia (one of the largest unified web/voice service centers in the country) runs on a proprietary soft PABX, which is a Windows-based solution. While the unified messaging capabilities and user interfaces are a bit more developed, the hardware on which they run is the same. It costs much less to build a fully redundant data server than it does a fully redundant proprietary voice server. I think it's a good solution for anyone willing to give it a shot.

      What I don't understand is why people seem to lose perspective of their telephone maintenance when they start talking VOIP. Just because you change to an IP platform doesn't mean you can't still outsource maintenance to a company dedicated to keeping your voice systems up and running. Chances are if you pulled out your old PABX and had an experienced company install an Asterisk solution, you could pay roughly the same amount for 24x7 cover that you're already paying on your Nortel or Avaya switch.

      I would like to know if any other telecomms CPE providers have considered Asterisk as a managed solution offering. Provide or partner with a data carrier for SLA'd data connections, use SIP handsets on the desktop, and locate the Asterisk server off-site. You could probably even think of it in terms of a server farm and tennant a certain amount of CPU cycles to smaller businesses. Consolidate voicemail hardware between companies, etc. With the proper carrier channels, you could offer relatively cheap call termination by placing POPs in key cities and bill as a monthly service.

      Anyone out there doing this sort of thing?

    8. Re:A view from the industry by Stinking+Pig · · Score: 2, Insightful

      Actually, it's fairly uncommon at large companies for the CIO to give a damn about how the thing is configured... that's your problem, Slashbot. Similarly, they wil indeed sh*t if they find it's running on a white box computer... but the choice of platform is your problem, not the software's.

      I'm not disagreeing with you about Asterix's readiness or lack thereof, I don't really have an opinion. But I do have a lot of experience with CIOs going through the buying process, and I can tell you that they think in terms of services rendered, costs incurred, and risks undertaken. If you can provide the service required at a reasonable cost with minimal risk, they really don't care how you're going to do it so long as your solution passes the sniff test. White box hardware in a mission critical solution stinks to high heaven, but an open source app on good gear with a clear set of contingency and support plans has a fighting chance these days.

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
  9. Is Asterisk Ready for Home Users? by PetoskeyGuy · · Score: 4, Interesting

    I have two incoming phone lines here. Is a PBX like Asterisk only cost-effective for office environments where they are paying thousands per month for bandwidth, or can this also be used to replace my current 2 line POTS setup?

    I have some spare computers, and would love the add voice mail, caller id, etc. Just wondering about keeping my existing phone numbers and monthly costs. When would I break even?

  10. Security wasn't part of Asterisk - it was OpenVPN by billstewart · · Score: 4, Informative
    The article said that they did't get their security from Asterisk itself - they added it on by using OpenVPN to build encrypted UDP tunnels and push the Asterisk IAX protocol through them. (No apparent detail on how to configure it.) Some of the Asterisk mailing lists talk about adding encryption to the transport protocols, but as near as I can tell from a few Google hits, that's really all a Wishlist for Somebody Else to implement rather than part of the core protocols.

    That's really too bad - encrypting VOIP causes extemely annoying overhead problems, because the voice data packets are really small (they're not very big before compressing them, and then they're even smaller), so the minimum overhead for just doing the RTP+UDP+IP headers is several times the size of the voice traffic they carry, and IPSEC adds another two layers of headers, or SSL adds about three, and pretty soon that cute little elegant 8kbps compressed voice stream is looking like 40-80kbps and won't fit on your modem. SIP can use the SRTP protocol as a modification of RTP, so to the extent that anybody implements it, it's basically doing then encryption along with a layer you needed anyway, so it doesn't add much overhead. IAX doesn't appear to have this (which is especially frustrating because the IAX2 trunking protocol makes multiple simultaneous connections much more efficient, though I suppose if you've already done that, the extra overhead of IPSEC or OpenVPN may not bother you as much.)

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  11. Re:Well, Skype just works. by finkployd · · Score: 3, Interesting

    Everything I have read and everyone I have talked to said there is no spyware in skype (as they claim). It is easy to check, spyware would communicate with the mothership somehow, just run a packet sniffer.

    What leads you to believe it has spyware? Because the Kazaa guys wrote it? Any actual evidence?

    Finkployd

  12. limited budget indeed by SuperBanana · · Score: 4, Insightful

    I purchased three Intel white-box computers for $800 each containing 2.6Ghz processors 512MB ram and 40 GB hard drives

    Anyone who recommends greybox PCs with non-raid storage for a financial institution...even a small one with only three branches...is not thinking very clearly. If it's for a business-critical application like the phone system, they're categorically insane.

    Folks- there's a reason those telco boxes cost lots of dough. They Just Work if they're left alone (in 7-8 years of working with telco equipment, 99% of the problems have been telco line provider problems; hardware failures are extremely rare). There are books upon books written with guidelines for what is considered telco grade, but the common theme is "keeps going, and if it breaks, it does so gracefully".

    $2500 can, even for a small bank, be PENNIES ON THE DOLLAR when the system goes down for even a few hours. If you've got a Lucent phone system and a support contract, they find stuff before you do, and no matter what time of day- there's a tech on your doorstep in an hour if they can't remote in via the system's POTS admin modem.

    You want a cheap phone system, you get what you pay for. It's remarkably irresponsible for the authors of that article to advocate Asterisk without mentioning that reliability and support pale in comparison to 'real' telco equipment.

  13. Re:Are you joking? by jaymzter · · Score: 2, Informative

    Both Nortel and Avaya PBXs have command line driven user interfaces, which is what I'm referring to. That in itself is only a surface similarity to asterisk. While both are CLI based, the proprietary ones are built not only on simple to recall commands, but it's the TEXT interface where all you have to do is fill out the proper fields that makes them better IMO. asterisk just gives you a blank line. Welcome to your first Linux install. It's the difference between doing 'make oldconfig' and 'make menuconfig'. WTF did you think I was referring to, a GUI? ;-)

    --
    If thou see a fair woman pay court to her, for thus thou wilt obtain love
  14. Re:Consumer broadband? by DA-MAN · · Score: 3, Interesting

    They connected their Asterisk PBX to the PSTN through a $500 card to a T1. How can I connect my Asterisk to my cablemodem (3/0.5Mbps)? What does it connect to over the WAN to complete calls to the global PSTN? Is it 100% reliable, with a complete footprint in urban areas, and failover to the rest of the POTS phones in the world?

    Simple, use ethernet and get a voip provider instead of using a PSTN T1. I currently use http://connect.voicepulse.com/, and that works great for me. Pretty cool, because you can have multiple incoming calls over one connection.

    --
    Can I get an eye poke?
    Dog House Forum
  15. Re:Security wasn't part of Asterisk - it was OpenV by cduffy · · Score: 3, Informative

    ...so the minimum overhead for just doing the RTP+UDP+IP headers is several times the size of the voice traffic they carry, and IPSEC adds another two layers of headers, or SSL adds about three, and pretty soon that cute little elegant 8kbps compressed voice stream is looking like 40-80kbps and won't fit on your modem.

    OpenVPN isn't IPsec, and while it uses the OpenSSL library for all the crypto "heavy lifting", it has its own over-the-wire protocol and is much more efficient than the traditional SSL way of doing things.

    I use OpenVPN at work, and while I haven't done specific measurements, we've generally found it to be very efficient (not to mention easy-to-use and hassle-free compared to its IPsec-based competitors). Because in UDP mode it doesn't try to guarantee reliability, it also doesn't break protocols (like those used for VoIP data) that expect late packets to just be dropped.

    So, in short, I'm not at all convinced that the use of OpenVPN is at all unfortunate or problematic here.

  16. Re:How does voip work for residential? by x.Draino.x · · Score: 2, Informative

    If you want to do SIP/IAX you only need a network card, no fancy $500 T1 cards..You can purchase DID's ( Direct Inward Dial ) from NuFone.net or connect.voicepulse.com to work with Asterisk. They give you a "virtual number" from whatever state you want. You can have multiple calls on the single DID. Basicly you put a statement in your IAX configuration file to register with either of the services ( after signing up with them ) and when you register it tells them what IP address your Asterisk server is to route calls to. Your Asterisk box then routes calls accordingly. You can also pre-pay for outgoing PSTN calls through these services for very cheap. I currently have a DID through Voicepulse and do outgoing through NuFone.net.. works great.

  17. Asterisk is our backup by ashitaka · · Score: 2, Interesting

    We have an 18-year old ROLM 9751 switch that thinks it's the year A4. Our voicemail is Octel running on OS/2 that thinks it's the year 104.

    The old telecom equipment is generally rock solid but if it dies it will take time to fix even under contract. The last time we had a card die we were without phone service for a full day as they had to Fedex a replacement from Toronto to Vancouver.

    As a backup against a catastrophic failure of the switch and/or voicemail I've set up an asterix box pre-configured with all the extensions and trunks.
    Switching to a complete VOIP setup using softphones at the start and adding VOIP handsets as they can be obtained could have us up with a complete PBX within 2-3 hours.

    --
    If you don't want to repeat the past, stop living in it.
  18. Trans-Atlantic VoIP by Evanrude · · Score: 3, Insightful

    A friend of mine, who works for a UK telecom and my company, Axigent, have setup a connection between our two asterisk systems that has proven fairly reliable and "secure". I would say with everything we've gone through to make the connection functional, the author of this column left out a lot of the details as far as full implementation of an Asterisk PBX. A helpful site, or at least one of the more helpful sites I've come across is the wiki at www.voip-info.org, which the author neglected to reference in his article. Knowing someone that works at a Telecom is a plus, I think the cost from both ends as far as equipment has been fairly minimal and the return on the time invested as far as learning what VoIP is capable of has been huge. All of the calls that are made back and forth have been clear. It's pretty impressive to call overseas at no charge.

    --

    ~.Evanrude
  19. Re:Security wasn't part of Asterisk - it was OpenV by billstewart · · Score: 2, Informative

    If you're running a UDP protocol, you've still got UDP headers and IP headers and optionally Ethernet headers, wrapped around whatever you're carrying, which already had a UDP header and an IP header, all to carry a payload that's only 10 bytes long, or 20-30 with some codecs. Yes, doing UDP instead of TCP takes care of some problems, but it's still a huge overhead for a protocol that absolutely needs to ship a large number of very small packets every second. By contrast, if you're using it to carry bulky applications like FTP or Email, the overhead's a drop in the bucket, because the data payloads are typically ~1400-1500 bytes. If you're carrying telnet traffic, which often has even smaller data packets than VOIP, you'd think it would be worse, but it's usually not - a 100wpm typist is typing about 15 characters/second (which might each be carried in a their own packet), compared to VOIP with about 50-100 packets/second and much tighter timing concerns.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  20. Asterisk Versatility by visionik · · Score: 2, Informative

    I've started to use Asterisk for various applications, including as a

    - PSTN to VOIP gateway: combine a cheap server, asterisk, and a few $50 voicemodem cards and you've got a VOIP gateway that can connect your outside phone lines to any VOIP phone.

    - VOIP to PSTN gateway: cheap server, asterisk, open VOIP provider like VoicePulse Connect, and some Digium FXS cards and you can connect every phone in your house to a VOIP network.

    - PSTN/VOIP front-end to IVR gateway: cheap server, Asterisk, IVR provider like Voxeo and you can connect all of the above to custom voice recognition applications. (Asterisk has some built in IVR but its limited today.)

    Several companies are starting to offer commercial PBX products based on Asterisk, including http://www.signate.com/ and http://www.fonality.com/.

    In summary, Asterisk is becoming an amazing "telephony widget" - it can address a variety of telephony solution requirements, depending on how you configure it.

  21. Re:Security wasn't part of Asterisk - it was OpenV by cduffy · · Score: 2, Interesting

    If you're running a UDP protocol, you've still got UDP headers and IP headers and optionally Ethernet headers, wrapped around whatever you're carrying

    Not Ethernet headers if they're running OpenVPN in tun mode, which is the intelligent configuration here (tap mode, the bridging configuration where Ethernet headers are used, is mostly used just by folks who want to do Windows networking over the tunnel without a WINS server). OpenVPN also uses LZO compression, which should help with any non-payload data. (That said, it temporarily disables compression if the stream is made of noncompressable data -- and in the case of precompressed payload, that's pretty darned likely to be the case). (Hrm -- it'd be intelligent to still compress the non-payload info... I don't actually know if the code does that, but am now tempted to go take a look).

    So yes, you make a point -- but even so, it's not as bad as it could be.