….::: VOX POPULI :::….
“Ministers… cannot in any country be uninfluenced by the voice of the people.”
Vox Populi (Latin for “Voice of the People”) aims to provide useful information on interactive communication technologies and social networking tools that can be used by government officials to improve services to citizens and taxpayers. This is the voice of Government 2.0.
23rd
NOV
Getting Conferency With Asterisk
Posted by Mark Headd under Asterisk, Open Source
A good indicator of just how powerful and useful Asterisk can be is demonstrated by the amount of effort that is required to build a feature rich conference call application. What if I told you it can be done in 6 lines of code?
(Yes, extensions.conf is software - when you work with it, you are writing software code. See “When You Write extensions.conf, You Are Writing Software” by @jicksta in this post for more on this.)
Create a conference room by editing meetme.conf:
$ echo "conf => 1234,2345,5678" >> /etc/asterisk/meetme.conf
Or you can open the file with your favorite editor and add the new line at the bottom. This will create a conference numbered 1234, with a user PIN of 2345 and an administrator PIN of 5678. Next create a dialplan context and rule set for the conference room
[MyFirstConferenceRoom]
exten => 9000,1,Answer()
exten => 9000,n,Meetme(1234,ips)
exten => 9000,n,Hangup()
The parameters passed into the Meetme() application are the number of our conference room (just created in meetme.conf) and a set of options. The i option enables an announcement each time someone enters or leaves the room. The p option allows a user to exit the conference by pressing the ‘#’ key. The s option allows a user (regular or admin) to hear a menu of options when the ‘*’ key is pressed.
Now, include the conference room context in your primary dialplan context:
include => MyFirstConferenceRoom
That’s it - to test it out, make sure you reload your dialplan, and then dial 9000.
You’ve got to love how easy it is to get conferency with Asterisk!
23rd
Book Review: Asterisk 1.6
Posted by Mark Headd under Asterisk
The folks at Packt Publishing recently sent me a copy of Asterisk 1.6 by David Merel, Barrie Dempster and David Gomillion and I’ve been using it for the past week or so to set up a fresh instance of Asterisk 1.6 on Ubuntu 8.04.
(Note - like many Asterisk books, this one is very CentOS focused, but I found the installation and configuration steps described in it - as well as some of the larger Asterisk management concepts - easily applied to Debian-based distros like Ubuntu.)
This is a solid, well-written book for anyone that wants to start building and managing an Asterisk-based telephony system. I found this book to be very well focused on concepts that would appeal to someone who wants to manage an Asterisk system professionally, and is probably less well suited for someone interested in tinkering with Asterisk as a hobby.
There is a good discussion of some of the key concepts that someone who aspires to be (or already is) an Asterisk professional should have a handle on. It has a very good discussion on hardening an Asterisk server in the chapter on “Maintenance and Security”, and the book begins (very appropriately) with an exercise in developing a deployment plan - again, probably not well suited for an Asterisk or VoIP tinkerer, but critical for someone who is going to deploy an Asterisk server in a production environment and assume responsibility for managing it.
I didn’t see any discussion of some of the more cutting edge features of Asterisk 1.6 that might be of interest to someone wanting in exploring alternative communication protocols (Jabber/Jingle) or some of the less mainstream channel drivers (GTalk, Skype, etc.) There is no mention at all (that I could see) of how to connect Asterisk to Google Talk via Jingle, or to the Skype network via Skype for Asterisk. Nor is there any mention of some of the IM-focused dialplan applications like JabberSend().
This book appears to be designed for someone who wants to set up and manage a more traditional Asterisk-based system. And for that purpose it is very well suited.
1st
JUN
VoiceGlue 0.10 Released
Posted by Mark Headd under Asterisk, Open Source
For those that don’t know, Voiceglue is an open source project that links Asterisk (the open source PBX) with OpenVXI (an open source VoiceXML platform currently under the stewardship of Vocalocity). Voiceglue makes it possible for Asterisk users to deploy a completely open source VoiceXML platform for building IVRs and other useful applications.
The Voiceglue project recently announced the release of version 0.10 - there are several new features in this release:
- Improved audio caching
- Cookie passing on audio fetching
- Handles maxage and audiomaxage of 0 properly
- Uses HTTP Content-Type for audio content when available
- Defaults to not requiring access-control directive in returned data from data tag
- New transfer method, new config file param “blind_xfer_method”
- Auto-install support for Ubuntu 9.04 (Jaunty)
I’m especially interested in the last item - I’ve been meaning to set up a VM to play around with Ubuntu 9.04 for a few weeks now, and this is yet another good reason for doing so.
The new version of Voiceglue can be downloaded here.
7th
APR
Shoring up Asterisk Security
Posted by Mark Headd under Asterisk, Linux, Open Source
Found out today that an external host had been scanning my Asterisk server looking for valid SIP extensions. Turned out the IP belonged to some German hacking site that was probably using some brute force tools to scan my server (and lots of others) for valid SIP extensions. The ultimate goal was more than likely to try and exploit any live extensions for some free phone calls.
Fortunately, in anticipation of moving my in-house Asterisk server out to the cloud I had recently done some work to become better educated on Asterisk security and to shore up the security of the CentOS machine my Asterisk instance is running on. As a result, my intrusion detection system slammed the door to the external scans pretty quick, and I’ve since added the IP address to my iptables rule set to to drop any requests from the IP used for the scan.
It was a little unnerving to find out that my box was getting scanned, but I’m glad I took the time recently to get things working more securely. This incident reminds me that one can never be too careful about security, and that there is always more to learn about running Asterisk more securely. To underscore this last point, here are some great links I’ve come across lately for Asterisk and Linux security:
- Weak Passwords on Extensions Equals Hacked Box
- John Todd’s Security List
- Avoiding the $100,000 Phone Bill: A Primer on Asterisk Security
Some general Linux security reading:
Happy reading!
6th
APR
Book Review: AGI 1.4 and 1.6 Programming
Posted by Mark Headd under Asterisk, Development Tools
Have you been working with Asterisk for a bit and want to use it to build some more sophisticated applications? Are you looking to build and IVR solution, but are a bit wary of what you will be able to accomplish with the Asterisk dialplan alone? Are you comfortable on the Linux command line and with using PHP-based scripts in a Linux environment?
If you answered yes to any of these questions, then you will want to check out the book “Asterisk Gateway Interface 1.4 and 1.6 Programming” by Nir Simionovich. There is a lot to like in this book for Asterisk programmers.
One of my favorite quotes from this book is:
Many IVR developers do not regard themselves as programmers. That is a shame as programming an efficient IVR environment using any type of telephony engine requires skill, and when done right can be regarded as a work of art.
Truer words were never spoken. I personally have never suffered from the affliction of thinking that voice applications developers are not “programmers” - voice application developers are programming Rocks Stars, pure and simple. So if you are a Rock Star (or aspire to be one), you should check this book out.
I like that this book spends some time talking about developing IVRs using the Asterisk dialplan, even though the limitations of building IVRs using the dialplan itself is probably what leads most developers to explore alternatives like PHPAGI or Adhearsion.
There is a great section in this book outlining the “ten rules of AGI development” - things every developer should know before starting AGI programming of any flavor. This book starts with the basics and moves quickly (but comfortably) on to advanced topics.
If you are an Asterisk guru, or a hobbiest that is just getting started, this book is worth having in your collection. My copy is on my bookshelf, within arms reach, right next to my dogeared copy of O’Reilly’s “Asterisk: The Future of Telephony.”
Now, if only they’d put IVR development into the next edition of Guitar Hero…
28th
FEB
VoiceGlue Up And Running
Posted by Mark Headd under Asterisk, Development Tools, Linux
I now have VoiceGlue up and running on Ubuntu 8.10. (Actually, the Ubuntu server is running as a virtual machine under Sun’s VirtualBox 2.1.)
For those that don’t know, VoiceGlue is an open source project that links Asterisk (the open source PBX) with OpenVXI (an open source VoiceXML platform currently under the stewardship of Vocalocity). VoiceGlue makes it possible for Asterisk users to deploy a completely open source VoiceXML platform for building IVRs and other useful applications.
The VoiceGlue install on Ubuntu 8.10 went smoothly — I did run into an issue with one of the services not starting, but that was easily identified and fixed thanks to a speedy response from the VoiceGlue folks. (This issue was really my own fault — use the pgrep command to make sure you have specific services running. And when in doubt, check the logs people!)
Based on my experience with the install and my initial testing I am extremely impressed with VoiceGlue. Its well documented and there is an active community of users offering tips and troubleshooting advice.
Hats off to the people behind VoiceGlue — Doug Campbell and Steve Smith. Well done!
27th
FEB
Ubuntu Asterisk Oddness
Posted by Mark Headd under Asterisk, Linux, Open Source
I have a virtual machine running Ubuntu 8.10 Server and I’ve been meaning to give VoiceGlue a try to see if I could set up my own completely open source VoiceXML platform,
I found that I was able to run sudo apt-get install asterisk at the command line, and I started to get excited. This was going to be the easiest Asterisk install yet. I was very soon disabused of this foolish notion.
The Asterisk install seemed to go smoothly, as did the basic set up and config. Just to make sure I was doing things by the numbers I set up a couple of extensions and a quick test to have Festival read something back to me. So far, so good. Next it was on to the VoiceGlue install.
Following the instructions in the VoiceGlue Wiki, the install went smoothly. All three VoiceGlue-related services started just fine (the voiceglue service itself barked at me because I had not yet set up call routing in /etc/voiceglue.conf - once I did this, it started up just fine.)
That’s when things got weird. The VoiceGlue Wiki says:
Phoneglue also needs to be contacted via FastAGI for all calls that it will handle, and it needs to use a particular context, extension, and priority to send calls to itself.
OK, no worries there. I set up a new context in /etc/asterisk/extensions.conf and then reloaded the dialplan from the Asterisk console. So far so good. Then, the oddness set in.
I kept seeing an error in the Asterisk logs saying:
res_agi.c:229 launch_netscript: Connect to 'agi://localhost' failed: Connection refused
After banging my head against the wall trying to figure it out I decided to check and see if anything was listening on port 4573 (the default port for FastAGI). No dice.
I tried running the test AGI script comes with Asterisk (agi-test.agi). Again, no dice. In fact, it doesn’t look like there are any directories containing AGI scripts anywhere.
Ubuntu Asterisk seems to be looking in /usr/share/asterisk/agi-bin/ - it doesn’t exist. Neither does the usual directory for AGI scripts (/var/lib/asterisk/agi-bin/). Nor does another common directory - /var/spool/asterisk/outgoing.
Why is all of this missing from the Ubuntu version of Asterisk? Anyone have any thoughts? Did I miss something obvious during the install?
I’m still eager to try VoiceGlue, so it looks like I’ll be building Asterisk from scratch.
7th
JAN
More Public Sector Asterisk
Posted by Mark Headd under Asterisk, Open Source
A while ago, I wrote about state and local governments using the Asterisk open source PBX.
I just came across this piece on Deb Bryant’s blog about the State of Oregon using Asterisk for several projects. A case study describing the project is also provided.
I’ve got to do some more research in this area and see if there is an easy way to get a count of state and local governments using Asterisk. I have a feeling that the number is larger than most people would think, especially in light of the budget constraints facing governments in recent years.
Anyone have any thoughts?
23rd
DEC
Screen Pops with Asterisk and XMPP
Posted by Mark Headd under Asterisk, Standards
A few weeks ago, I wrote a post on using CCXML and PHP to do screen pops with the Voxeo Prophecy platform. The task was made incredibly easy with a nifty PHP class library designed specifically to interact with XMPP servers.
After getting screen pops working in Prophecy, I decided to try my hand at getting them to work in Asterisk (this is, after all, how the majority of phone calls to me are handled). It turns out, the PHP script I developed to do screen pops in Prophecy can be reused to do the very same thing in Asterisk. If you’d like to give this a try on your own, here is what you will need:
- A working Asterisk instance. (This example assumes you know how to modify Asterisk config files.)
- A copy of the very cool XMPPHP library from Google Code. (This example assumes that the PHP code used to interact with XMPP servers is running on a separate server than the one housing Asterisk. More on this below.)
- An XMPP server and a client, or simply use your Google account.
There are three components to this example. First, you’ll need a PHP script to interact with an XMPP server. You can use the same script employed in my previous screen pop example:
< ?php
// Contents of screen_pop.php
include("xmpp.php");
$ani = $_REQUEST["ani"];
/*
* Once we have the caller ID, we can query data sources and look up information on the caller.
* For now, just send the caller ID in the screen pop.
*/
$conn = new XMPP('talk.google.com', 5222, 'username', 'password', 'xmpphp', 'gmail.com', $printlog=False, $loglevel=LOGGING_INFO);
$conn->connect();
$conn->processUntil(’session_start’);
$conn->message(’someguy@gmail.com’, ‘You are receiving a call from: $ani’);
$conn->disconnect();
?>
Next, you’ll need a simple AGI script for Asterisk to interact with. This script will send an HTTP request to the PHP script above:
#!/bin/bash
# Contents of screen_pop.agi
# It don't get any easier than this...
curl http://ip_address_to_your_web_server/screen_pop.php?ani="$1"
On your Asterisk server, place this script in /var/lib/asterisk/agi-bin/ and ensure that it is executable. You’ll need to specify the IP address to the server running this script. Note — there isn’t any reason that these two scripts can’t run on the same machine (you can run PHP scripts on an Asterisk server), or even be consolidated into one single script (just make sure to include the XMPPHP library). In fact, you could even run the XMPP server used to send screen pops on the same machine running Asterisk.
The mechanics of this specific example were influenced by the set up for my previous screen pop example, and I am (at heart) a lazy basterd. But I digress…
The last piece to be put in place is to modify extensions.conf to ensure that our AGI script is invoked. You’ll want to add something like the following to the appropriate dial plan context (your specific Asterisk set up will influence this heavily):
exten => 123,1,AGI(screen_pop.agi|${CALLERID(num)})
This will pass the caller ID to our AGI script, which will then invoke the PHP script and send the details of the call to the XMPP account of our choice. I’ve noticed in practice that adding this to my dial plan causes the IM to be sent to my Google Talk account a good 2-3 seconds before the phone rings. Plenty of time to give someone a heads up about who is on the other end of an incoming call.
Obviously there are lots of options for looking up information on the caller, once you have their caller ID, that you can use to augment the information in your screen pop.
Just goes to show you, there isn’t much you can’t do with open source / open standards.
Viva screen pop!
13th
MAY
Public Sector Asterisk
Posted by Mark Headd under Asterisk, General Discussion, VoIP
Recently came across some information from a small city in Mississippi that is using Asterisk/Trixbox for it’s internal phone system.
Vicksburg is a city of about 26,000 in Western Mississippi that looks to have a roughly 200 extension Asterisk system in place for city employees.
It’s nice to see governments making use of open source technologies, particularly Asterisk — it isn’t just for small businesses. I wonder how many other small to medium sized governments are using a flavor of Asterisk for their phone systems?
Friend Connect:
@mheadd Tweets
- @nickgrossman Behind you 100%. Will do everything I can 2 help make it a big success. Just don't want to forget mistakes of the past. #
- @JeffSelf I was with the State of Delaware then. Frustrated that my state didn't make a bigger commitment, and that GOCC fizzled out. #
- Excited for Civic Commons. But there are lessons to learn from past efforts that have not worked. http://bit.ly/brK2P5 #civcoms #gov20 #g2s #
- RT @jefferyrlsmith: Such an awesome thing! Civic Commons to help local gov share software http://bit.ly/a9QW1a #gov20 #
- RT @govfresh: Join the 'Gov 2.0 Makeover' http://bit.ly/bWOrU8 #gov20 #manorgf #
Contact Me
Categories:
- Asterisk (14)
- Cell Phones (16)
- CouchDB (6)
- Development Tools (46)
- Digital Divide (8)
- General Discussion (84)
- Linux (10)
- News (21)
- Open Government (49)
- Open Source (37)
- Phone Voting (10)
- Standards (38)
- trixbox (4)
- Tropo (6)
- Tutorials (28)
- Twitter (32)
- VoIP (34)