Is there a way to set a time limit for a call duration within vxml? For example, if a caller orders a block of time (say 10 minutes), after 10 minutes, can a timer be added to the vxml script to then drop the call, or announce the call is ending? The primary function I am looking for and hopefully example, is the ability to set the time limit within vxml.
You cannot do it directly in VoiceXML but you can use the complimentary standard CCXML to achieve this. CCXML is event driven and can be setup as a state machine that transitions on events.
You can setup an event to timeout after a certain period.
The dialogstart element starts the VoiceXML application. The CCXML continues to run in the background processing events. The send element sends an event back to the CCXML and by using the delay attribute you can set the time period. CCXML is based on web standards so you can dynamically create the XML document with the appropriate time period in the delay. When the event fires you will catch it in the CCXML and terminate the VoiceXML application.