VoiceXML 2.1 Development Guide Home  |  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

expr Data Type: CDATA Default: 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.
namelist Data Type: NMTOKEN Default: Optional
The namelist attribute 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.

Here is an example of the catch of a hangup event in VXML:

<catch event="connection.disconnect.hangup">
    <exit namelist="SomeVar"/>
</catch>



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
mtatum111
8/13/2010 5:27 PM (EDT)
Is it recommended to put <exit> after <transfer>

Or does the <transfer> actually include some exit on its own?

thanks in advance.
voxeoJason
8/13/2010 6:37 PM (EDT)
Hi,

The way VXML works is that it will execute all of the fields in a form.  If no specific portion is targeted, it will simply go to the next field within the form (this is know as (FIA) or form interpretation algorithm) This proccess will end when control is transferred (such as with a <goto> or <submit>). It will also ends with an implied <exit> when no form items remain eligible to select.  This said, whither or not you utilize an <exit> after a transfer is subjective to your application and what you want to do with it.  If you're planning on taking any additional actions after a result from a <transfer> is thrown, then you could certainly put in an <exit>, however if you're not planning on doing anything else afterwords, then it is not needed.


Regards,

Jason
Voxeo Support
moshe
8/17/2012 9:12 AM (EDT)
I'd phrase the usage of this tag very differently. The word "release" has connotations in telephony that might include "hang up."

Unlike a disconnect element, the exit element does not cause the caller to disconnect. Instead, the VoiceXML browser will exit. If the VoiceXML dialog was started by a CCXML browser, the CCXML browser will get a dialog.exit event and the namelist, if any, as part of that event. Otherwise, if the call has not been transferred or otherwise disposed of, the call will disconnect.
VoxeoGarret
8/25/2012 9:19 PM (EDT)
Hello Moshe,

I see what you are saying. This section would make more sense with the addition of the exit back to the CCxml session which would also help to explain why a connection.disconnect is not thrown as the Vxml browser session is just exiting. Ill go ahead and pass this along to our DOCs team as this is a great suggestion.

Regards,
Garrett King

Customer Support Engineer
Voxeo Corporation

login



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