Posts

Showing posts from December, 2011

Caching the VoiceModel in ASP.NET MVC

Caching the VoiceModel and state machine for an ASP.NET MVC VoiceXML application is very simple. In the previous post Where is the Controller For an MVC VoiceXML Application I demonstrated how to create a voice application to get the current weather conditions in an area identified by a zip code.  In this post the VoiceModel and state machine were recreated each time the controller was called.  I have modified the example to cache this information by slightly modifying the Builder classes for the VoiceModel and state machine.  The Builder classes follow the Builder design pattern and are responsible for building the object graphs that represent the application VoiceModel and call flow.  It makes sense to handle the caching in these classes since they are responsible for creating these objects.  Here is what the class for the state machine builder looks like now.

public class WeatherCallFlowBuilder { const string cacheId = "weather.cf"; public static ICallFlow Build…

Client-side versus Server-side Development of VoiceXML Applications

This post discusses some of the design decisions used for developing VoiceModel, an open source project for creating a framework that simplifies developing VoiceXML applications using Microsoft ASP.NET MVC and Visual Studio. Developing voice/speech applications using VoiceXML has made development of IVR applications more like developing web applications.  The IVR acts like a web browser.  In fact the component of the IVR that consumes the VoiceXML documents is often referred to as the VoiceXML browser.  So that would make the IVR the client-side.  Any application logic we put into the VoiceXML document will be processed client-side.  Even though some constructs were added in later versions of VoiceXML to make it possible to access data sources directly from VoiceXML you usually needed server-side programming to access back-end systems to retrieve or update data and to dynamically generate VoiceXML documents that contain data to be voiced back to the user of the system.  So how much of…

Testing VoiceXML Apps In The Cloud

Image
In a previous post I showed how easy it is to test a VoiceXML application developed using VoiceModel with a free IVR solution from Voxeo called Prophecy.  In this post I will show how you can use Voxeo's hosted IVR service which you can also test applications for free.  This hosted service resides in the Cloud and still uses the same Prophecy software to run it.  The added advantage to the hosted environment is gives you more options to try for connecting to the IVR, such as Skype, a number of SIP based phones, and regular telephone lines.  It is also a good way to test how your application will work if you plan to deploy it as a cloud based solution.  And it is easy to migrate your application from the hosted development  to production.  The other added advantage is the hosted platform is always up to the latest and greatest revision of the software which is transparent to you.  With a premise based solution you always have to check if there are new versions and apply the updates…

Deploying Your MVC VoiceXML Application

I found a couple of issues when deploying a VoiceXML application using MVC and VoiceModel to a hosted environment and I wanted to share the solutions here.

First you may get an error message when you try to run the application that it cannot find certain assemblies that are required for MVC.  In an earlier post titled "Using ASP.Net MVC to Create a Simple VoiceXML Application" I discuss how you have to install MVC 3 because it does not come with VS 2010 right out of the box.  Well it is currently not part of the .NET Framework either.  But there is an easy solution for including the correct assemblies as described in this blog post.  Just right click on your project and select Add Deployable Assemblies.  I dialog box will appear and select the option for ASP.NET MVC.  Now when you publish your project the appropriate assemblies will be deployed with it.

The other issue is that VoiceModel deploys shared views in the ~/tmp/Views/ directory.  When you run the application you m…

Where is the Controller For an MVC VoiceXML Application

Image
In a previous post we created a simple "Hello World" application to demonstrate how to use the VoiceModel library.  This did not demonstrate how to control the flow of a voice application so in this post I will explore how we can add a controller to our MVC VoiceXML application.  Lets take a simple example of a voice application that allows the caller to get the weather conditions for an area based on zip code.  Here is the call flow for our application.


If we were developing this application in straight VoiceXML the first block in our call flow could be handled something like this.

<?xml version="1.0" encoding="UTF-8"?> <vxml xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/vxml" version="2.1"> <form id="greeting"> <block> <prompt>Welcome…