<exit>

Description

Exit the interpreter session.  Returns control to the interpreter context, which determines what to do next.  This element differs from the <return> element in that <exit> terminates all loaded elements while <return> returns from a <subdialog> invocation.  Note that the <exit> element does not cause an "exit" event to be thrown.

Syntax


<exit expr="ECMAScript_Expression" namelist="variable1 variable2 ..."/>

Attributes

Attribute

Description

expr

An ECMAScript expression to be evaluated.  See below for details on General Usage.

Optional. (Only one of expr or namelist can be specified.)

namelist

A space-separated list of variables to be returned to the interpreter context when the exit request is sent.  Returns nothing by default.  See below for details on General Usage as well as Usage with Multiphase Transfers.

Optional. (Only one of expr or namelist can be specified.)

Attribute Notes

Parents

Block Catch Error Filled ForEach Help If Noinput Nomatch

Children

None

VoiceGenie Extensions

None

Limitations/Restrictions


General Usage of <exit> Attributes

Note that the expr and namelist attributes can be specified but are not useful in PSTN environments.  These attributes are only useful when used in a VoIP platform, where the SIP BYE message is used to terminate a call.  Additional information (in this case, attribute/value pairs) can be sent with the terminating SIP BYE message.  In the case of a PSTN hangup/disconnect, additional information cannot be sent.

These attributes are useful for advanced applications that use external elements (such as an external call control server) in addition to the VoiceXML server.  In such applications, calls are routed to the VoiceXML server from the external servers whenever VoiceXML must be executed to collect user input.  After input has been collected, information can be passed back to the external servers with an <exit> tag.

CCXML-Specific Note:

If you are writing a VoiceXML dialog for use in a CCXML application (running on the VG7 CCXML platform), please note that if the CCXML application uses <dialogterminate> to end the VoiceXML dialog, the dialog cannot return results in the <exit> namelist.

Usage of <exit> Attributes with Multiphase Transfers

One exception to the above generalization is the use of <exit>'s namelist in multiphase transfers (i.e. when <transfer>'s consultexpr is set).  After interacting with the callee, a child script can pass information (including the accepttransfer boolean variable to indicate whether or not the call is accepted) back to the parent page by exiting with <exit namelist="<var1> <var2> .../>.   The combined length of the variable names and values must not exceed 4096 characters.  The parent page can then access these results through the <transfer>'s shadow variable(s) <transfer_name>$.result.<vari>.


Example


<?xml version="1.0"?> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <form> <block> Thanks for calling. <exit/> </block> </form> </vxml>