Asterisk: AGI Programming
Recently I received a flattering email from Packt Publishing telling me about a new book entitled: “Asterisk Gateway Interface 1.4 and 1.6 Programming” – by Nir Simionovich. The author of the email refered to this blog and asked if I would like to review their book for my blog. Very flattering indeed.
[Update: Book review is done now. You can read it here]
I was, of course, already familiar with Packt. They do produce lots of books on Open Source technologies. What I wasn’t aware of, until I looked, was this (from their “about us” page):
Packt Open Source Project Royalty Scheme
Packt believes in Open Source. When we sell a book written on an Open Source project, we pay a royalty directly to that project. As a result of purchasing one of our Open Source books, Packt will have given some of the money received to the Open Source project.
In the long term, we see ourselves and yourselves, as customers and readers of our books, as part of the Open Source ecosystem, providing sustainable revenue for the projects we publish on. Our aim at Packt is to establish publishing royalties as an essential part of the service and support business model that sustains Open Source.
Now that seems like a fine scheme to me and is one that would certainly weight my purchasing decision toward a Packt book over another similar publication. I am aware that they will obviously get some free publicity from our review but having read the above I am quite happy about that.
Anyway, back to AGI.
Asterisk Gateway Interface (AGI)
The Asterisk Gateway Interface is an interface for adding functionality to Asterisk with many different programming languages. Perl, PHP, C, Pascal, Bourne Shell – it’s your choice, really.
- AGI may control the dial plan, called in extensions.conf.
- Async AGI Introduced in Asterisk 1.6, allows asynchronous AGI scripting.
- EAGI gives the application the possibility to access and control the sound channel in addition to interaction with the dial plan.
- FastAGI can be used to do the processing on a remote machine via a network connection.
- DeadAGI gives access to a dead channel, after hangup. Deprecated since Asterisk 1.6
Being a fan and user of Asterisk in our business, I think what we will do is actually use the book and create or modify an application that will be of use to us. This should allow us to give a decent overview of the content and how easy/hard it was to transfer the knowledge into a real world result.
We use vtiger as our CRM, OpenEMM for email marketing and Asterisk for our telephony – all running on Ubuntu Servers. Tying these together would be a fine goal.
But I am open to other suggestions too. Anyone got any good ideas for a fairly simple AGI application?