vxmlvoicexml

VXML a common handler for all forms for a generalized DTMF input


I have just started doing some VXML, and looking to do a simple feature where a DTMF input like zero obtained on any of the forms will lead to a common generalized action. A good example for this is the one we use in our normal interactions with IVR where we press zero to speak to an agent at any time when we are in the IVR.

1) I thought of using throw/catch for this purpose. Is this a good design or is there another VXML feature that best suited for an action like this?

<choice dtmf="0" event="zeroEntered"/>
</choice>

My root document would have:

<catch event="ZeroEntered">
   ---Do something
</catch>

2) If throw/catch is the way to go, I see its not possible to get that dtmf zero on all the VXML pages. Because elements are not present on all the VXML pages I have...Is there another way? Or I should explicitly include menu in all the pages to catch dtmf zero at any during the call?


Solution

  • What you are referring to are often called universal or global grammars. You can implement them using the link element. You can set the scope for this grammar at the application, document or form level. For more on universal grammars look at this article. And you can find more about the link element here.