Local Report 2012 | Creative Time Reports

The piece that I helped Robert Whitman create is up on Creative Time.  

We had 90 or so callers send in video and make phone calls via a custom iPhone app, Android app and regular phone number over the course of an hour.

Check it out: http://creativetimereports.org/2012/10/18/local-report/

Open for Business

Walking Productions provides software development and consulting services. Appealing projects are those that deal with online and mobile media (audio/video). Get in touch: vanevery@walking-productions.com

Android Application Development
Flash Video Players, including P2P (Adobe Stratus)
Wowza Media Server Plugin/Module Development
Flash Media Server Development
Development related to Axis IP Cameras
QuickTime/Darwin Streaming Solutions
Audio and Video Encoding/Transcoding Pipelines
iPhone Application Development
JME/J2ME Application Development
Asterisk and VoIP Application Development
Phone call to streaming applications
Voicemail to Blog/CMS
Podcasting Systems
Mobile and Microblogging Solutions
SMS Campaign Management Software
2 Screen Interactive Television Applications (Enhanced TV)
EBIF iTV Application Development
HTML 5 Video Player Development
Media Asset Management Systems
AJAX/JavaScript/DHTML Development
LAMP Application Development (Linux, MySQL, PHP)
Java Desktop Application Development
Mobile Video Capture, Sharing and Playback Applications
Live Mobile Video Streaming
Computer Vision Applications in Java and Flash
Flash Video Capture
Location Aware Mobile Applications
Video Indexing, Searching, Recommendation Engine and Presentation Systems
Network Controlled Devices
WordPress and Drupal Plugin/Module Development
Flash Lite Application Development
AIR/ActionScript 3 Application Development
WebService Integration and Development (XML-RPC, SOAP, REST)
Podcasting (Audio/Video) Solutions
MP3 Streaming Servers
MMS Gateway Solutions
Java and AJAX Chat Application Development
Interactive Whiteboard Applications

Mobile Art && Code

I am here at CMU in Pittsburgh at a conference called Mobile Art && Code. Great talks, great workshops, glad I came.

I am doing a workshop called Interactive Telephony for New Media Arts, here is the full set of notes.

One thing that I did for the workshop is a put together an Asterisk driven webservice in PHP for getting at live phone call data. If you have been working projects that get information from asterisk or use phone calls to control other applications, it might be worth checking out.

PHP AGI Script:

#!/usr/bin/php -q

$agi = new AGI();

$return = $agi->wait_for_digit(10000);
while ($return['result'] > 0)
        $ascii = chr($return['result']);
        file_put_contents("/var/www/html/webservice/data.txt",time() . "," . $agi->request["agi_uniqueid"] . "," . $agi->request["agi_callerid"] . "," . $ascii . "\n",FILE_APPEND);
        $return = $agi->wait_for_digit(100000);

PHP Web Service Script:

	// The client will send a timestamp if it want's new stuff from the timestamp
	$timestamp = 0;
	if (isset($_GET['ts']))
		$timestamp = $_GET['ts'];

	$data = file_get_contents("data.txt");
	$dataarray = explode("\n",$data);
	if ($timestamp > 0)
		// Send everything from the timestamp forward
		for ($i = sizeof($dataarray) - 10; $i < sizeof($dataarray); $i++)
			$currentline = explode(",",$dataarray[$i]);
			if (sizeof($currentline) > 0)
				if ($currentline[0] > $timestamp)
		// Just send the last one
		if (sizeof($dataarray) > 1)

Processing Example

I should note that this was built very quickly and therefore somewhat buggy. I don’t think the Processing example is thread safe and the PHP should really be using a database.. Also, the Processing example is a riff off of something Dan Shiffman put together for getting Asterisk and Processing to talk through a Java server.

ITP Projects at ETel

This past week, 7 ITP students and myself headed to San Francisco to attend O’Reilly’s ETel conference. The students were demoing their projects at the ETel Fair. The demos definitely created a buzz around the place:

Jim Van Meggelen and Brady Forrest wrote a couple of nice blog posts summing up the projects: ETel Coverage: The Future of Telephony – O’Reilly Emerging Telephony and O’Reilly Radar > Fun with Asterisk at the Etel Faire

If anyone is interested, most of these projects came out of my course at NYU’s Interactive Telecommunications Program, Redial: Interactive Telephony.

More projects from the class can be found on ITP’s show website by searching for Redial

Last, I would like to offer on behalf of the students and myself, a big thanks to the organizers of the conference and O’Reilly in general for inviting us and congratulations on the event.

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!