点滴积累,融会贯通

-----喜欢一切有兴趣的东西

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

* Pre-defined normal events
**help  Thrown when the user requests help.
**noinput  Thrown within an interactive call state when the user has said nothing within the timeout period.
**nomatch  Thrown when the user utters something outside the active grammars.
**connection.disconnect.hangup  Thrown when the user disconnects or is disconnected. Post-hang-up processing is limited to 5 seconds. If you need to do extensive processing, your event handler should execute a submit to your Web server to perform any additional processing. Prior to Revision 1, this event was telephone.disconnect.hangup.
**cancel  Thrown when the user has requested the current prompt be canceled.
**exit  Thrown when the user has asked to exit.
**maxspeechtimeout  Thrown when the user input exceeded the 'maxspeechtimeout' property.
**connection.disconnect.transfer  Thrown when the user has been transferred unconditionally to another line and will not return. Prior to Revision 1, this event was telephone.disconnect.transfer.
*Pre-defined error events
**error.semantic  Thrown when the VoiceXML interpreter detects a run-time error.
**error.badfetch  Thrown when an HTTP request for a VoiceXML document, external grammar, or external script fails. If the VoiceXML document that required the fetch contains semantic errors, the badfetch event is thrown to the container element that attempted to navigate to the document. Because the Tellme VoiceXML interpreter loads scripts on demand, a badfetch event that results from the fetch of a script is not thrown until the script element is encountered by the VoiceXML interpreter.
**error.noauthorization  Thrown when the user is not authorized to perform the requested operation.
**error.unsupported.format  Thrown when the requested resource is in an unsupported format.
**error.unsupported.language  Thrown when the Platform doesn't support the specified language.
**error.unsupported.element  Thrown when the Platform doesn't support the given VoiceXML element.

*Handling events
**To handle events
 <catch event="nomatch">
   I'm sorry. I didn't get that.
   Please say the name of a sport.
   For example, say baseball.
 </catch>
*To handle the common pre-defined events
 <noinput>
    I'm sorry. I didn't hear you
    <reprompt/>
 </noinput>
*To handle different events with the same handler, delimit each event name with a space
 <catch event="nomatch noinput">
   I'm sorry. I didn't get that.
   Please say the name of a sport.
   For example, say baseball.
 </catch>

*Event scoping
 field -> dialog -> document -> application -> session

*Throwing application-defined events
**To cause an application-defined event to occur, use the throw element. Use the throw element's event attribute to specify the name of the event to be thrown.

posted on 2010-12-29 14:03  小寒  阅读(384)  评论(0编辑  收藏  举报