VoiceXML 2.1 Development GuideHome  |  Frameset Home


<exit>  element

The exit element is similar to the disconnect tag, in that it will terminate the current dialog and return control to the interpreter; i.e., the browser will release the call. The difference is, that the exit element allows the developer to specify both a namelist and an expression that can be sent back to the browser, where the disconnect element has no inherent method of sending such information back to the browser. Also note that when the exit tag is executed, it will not throw a 'connection.disconnect event' event, unlike the disconnect element.


usage
<exit expr="CDATA" namelist="NMTOKEN">


attributes
exprData Type: CDATADefault: Optional
The expr attribute lets the developer send an ECMAScript expression back to the interpreter when this condition executes. Like the namelist attribute, the VXML browser ignores values in this attribute, but any originating CCXML application can receive the values contained in the expr attribute.
namelistData Type: NMTOKENDefault: Optional
The namelist attribute, as mentioned previously, allows developers to send the browser variable information upon an exit condition. Currently, the VXML browser does not do anything with the namelist value, but it does allow you to pass the values to any originating CCXML application.



shadow variables
none


parents
<block> <catch> <error> <filled> <help> <if> <noinput> <nomatch>


children
none


code samples
<Exit namelist> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>

<var name="SomeVar" expr="'SomeValue'"/>

<form id="F1">

  <block>
    <prompt>
      preparing to exit, and send a value back
      to our originating c c x m l dialog.
    </prompt>
    <exit namelist="SomeVar"/>
  </block>

</form>

</vxml>



additional links
W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
DaveMorris
3/14/2006 8:57 AM (EST)
You should also mention here that this tag is quite different from the DISCONNECT tag in that it does NOT throw a connection.disconnect event.  Thus, it can be used within an error catching routine where you would not want another error thrown.

Dave Morris
mikethompson
3/14/2006 11:58 AM (EST)
Hello Dave,

You bring up a good point.  I'll alert the keepers of the documentation and let them know that this might be something they would want to add in future builds.

Thanks for the input!

Mike Thompson
Voxeo Extreme Support
moshe
3/22/2006 10:47 AM (EST)
The "usage" line should show a closing "/>" instead of just a ">".
mikethompson
3/22/2006 11:25 AM (EST)
Hello Moshe,

You're right!  Thanks for catching that, I'll let the documentation keepers know of your find.

Thanks,
Mike Thompson
Voxeo Extreme Support
vinayagan
8/29/2006 9:12 AM (EDT)
Hi,

  I would like to write the vxml certification.I don't know whether is it possible in india.

  If anybody have ideas about the certification centre please inform.

Thanks
nayagan
MattHenry
8/29/2006 11:29 AM (EDT)


Nayagan,

I might suggest that you check the vxml forum, and the prometric site for information regarding VXML developer certification in your region:

http://vxmlforum.com/certification/developer.html
http://www.prometric.com/default.htm

Regards,

~Matthew Henry



mtatum111
9/10/2008 12:19 PM (EDT)
Is it also advisable to put <disconnect> after <exit>  or is that considered "overkill"
VoxeoDustin
9/10/2008 12:29 PM (EDT)
Hey,

Putting a <disconnect/> after and <exit/> will actually do nothing, as exiting the session implicitly disconnects the call leg and the <disconnect/> will likely never actually be processed, so this is not necessary. Worst case scenario is that the <disconnect/> is processed before the session has completely torn down and an ERROR.SEMANTIC will be thrown.

Cheers,
Dustin
mtatum111
9/10/2008 12:32 PM (EDT)
Dustin, thanks for the clarification.  Y'all are the best in answering questions so quickly :)
mtatum111
10/8/2008 12:02 PM (EDT)
I had another question that I wanted to pose
To terminate a connection between the user and the voice browser but also provide event handling for any cleanup processing, which VXML element should be used?

1) <disconnect>
2) <exit>

I was told that the correct answer is 1) <disconnect>  However, I don't understand why 2) <exit> is not the correct answer.
I would have thought <exit> because this element in VXML 2.0 has attributes of namelist and expr (with exactly one of those being used).  Of course, in vxml 2.1, <disconnect> now has the namelist attribute as well.  Since this question though was using 2.0, I though <exit>. Can you provide any insight?

Again, thanks for all of your help.  Y'all are the best!
VoxeoDustin
10/8/2008 12:05 PM (EDT)
Hey Melissa,

<disconnect/> is the correct answer here. <exit/> will terminate the VoiceXML session and send the dialog.exit event back to CCXML, not allowing for any cleanup within VoiceXML. The <disconnect/> however, will leave the VoiceXML session up, throw the [b]connection.disconnect[/b] event so we can perform any post call cleanup.

Cheers,
Dustin

login



© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site