The PageEvent and VoiceXMLResult classes return information about the result of a Browser session.
PageEvent Class
The PageEvent class contains information about an event thrown from within a VoiceXML document that does not have a corresponding catch element (a handler for the event) in the VoiceXML document.
The hosting .NET application will get the PageEvent information from the VoiceXMLResult object. VoiceXMLResult is the type of return for the synchronous Run(Uri, CookieContainer) method, or is obtained by the Result property of the SessionCompletedEventArgs class during asynchronous Browser sessions.
The UnhandledThrowElement property in the VoiceXmlResult contains the PageEvent object, which holds the value of the throw element's event attribute, for example noinput or error.badfetch. PageEvent also contains the message associated with the event from the catch element's special _message variable, which contains the value of the message string from the corresponding throw element, or a platform-dependent value for the pre-defined events raised by the platform.
VoiceXmlResult Class
The VoiceXmlResult is the type of the return value from the synchronous Run(Uri, CookieContainer) method. For asynchronous Browser instances, launched with the RunAsync(Uri, CookieContainer) method, the Result property on the SessionCompletedEventArgs class provides the VoiceXMLResult.
The properties of the VoiceXMLResult object get the following information about a completed Browser session:
-
The Namelist property gets programmable name/value pairs set in the VoiceXML document processing.
-
The Reason property gets the reason that a Browser exited a VoiceXML document.
-
The UnhandledThrowElement gets a PageEvent object.
-
The Cookies property gets a System.Net.CookieContainer object.