Processing Recorded Audio Files

We have received several inquiries lately on how to receive and process audio files recorded on Teleku using the phoneml <record> audio tag like in the following example:

<phoneml>
<speak>please record a message</speak>
<record>http://web1.tunnlr.com:yourkey/upload/uploadTeleku</record>
</phoneml>

I was able to build a simple Rails application today that allows you to upload a file from the browser as well as receive a recorded file from Teleku.  The source code is available at: http://github.com/chrismatthieu/teleku-record-sample

This code was heavily inspired by a blog post located at http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm and you must comment out protect_from_forgery line in application controller to avoid the token error caused by the data coming from another application (Teleku).  You could probably just override/disable forgery protection on this one controller or action.

I am using tunnlr to test it with extension 388 (http://teleku.com/extensions/388) over SIP using my Blink SIP client for the Mac.  The data gets stored in the public/data directory but you could redirect the files to either your own database or S3.

I hope this example helps!

Team Teleku