Dynamic Menus with VoiceModel
There is a new example in the VoiceModel project that shows how to create dynamic menus. Dynamic menus can be very useful in voice applications where you want to configure how the menus work in some persistence mechanism, allowing you to change the flow of the application without recompiling and redeploying, or if you want to tailor it to a specific user based based on their personal preferences. Here is the code in this new example: public override CallFlow BuildCallFlow() { CallFlow flow = new CallFlow(); flow.AddState(ViewStateBuilder.Build("greeting", "myMenu", new Say("greeting", "Welcome to the dynamic menu example.")), true); //This is a fake service that mimics getting meta-data for the menus from a web service or database DynamicMenuService service = new DynamicMenuService(); VoiceMenu myMenu = service.GetMenu("myMenu"); Prompt menuOptions = new Prompt(); //Build the prompts for the menu option...