VoiceXML 2.1 Development Guide Home  |  Frameset Home


<disconnect>  element


The disconnect element is used to programmatically disconnect the caller from the voice application, which also throws an connection.disconnect event to the interpreter to allow the the developer to submit any existing variables to his webserver.


usage

<disconnect namelist="NMTOKEN">


attributes

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

<Disconnect> 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="Var1" expr="'SomeBigImportantValue'"/>

<catch event="connection.disconnect">
<!--
    here we can catch the disconnect event,
    and submit any existing variables to our server
-->
  <log expr="'*********************************************************'"/>
  <log expr="' CAUGHT THE DISCONNECT EVENT'"/>
  <log expr="'*********************************************************'"/>
<!--
  <submit next="MyWebserver.com/MyCGIFile.cgi" namelist=Var1"/>
-->
</catch>

<form id="F1">

  <block>
    <prompt>
      getting ready to disconnect the call, which
      will throw a telephone dot disconnect event
    </prompt>
  </block>

  <block>
  <disconnect/>
  </block>

</form>
</vxml>



additional links

W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
amitjamwal31885
3/31/2011 5:03 AM (EDT)
Hello...

I want to pass the value from vxml to ccxml during the disconnect the call.

Please tell me how to pass the value from vxml to ccxml during disconnect.

Regards,
Amit Jamwal
Voxeo.Joyce
4/1/2011 4:13 AM (EDT)
Hello Amit,

I am assuming you should be able to do what you need if you catch the hangup in your VXML code.  When you catch the hang up you can do the dialog exit or return to return the variables that you want to the parent CCXML session.

Here is an example of the catch of a hangup event in VXML:
[code]<catch event="connection.disconnect.hangup">
    <exit namelist="SomeVar"/>
  </catch>[/code]

Depending on how your VXML is coded you may want to put this in your root document or a leaf document depending on what you want to do.

If you have any questions, please let us know.

Best Regards,
Joyce Chang
Voxeo Support

[url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url]
mperovic
8/25/2011 8:49 AM (EDT)
It seems that <disconnect> has a namelist attribute. So, params could be passed back directly to underlying platform.

See ref down below

http://www.w3.org/TR/voicexml21/#sec-disconnect
voxeoJeffK
8/25/2011 9:31 AM (EDT)
Hello,

Thank you. It looks like that got dropped from the documentation somehow. I've noted this to our documentation team.

Regards,
Jeff Kustermann
Voxeo Corporation
Voxeo.Van
8/25/2011 9:53 AM (EDT)
Thanks for letting us know. The namelist attribute was certainly missing! I've added it to our VoiceXML docs!

Have a great day.

Van Vanslette
Customer Support
Technical Writer
sanjay098
1/28/2013 5:45 AM (EST)
Hi There,

I want to add timer in my VXML application so that i can calculate the time for which user has listened to the service....

I need this on urgent basis.
Please provide suitable help.....:(
Thanks,

MattHenry
2/4/2013 3:28 PM (EST)


Your best bet here is to simply add a CCXML layer, and then use the "_callstarttime" and "_callendtime" parameters that are available within the "connection.disconnected" transition event:


* http://docs.voxeo.com/ccxml/1.0-final/connectionevent_listing_ccxml10.htm


Alternately, you can try creating a simple timer via JavaScript to see if that works better for you.


Matthew Henry

login



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