[asterisk-dev] Academic Asterisk Adventure

Shawn Van Every vanevery at walking-productions.com
Tue Jan 2 19:06:12 MST 2007


Hi Folks,

I wanted to drop a line as I just finished up teaching a class that  
used Asterisk extensively and I wanted to pass along major kudos to  
all have contributed to Asterisk as well as to point out some of the  
technical difficulties that I ran into.

I posted the to following to my blog:
http://www.walking-productions.com/notslop/2007/01/02/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: http://itp.nyu.edu/show/ 
results.php?searchstring=Redial&submit=Search

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!


More information about the asterisk-dev mailing list