I am creating an IVR system for the project and decided to Twilio process part of the phone (creating and receiving calls, sending and receiving SMS messages). This will open a website with an IVR interface, allowing users to navigate the site using a touch-tone telephone.
I do not make all the content available for viewing by phone, which makes sense.
Twilio sends the parameters to your url in querystring or through POST, and you respond with a special subset of XML that tells IVR how to proceed. I progressed very quickly with ASP.net MVC, viewing the content of Twilio XML as representing and rendering site data.
Here's what Twilio's answer looks like:
<?xml version="1.0" encoding="UTF-8" ?> <Response> <Say>Hello World</Say> <Play>http://api.twilio.com/Cowbell.mp3</Play> </Response>
Here's what the Twilio menu looks like:
<?xml version="1.0" encoding="UTF-8" ?> <Gather action="http://your_url" numdigits="1"> <Say>Press 1 to execute your_url, passing a parameter named "digits"</Say> </Response>
Here where I am stuck:
I am trying to add a universal back button, perhaps a skip button, a repeat button, etc., and I find that on each view I find the digit pressed, and then if it is hard-coded Response.Redirect() . I know that this will quickly become unattainable for a large number of views and menus.
So, how can I simulate an MVC application to look more like an application and not like a Zork game? Stacks of menu objects, each with lists of MenuItem objects? How can I make, say, "9" a universal option for "back" and maintain the application, no matter where the user is in the menu system, without having a code for this in every view?
The backward function is just a symptom of the chaos this project will enter into if I don’t draw it right now. Are there .net IVR frameworks out there, can I check for ideas? Any help would be appreciated, I know that this is not a new problem, I just can’t figure out how best to go.