Recently in Asterisk Category

Your IP-PBX is one of the most critical pieces of corporate infrastructure. It cannot afford any downtime, which is why the fives 9's (99.999%) of reliability was coined. While Asterisk is a pretty stable open source IP-PBX platform, it it still in its infancy, so it hasn't had the same time that the old 'Big Iron PBXs' have had to reach five 9s of reliability. Then again, many traditional PBX manufacturers have abandoned 100% proprietary hardware and use many of the same standard off the shelf components that are in Asterisk, including motherboards, memory, processors, etc. So the old wives tale that big iron PBXs are more reliable than PC-based PBXs no longer applies.

trixbox-logo.jpg Still, Asterisk and all of its derivatives (trixbox CE/Pro, PBX in a Flash, etc.) have a cult following (of which I'm a member) -- and like any cult, we like to do crazy things, like tweak Asterisk or trixbox in the middle of the work day to see if some newfangled text-to-speech feature will work. Well, with so much tweaking by some Asterisk cultists, something is bound to go wrong, usually at the end of the work day on a Friday when you're driving home, forcing a return to the office or waiting to you get home and SSH into Asterisk to restart the service.

So how do we ensure a more reliable Asterisk platform using an automated tool? Surely there must be a way of monitoring the Asterisk service and if it crashes, automatically restart it, right? Ever second is precious when you're trying to achieve 5 9s of reliability, which equates to 5 minutes, 15 seconds or less of downtime in a year. Or if you want to get really crazy, shoot for 6 nines of reliability (99.9999%) which is 31.536s of downtime per year!

monit-logo.jpg Well, before we continue, you must remember that Asterisk runs on Linux and there are many great monitoring tools for Linux. In fact, for the blog web server you're reading this article on, I'm running a free monitoring tool aptly called monit, which you can get here.  This tool is so easy to use, it should be in any Linux admin's arsenal. I use it to monitor various parameters of the blog server, and if certain conditions are met, it automatically restarts the apache web service.

It got me thinking, "Why not use monit to monitor Asterisk?" Well, here's how to do it!

1) Install monit.
2) Simple way: Run 'yum install monit' or run 'apt-get install monit' Go to Step
3) Compile/Harder way: Go here: http://mmonit.com/monit/download/ and download the .tar file, currently called monit-5.0.tar.gz
4) Untar monit
# tar -zxvf monit-5.0.tar.gz
# cd monit-5.0
Configure and compile monit:
# ./configure
# make
5) Install monit
# make install
6) Copy monit configuration file to /etc/ folder
# cp monit.conf /etc/monit.conf (older versions used monitrc filename)
7) Edit monit.conf & put in your monitoring rules (see examples below)
8) Add monit service to the startup. Red Hat command follows:
# chkconfig --add monit
# chkconfig --level 2345 monit on
# {confirm the run levels}
# chkconfig --list|grep monit

It is super easy it to setup the mail server for notifications and to configure monitoring of processes, files, loads (CPU, memory), and ports. And of course, using monit you can monitor Asterisk, trixbox CE or Pro, PBX in a Flash, and other IP-PBXs that run on Linux.

Here's a snippet from two monit.conf configuration files (one the blog server, the other Asterisk):
###############################################################################
##
## Start monit in background (run as daemon) and check the services at 2-minute
## intervals.
#
set daemon  120 # can set lower if want downtime <2min
set mailserver mail.tmcnet.com     # primary mailserver
## You can set the alert recipients here, which will receive the alert for
## each service. The event alerts may be restricted using the list.
#
  set alert blogalerts@tmcnet.com          # receive all alerts
  set alert anotheremailhere@somewhere.com
  check system blog.tmcnet.com
    if loadavg (1min) > 4 then alert
    if loadavg (5min) > 2 then alert
    if memory usage > 75% then alert
    if cpu usage (user) > 70% then alert
    if cpu usage (system) > 30% then alert
    if cpu usage (wait) > 20% then alert
  check process apache with pidfile /var/run/httpd.pid
    start program = "/etc/init.d/httpd start"
    stop program  = "/etc/init.d/httpd stop"
    if cpu > 60% for 2 cycles then alert
    if cpu > 80% for 25 cycles then restart
    if totalmem > 1300.0 MB for 5 cycles then restart
    if children > 250 then restart
    if loadavg(5min) greater than 10 for 8 cycles then stop
    if failed host blog.tmcnet.com port 80 protocol http
       and request "/monit/doc/next.php"
       then restart
    if failed port 443 type tcpssl protocol http
       with timeout 15 seconds
       then restart
    if 3 restarts within 5 cycles then timeout
    depends on apache_bin
    group server

# Asterisk Monitoring rule
set daemon 30 # Check every 30s
set logfile syslog facility log_daemon
set alert asteriskalerts@yourdomain.com
check process asterisk with pidfile /var/run/asterisk/asterisk.pid
group asterisk
start program = "/etc/init.d/asterisk start"
stop program = "/etc/init.d/asterisk stop"
# Check uptime via Asterisk Manager Interface (AMI) port 5038
if failed host 127.0.0.1 port 5038 then restart
if 5 restarts within 5 cycles then timeout

#Check Veritas BackupExec Agent
check host blog.domain.com with address 192.0.0.6
start program = "/etc/init.d/VRTSralus.init start"
#stop program = "/etc/init.d/VRTSralus.init stop"
if failed port 10000 with timeout 35 seconds then restart
Further, you can even test the SIP protocol, which uses port 5060. The SIP test is similar to other protocol tests that monit supports, however, it allows extra optional parameters.

IF FAILED [host] [port] [type] PROTOCOL sip [AND] [TARGET valid@uri] [AND] [MAXFORWARD n] THEN action [ELSE IF SUCCEEDED [[<X>] <Y> CYCLES] THEN action]

TARGET : you may specify an alternative recipient for the message, by adding a valid sip uri after this keyword.

MAXFORWARD : Limit the number of proxies or gateways that can forward the request to the next server. It's value is an integer in the range 0-255, set by default to 70. If max-forward = 0, the next server may respond 200 OK (test succeeded) or send a 483 Too Many Hops (test failed)

SIP examples:
  check host openser_all with address 127.0.0.1
   if failed port 5060 type udp protocol sip
      with target "localhost:5060" and maxforward 6
   then alert
 
  check host sip.broadvoice.com with address sip.broadvoice.com
   if failed port 5060 type tcp protocol SIP
      and target 1234@sip.broadvoice.com maxforward 10
   then alert

Now that you know how to automatically monitor Asterisk, trixbox, PBX in a Flash, etc. those five nines (6?) of reliability are just around the corner. As the PBX administrator / telecom manager, you will be worshiped by your sales team star-trek-who-mourns-for-adonais.jpg and boss for keeping the phone system up all the time. They will think you an Asterisk God, who will be adored and who shall command great respect and admiration. And none shall mourn for any Asterisk outages.

AsteriskNOW 1.5.0 Released

April 1, 2009 8:45 PM | 0 Comments
asterisknow-logo.jpgAsteriskNOW 1.5.0, which launched as a beta in October 2008, is now available for download at http://www.asterisknow.org/downloads. Of course, existing AsteriskNOW users can simply run "yum update" to update to the latest release. I love 'yum' for Linux systems - it's like Windows Update on steroids, but without the Internet Explorer GUI requirement.

According to AsteriskNOW, here are the notable changes since beta2:
* Updated several packages to latest versions (Asterisk, DAHDI, etc)
* Fixed more permissions issues between Asterisk and httpd/FreePBX.
* Updated to CentOS 5.3 (http://lists.centos.org/pipermail/centos-announce/2009-April/015711.html)
Some big news from Digium. Rich Tehrani met with them yesterday to get the inside scoop. Rich takes copious notes on his iPhone, which he sent off to me to try and write up this news. Alas, I've been pretty busy myself, but I wanted to share Rich's notes below, since there are some good "nuggets" in there.

For instance, from Rich's notes I see that Switchvox 4.0 is on the verge of shipping. But the really big news is that Asterisk has announced the general availability of technical support subscriptions for open source Asterisk. Before if you wanted support from Digium, you had to purchase Asterisk Business Edition. Well, no longer. Now, all of you Asterisk fans out there that try Asterisk tim-toolman-taylor-asterisk.jpg(and think you know what the heck you're doing) but get stuck, can now contact Digium and get some support. No more relying on the Asterisk community to answer you questions. Not that asking the Asterisk community is a bad thing, but if you phone system is down, you can't wait hours for someone to respond to an online posting. This could be a huge revenue-generating opportunity for Digium, which can now monetize the open source version of Asterisk with support subscriptions. I'm surprised they didn't offer it sooner. Maybe they were afraid it would upset channel partners?

Rich's notes:
  • Open Source Subscriptions
  • 2 smb subs
  • And 2 enterprise class
  • Incident based
  • Problem: up to today needed community support or consultant with hourly rate
  • Now annual sub - 3 year 10% discount
  • Can call Digium based
  • Level one - support local hours 12 hours - starting at your 8:00 - 7:00
  • For 5 days a week
  • Buys sub online
  • Available in a month through the channel
  • Get a key, name contact and get details when you call
  • Get incident/case handled
  • Can open via we or phone
  • Find a bug - gets entered in bug tracker
  • Gets handled like any biz edition type of bug
  • Not really SLA like a commercial licensed product
  • Biz edition - now only available as OEM or commercially licensed product
  • They want people to buy the open source - engineering opens up 1.4 and 1.6 - first time Digium provides support for open source asterisk
  • Up till now consultants, etc
  • Open source - people buying business edition for support reasons
  • Now getting open source subs
  • Can now support enterprise class apps
  • In the past - anyone who built a large network - 2 levels of enterprise class support
  • 24x7 - server based
  • Unlimited users
  • Up to 3 names contacts
  • First foray into enterprise from server side
  • Up to 24x7 support
  • Switchvox 4.0 on the verge of shipping
The new Asterisk support services enable companies to leverage the power of open source Asterisk with the confidence that their system will be supported by the very founders of the Asterisk movement. According to the news release, "The support subscriptions provide technical support, hardware replacements and substantial discounts on training programs to enable users to take full advantage of the power of the Asterisk platform."

mark-spencer.jpg "Digium's new subscription services give Asterisk users the best of both worlds--they can download and use Asterisk free of charge, as always, and now they can also call on Digium for technical support when needed," said Spencer. "We think the combo of free and open, with support, is going to appeal to many of our most technical users. The Asterisk community has long been a source of great expertise through online forums, and now we're supplementing that with the ability to call us, 24x7, for access to our Asterisk experts."

danny-windham.jpg Danny Windham, CEO of Digium, said: "As Asterisk gains traction within large businesses, demand for professional support is on the rise. Our deep knowledge of open source Asterisk and total commitment to its development makes us ideally suited to offer these new services. Companies that purchase subscriptions will receive support from the most knowledgeable group of Asterisk experts in the industry. We see this offering as a substantial step forward for Asterisk in the enterprise and a valuable service for companies of all sizes."

Asterisk support subscriptions are bundles of services sold on an annual basis. They include technical and engineering support, consultative services, advance hardware replacement, and discounts on Asterisk training and conference passes. 

Asterisk support subscriptions are available immediately from the Digium webstore at http://store.digium.com and will be available through Digium channel partners in Q2. SMB pricing begins at U.S. $595 per year for support during the subscriber's business hours (8:00 a.m.-5:00 p.m., Monday through Friday); 24x7 support for an SMB begins at U.S. $1,995 per year. Enterprise subscriptions, including 24x7 support, begin at U.S. $3,995 per year. Pricing includes a defined number of servers supported and cases opened per year.

You can read the official news announcement here.
Digium has an excellent post today titled The Rumors of Our Death discussing Skype for Asterisk (SFA) and the recently launched (beta) SkypeforSIP (SFS). There has been much discussion on the blogosphere, twitter, and elsewhere if SFS means the death of SFA. Some were even seen carting Skype for Asterisk away into the trashbin of other failed software endeavors, as seen here:

It's not a pretty sight when people write you off for dead when you're really not. But wait just a second. Digium's Steve Sokol explains late today that SFA is not dead. He writes:

With Skype's recent announcement of Skype For SIP there has been a great deal of pontification on the impending death of the not-yet-released Skype For Asterisk.  I'd like to take a moment to explain why Skype For SIP (SFS) does not spell the end for Skype For Asterisk (SFA), and why Skype For Asterisk is still in beta.

First, the key differences between Skype For SIP and Skype For Asterisk:

  • SFA can handle incoming Skype calls from any user on the Skype network.  SFS can receive incoming calls from Skype users only by statically mapping a Skype name to a SIP account.
  • SFA can place calls to any user on the Skype network.  SFS cannot place calls to Skype users.
  • SFA includes support for Skype presence information.  SFS has no support for presence.
  • SFA includes buddy list management.  SFS has no buddy list management features.
Steve lists more differences, but I don't want to steal his thunder. Go read his post. I knew there were key advantages in SFA over SFS and there was so much confusion out there, I was tempted to write a comparative chart, but was too busy. In any event, it's nice to see Digium clarifying the advantages of Skype for Asterisk. Any questions?

trixbox 2.8 beta is out

March 26, 2009 9:54 PM | 0 Comments
trixbox-logo.jpg In case you missed it, Andrew posted that trixbox 2.8 beta is available and is based on the latest version of Asterisk 1.6. Andrew, is even very complimentary over Asterisk 1.6 & Digum, which is nice to see coming from a Fonality employee:
We have been testing Asterisk 1.6 and DAHDI (the replacement for zaptel) since they came out last year. I am happy to say they are coming along quite nicely. Digium has worked hard on 1.6 with a lot of attention paid to reliability and scalability. I am happy to say our testing shows Asterisk 1.6 is ready for prime time!
You can grab trixbox 2.8 beta .iso image here
audioroute-windows-mobile-12020.jpg Finally a software tool called AudioRoute that can be used to route Windows Mobile audio from the earpiece speaker to the backspeaker and vice-versa. This is especially needed for VoIP applications on Windows Mobile phones.

I've tested several VoIP apps (SIP clients, Skype, etc.) on my Windows Mobile XV6700 phone and other Windows Mobiles and from what I understand the carrier forced the hardware manufacturers to block VoIP applications from using the earpiece for listening to the remote caller. You couldn't even use speakerphone. Instead, you were forced to use the backspeaker, a tiny low-quality speaker located on the back of the phone, which made phone quality horrendous when making VoIP calls. I'd have to flip the phone over when the person was talking due to low volume & quality, and then flip it back over to talk into the microphone. It was all but unusable.

Well glory glory hallelujah! I never thought the day would come when someone would come up with a solution. According to Teksoft, "After several years of tests and many questions in the development forum, we've finally did it: a tool to route the audio to the earpiece speaker is available, and we've released it as freeware." Woohoo! Now I can register my SIP client on my Windows Mobile to my Asterisk-based IP-PBX and make/receive VoIP calls.

Features:
  • Routes the audio output to earpiece or backspeaker
  • VoIP compatible
  • Easy to use User Interface
  • Command line support
  • Uses Teksoft's DynRIL library
It's compatible with Pocket PC and Smartphone Windows Mobile 5.0 / WM6.0 and above

Usage (via forums)
Install the CAB and use the titlebar icon to open the user interface.


The first icon routes the audio to the earpiece speaker.
The second blue icon, can be used to route the audio to the backspeaker.
The orange icon, routes the audio to the speakerphone, while in a phone call.
You can also use the bottom slider to move the taskbar icon, or the about button to show this page.
The top-right square hides the user interface.

Command line
This tool can be executed by command line with parameters.
You can execute /program files/teksoft/audioRoute/audioRoute.exe with the following:
-earpiece , routes the audio to the earpiece
-backspeaker , routes the audio to the backspeaker
-speakerphone , while in a phone call, activates the speakerphone
-switch , toggles between earpiece and backspeaker
Code:

 audioroute.exe -earpiece
 audioroute.exe -backspeaker
 etc.


Download
The CAB file is available in the freeware section of www.teksoftco.com, direct link here.

Google Voice Meet Asterisk

March 23, 2009 11:06 AM | 0 Comments
Nerd Vittles has another cool Asterisk recipe that combines Google Voice, voicemail transcription (via Google Voice), free calling, and of course Asterisk. Nerd does some packet sniffing and determines that Google Voice, powered by Grandcentral, is using SIP. What's most interesting is that Nerd determine that your SIP connection and your Google Voice phone bill is only protected by a 4-digit PIN. Yikes! That's not good.

Anyway, here's a teaser of Nerd's awesome recipe:

what we want to do is examine some ways to integrate the Google Voice feature set into our existing Asterisk implementations. The potential benefits are enormous. There's free calling in the U.S., free distribution of inbound calls to multiple phone numbers scattered around the country, free SMS messaging and delivery by email, free transcription of voicemail messages into text-based emails, free conferencing, and free GOOG-411, a voice-activated service that let's you find nearby businesses by saying where you are and what you're looking for. For today, we've set our sights on the Google Voice feature set which is easiest to integrate into existing Asterisk systems: free voicemail message transcription, free calling in the United States, and free GOOG-411 directory assistance. For lack of a better term, we call it... Googlified Messaging™. ;-)

Well, what are you waiting for? Go read the entire recipe and tutorial. Great stuff!
Today, Skype announced it is enabling SIP-based IP-PBX to connect to the Skype network, which will allow low-cost SkypeOut calling, receiving calls from Skype users, and receiving calls from regular PSTN phone lines. Outbound calls from IP-PBX SIP handsets to Skype phones is not part of this news announcement. Skype commented it is too difficult to dial Skype usernames from a desktop handset.

Features:
  • Receive and manage inbound calls from the 405 million Skype users worldwide on SIP-enabled PBX systems, connecting the company website to the PBX system using Skype click-to-call buttons
  • Place calls via Skype to landlines and mobile phones worldwide from any connected SIP-enabled PBX, saving your business money with Skype's low rates
  • Purchase Skype online numbers to receive calls to the corporate PBX from landlines or mobile phones
  • Manage Skype calls using your existing hardware and system applications such as call routing, conferencing, phone menus, voicemail and call recording and logging - no additional downloads or training are required

Skype For SIP is perfectly suited to businesses that already have IP-PBXs and want to connect to Skype's network which offers low-cost calling. Skype for SIP is being launched as a closed beta program, but you can register and try to be part of the beta. Interestingly, Asterisk for Skype, a SIP-based (and IAX) open-source IP-PBX was the first to offer some tight integration with Skype.

If Skype continues to open their proprietary doors (they recently announced they were giving away the SILK codec), and now they've finally enabled SIP-to-Skype integration, then we can see a momentous shift from SIP trunking to Skype trunking. Customers will not only choose the lowest cost IP trunk, but also the one with the best quality. Skype is renowned for their high-quality due to their P2P architecture, so companies will look very closely at Skype trunking instead of SIP trunking.

And of course if customers shift to purchasing Skype trunks, the SIP trunks will have to follow suit, which means a win-win for businesses looking for low-cost calling.

Via Skype blog

Update: Also check out Dan York's analysis and Rich Tehrani's post.
Asterisk has just added 'official' MFC/R2 support for chan_dahdi. Here's the commit. The modifications to chan_dahdi, and the supporting library, LibOpenR2, were both written by Moises Silva.

According to the commit:
Many users are using this code, or a variant of it, in Asterisk 1.2, 1.4 and 1.6 in Brazil, México and Argentina. An unknown number of users (but at least 1) are using it in each of the following countries: Colombia, Nepal, Thailand, Venezuela, Perú, and probably others.

To use this code, LibOpenR2 must be installed from http://www.libopenr2.org/. Information about configuration can be found in configs/chan_dahdi.conf.sample.

Via Russell Bryant
spinvoxluvsskype.jpg
Skype
users can now have their voicemails converted into text via SpinVox. Today, SpinVox announced that your Skype voicemails transcribed and sent to you via SMS for €0.20/£0.17/25 cents plus the cost of the SMS. SimulScribe, now PhoneTag, is a similar service, that Rich Tehrani uses regularly. GotVoice is yet another one.

But how about another cool TTS app that is currently 'free' and works with the popular open source Asterisk platform? Weavver's VoiceScribe is a beta web-service for Asterisk that converts your voicemail to text and delivers them to you via e-mail. What's cool about this is how easy it is to integrate with Asterisk, trixbox CE, and trixbox Pro. I tested it with trixbox Pro and it worked flawlessly in just minutes. It uses the Nuance engine. The accuracy was OK, but I'm told by Weavver's Mitchel Constantin, "Quality will get much better."

Simply edit /etc/asterisk/voicemail.conf, go to the [general] section and make sure wav49 is the default format. Also add a line with mailcmd that sends an email with your voicemail attachment to their hosted servers.

Here's a sample of the 4 lines you need in voicemail.conf:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Next

Recent Activity

Friday

  • Tom Keating queued Star Trek
  • Tom Keating queued Stardust
  • Tom Keating queued The Fountain

Thursday

Wednesday

  • Tom Keating tweeted, "Worst Google News Headline Ever! - No public viewing at Neverland, but Michael Jackson may get laid: I was happi.. http://tinyurl.com/nrlsjo"

More...

Recent Comments

  • cmytroops: I was browsing the net and cam across a great read more
  • mike: Sorry if this is off topic but I’m thinking of read more
  • @NumberGarage: Our military service men and women should be driving new read more
  • https://www.google.com/accounts/o8/id?id=AItOawlacBYIyCFI8mz5HS_pdsnSDV1wLz6Vgc8: We have implemented over 50 VoIP systems in the last read more
  • Theo Barton: Its a good phone. I have had a lot of read more
  • https://me.yahoo.com/a/ea7WMvNu2Mlud7dBwQPAAus9JCfo9qE-#27391: I don't want to go through all the problems, I read more
  • Claudio G.: I contacted these folks via e-mail recently (June 2009)and they read more
  • Kinjudah De- Morgan: I am using a strong satelite receiver and a Gateway read more
  • dell gx620: I have just had my second Dell. Thinking by spending read more
  • dell gx620: I purchased a very expensive Sony Vaio in 2006. Sometimes read more

Subscribe to Blog

    View my Microsoft MVP Profile:

Blogroll

Archives

Around TMCnet Blogs

  • Communications and Technology Blog - Tehrani.com:
    Problems at Joost
  • On Rad's Radar?:
    Bells Giving Up on Landlines?
  • VoIP & Gadgets Blog:
    Worst Google News Headline Ever! - No public viewing
  • Communications and Technology Blog - Tehrani.com:
    Heading to Rhode Island
  • First Coffee:
    SugarCRM Studied, Broadband 'Crucial,' EGain, OOCOSPI, NetSuite's Zander
  • On Rad's Radar?:
    Why Can't DC See What We See
  • The Readerboard:
    Tougher Actions To Save Telemarketing
  • VoIP & Gadgets Blog:
    eBuddy for iPhone Supports Push Notifications
  • Latest Whitepapers

    TMCnet Videos