Academic Asterisk Adventures

In my continuing adventures as an adjunct professor at NYU’s Interactive Telecommunications Program, I taught a new course last semester entitled “Redial: Interactive Telephony“.

The purpose of the course was to utilize emerging telephony technologies, concepts and services such as VoIP as a tool for building interactive applications and devices. ITP students are famous for their imaginative use of new technology. One of my goals in this course was to help them apply some of their creative and critical thinking to new telephony technology in the context of the rich history of telephony.

The course content was focused around voice and touch-tone based applications using Asterisk, SIP, RTP, text to speech (using Festival), speech recognition (using Sphinx) and the like.

The results of this course were truely fantastic and I will take a bit of time in the coming days/weeks to highlight their projects.

For a quick taste, checkout these projects

For now I want to write a bit about using Asterisk in an environment such as this in the hopes that some Asterisk users/developers offer suggestions and perhaps implement some of my suggestions.

We (18+ students in my class, myself and a couple of students following along without actually being members of the class) used an older Intel P3 machine running RedHat Enterprise Linux 4 (as I recall) with the Secure Linux enabled. We used Asterisk 1.2 and each student had a normal linux user account on the machine. We also had Apache 2, PHP, MySQL (running on another machine), PHP AGI, Perl, Festival and Sphinx.

Many of the issues that we ran into were a direct result of running PHP for both AGI scripting in Asterisk and normal web development with Apache. PHP’s safe mode and SE linux contributed to these difficulties.

The problem is that Asterisk was running as the “asterisk” user and Apache was running as a different user. PHP safe mode was relaxed to allow the group to execute the files but this still threw many of us for a loop several times.

I don’t want to whine about this too much as it is what was available and we just had to deal with it. One thing that might help would be to enable suexec within Asterisk so that AGI scripts could run as the owner of the script. This, I believe is how Apache can be setup to handle things and would go a long way towards alleviating many of the issues we had with both security and usability.

The next major problem we had was in developing dialplans and editing other Asterisk configuration files. At first, I setup an extensions file for each student that was included (using #include) in the main Asterisk extensions.conf file. Unfortunately, we ran up against a hard limit to the number of includes that Asterisk would handle and half of the files never got included.

To alleviate that problem, I put together a PHP script and a shell script that would cat together all of the extension files that needed to be included. These scripts also took care of issuing the reload command to the asterisk manager interface. This worked reasonably well but didn’t have any error checking so that if one user’s extensions file had errors or if they used a context that was named the same as another user problems would arise.

This is probably a harder problem to solve in the current design of Asterisk. I am interested in hearing other’s thoughts on how these problem could be solved. My thoughts are that Asterisk could somehow take some pointers from Apache and allow individual users to have a set of configuration files that get included at run time when their extension is entered. Something similar to the concept of a public_html directory. Asterisk when told to go to a specific user’s context would look in a specific directory and include the dialplan from there.

Perhaps I am just dreaming.. ;-) What do you think?

In any case, none of this would have been possible in a world without Asterisk and on behalf of my students and myself a big thank you to all those who have contributed to Asterisk!

Apple NEEDS to get it right with QuickTime

I started working on this post quite some time ago. Sadly, it still needs to be written despite my hopes that Apple would get on the ball and do something in response to the massive growth of Flash video. Hell, even M$ is doing something..

By do something, I mean, look at why Flash video is being so heavily used, leverage the great points of QuickTime and get on the ball and start competing.

Many people agree, QuickTime is great. It is powerful, cross-platform (almost), able to be embedded in other apps, has support for a myriad of codecs and so on and so forth.

So, why why why, is Flash a relative newcomer to the space of online video kicking it’s ass? Simply put, it just works and works quickly on the client side. Beyond that, it is damn easy (for anyone with rudimentary Flash skills) to customize the player.

Of course, the quality of Flash video sucks (at least what most sites are using which is Flash Video 7, not 8) but the fact that it just works and that there is generally no wait for a large plugin to load totally overwhelms that.

Here is a quick list off the top of my head that Apple could do with QuickTime that might help:

1) Become the video player of choice for AJAX developers by offering JavaScript hooks into everything (a start would be mouse position and click detection. Also make sure the JavaScript support is fully functional in all browsers on all platforms at all times.)

2) Update and support QuickTime for Java. Make it fully OO, no more forcing Java developers to know how to program using QuickTime’s C API to do anything useful.

3) Leverage QuickTime’s great MPEG-4 support and start supporting MPEG-J.

4) Update and create hooks between the above (JavaScript/QT4J/MPEG-J) and Wired Sprites. Remember, QuickTime had interactive vector graphic capabilities long before Flash ever considered video.

5) Fix the problems with the playback DivX style files (MPEG-4 video, MP3 audio in an AVI container). People love it to use it, would be nice if QuickTime allowed us to play them with out a 3rd party component.

6) Update the QuickTime/Darwin Streaming Server to allow folks to start programming more server side streaming applications (like people are doing with Flash Media Server).

Thanks for listening…

Asterisk 1.4 Coming Soon!

Digium – The Asterisk Telephony Company

Ok, this is a big deal. The next version of Asterisk supports GoogleTalk!

From the Press Release:
Asterisk 1.4 is the first major release of Asterisk since the release of Asterisk 1.2 in November 2005. With over 20 new functionality additions including IPFAX compatibility, unified messaging capabilities and Jabber/Jingle/GoogleTalk protocol compatibilities, Asterisk 1.4 features overall quality and performance improvements, as well as increased scalability and interoperability.

Why Videocommunication Didn’t Catch On

WNYC’s The Leonard Lopate Show: Why Videocommunication Didn’t Catch On (July 25, 2006)
From the post:
Computer scientist Jaron Lanier looks at why—despite all the predictions—videocommunication never caught on.

Pretty interesting. Discussing the non-verbal cues that we are missing in video conferencing.

(I wish WNYC would have permalinks on their site for each of these segments. I would rather post on my own blog than on Delicious but for now I have to click on the Delicious link and copy the URL and so forth. – That’s for you Brian, if you are listening)

Thanks Spencer..

Yet another video system for adding tags/comments in time

Techcrunch Blog Archive Viddler to make moments in video searchable

“The keystone feature here is the ability to add tags and comments tied to particular points in a video. Those tags are then searchable, so if I want to find the particular point in one of my videos that I tagged “touchdown,” that’s easy to do. I can also have a conversation with other users regarding a particular moment in a video and choose to embed the video on another site in it’s entirety or only from a particular point I select. While users can link to particular points in a Google Video as of last month, that’s easier and is just the beginning in Viddler.”

Add it to the list..
Viddler
ClickTV
Video Comments WordPress Plugin (Self serving link)

Thanks Jeff…

Record iChat Audio and Video

Ecamm Network: Conference Recorder – Record iChat AV Conferences – Save Audio and Video Memories
Nice..

From the site:
“Finally, an easy way to record your iChat audio and video chats. Conference Recorder is an add-on for iChat AV which automatically transforms your conference sessions into QuickTime movies. ”

GarageBand 3 allows the recording of audio and snapshots from iChat conferences as well..

Wondering where I can find an API for iChat to develop these types of things myself…?