Posts

Showing posts from November, 2012

How To Save a Recording in Tropo using ASP.NET MVC

I was having trouble getting recordings to save while adding the Tropo integration to VoiceModel and I could not find any good examples on how to do this.  Even the examples for TropoCSharp did not show how to save the recordings.  I was able to figure out a solution so I thought I would share it here since there is a lot of requests on the forums to see an example for C# and .NET.  This example was developed using ASP.NET MVC 4.

I thought I could reuse the same action on the VoiceModel controller to save recordings in VoiceXML applications, but it turned out that was not the case. When saving a recording in VoiceXML the voice browser wants the next VoiceXML document when it is completed, which is not the case for Tropo.  The only response that Tropo is looking for is whether it gets an HTTP 200 success code or not.

The other issue is that the MVC controller action wants to match the name in the multipart form data  request with name given for the HttpPostedFileBase object.  Let me sh…