| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<catch event="connection.disconnect.hangup">
<log expr="'*** LOG: caught connection.disconnect.hangup event! ***'"/>
<submit next="myCleanUp.cgi" namelist="myVariable"/>
<exit/>
</catch>
<catch event="connection.disconnect.hangup">
<log expr="'*** LOG: caught connection.disconnect.hangup event! ***'"/>
<submit next="myCleanUp.cgi" namelist="myVariable"/>
<!-- always use an exit after catching the disconnect -->
<exit/>
</catch>
<form>
<field name="dummy">
<!-- set the 'noinput' timeout to 1 second -->
<property name="timeout" value="1s"/>
<prompt>
Thanks for calling, you may now hang up.
</prompt>
<!-- create a 'garbage' grammar that will NEVER get a match -->
<grammar type="text/gsl"> [poppaoomowmow] </grammar>
<filled>
<prompt>
no way this will ever happen.
</prompt>
</filled>
<noinput>
<disconnect/>
</noinput>
</field>
</form>
| ANNOTATIONS: EXISTING POSTS |
agonzalez
|
|
| in the WillWorkJustAsFineAsPaint.vxml after de log of the expression you use a submit tag without method and also without parameters it should be a goto also in the wont workt the same stuff thanks | |
agonzalez
|
|
| why to make the platform to install and evaluate a grammar it shouldnt be better a code as this?
------------------------------BOF---------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE vxml SYSTEM "../dtd/vxml.dtd"> <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml21/vxml.xsd" version="2.1"> <catch/> <meta name="maintainer" content="someone@somewhere.somedomain"/> <form> <block> <prompt> Thanks for calling, you may now hang up. </prompt> <exit/> </block> </form> </vxml> ------------------------------EOF-------------------------- sorry this thing is said at: http://docs.voxeo.com/voicexml/2.0/frame.jsp?page=disconnect.htm |
|
agonzalez
|
|
| well im developing a application that jumps between much .jsp files is there anyway to catch a "<catch event="connection.disconnect.hangup" scope="application"/>"or i have to include a catch in 26 files?
--------------------------------------------------------------- sorry for this its answered at: http://docs.voxeo.com/voicexml/2.0/frame.jsp?page=vxml.htm |
|
zscgeek
|
|
| Agonzalez,
As you saw if you put the <catch> in the application root document it will be active for the entire lifetime of your application. This is the way most people handle global scoped event handing. If you need a more detailed example of this please just let us know and we can try to cook something up for you. Regards, RJ |
|
zmaqbool
|
|
| Hi, I have an application scoped vxml file, which has the following code for catch event
code for appRoot.jsp <catch event="connection.disconnect.hangup"> <submit next="diconnect.jsp"/> <exit/> </catch> and in another vxml file, I have no reference, to this catch event, I have just included appRoot.jsp. My Problem is that when i hang up the phone , while currently being on this page. Nothing happens... I mean it does not goto disconnect.jsp page at all.. I would be extremely thankful for helping me out. Zahid |
|
mikethompson
|
|
| Hi Zahid,
Catching hangup events in VoiceXML can be a bit tricky at times, but not impossible by any means. You need to ensure you are within an active recognition field in order to catch the hangup. This is simply the way the VoiceXML FIA operates, but we can easily trick the platform into thinking we are in a recognition field all the time. Check out this tutorial on disconnect events and I think you will learn a lot: http://docs.voxeo.com/voicexml/2.0/mot_discoevents.htm If you are still struggling to catch the hangup after making these changes, please open a private account ticket with us and we will be glad to help you. Best, Mike Thompson Voxeo Corporation |
|
punkin
|
|
| May "connection.disconnect.hangup" be thrown by the user?
<filled> <if cond = "verify == true"> <prompt> Now dialing the number </prompt> <else /> <prompt> Okay, please dial back and try again. Terminating the application. </prompt> <throw event = "connection.disconnect.hangup" /> </if> </filled> If I have <throw> after <prompt>, the <prompt> will be ignored. If I remove the <throw>, the <prompt> will be read. Why? |
|
voxeojeremyr
|
|
| Hello,
The reason that you are not hearing the prompt message is due to the way that VXML is processed. The FIA, or form interpretation algorithm, determines how a VXML application is executed. Basically what happens is that the FIA goes through and processes all the commands it can until it can do no more. For example when it gets to a field where it has to wait for user input, it pauses. So what is happening in the snippet of code that you provided is the FIA gets to the prompt, queues that up to be played and then goes to the next statement, which is to throw the disconnected event. Which I assume that in your catch you are setting an <exit/> One way to do what you are trying to do is do put in a dummy <field> that has a short timeout, this will cause the FIA to stop, processed the queued events, then when the timeout ocurs, throw your disconnect event. Please let us know if you have any questions. Regards, Jeremy Richmond Voxeo Support |
|
punkin
|
|
| My Internet was down for hours due to thunderstorm.
Yes, your suggestion works after I have moved the <throw> into a dummy field. <field name="Dummy" type="boolean"> <property name="timeout" value="1s"/> <noinput> <throw event = "connection.disconnect.hangup" /> </noinput> <filled/> </field> Thanks. |
|
chris_telus
|
|
| Hi,
I'm having some issues with the disconnect event. Below are the codes: <vxml xmlns="http://www.w3.org/2001/vxml" xmlns:nuance="http://voicexml.nuance.com/dialog" version="2.0" application="root.vxml"> <form id="PlayPrompt"> <block> <prompt>This is a prompt</prompt> <submit next="someAction.do" /> </block> </form> </vxml> In root.vxml, we declared a catch for the connection.disconnect.hangup event which logs some information into a database. However, when I hangup on the prompt, the form still submits as if the hangup event was not thrown. I experimented a bit and removed the submit tag and hangup on the prompt. The error was handled properly. The submit tag seemed to be messing things up. Is there a way to do this properly so that the hangup is caught and the form is not submitted? Any help would be greatly appreciated. Thanks, Chris |
|
voxeoJeffK
|
|
| Hello,
This behavior is expected due to the nature of the Form Interpretation Algorithm. You can use a dummy field to get the results desired though: <form> <field name="dummy"> <property name="timeout" value="1s"/> <!-- set the 'noinput' timeout to 1 second --> <prompt> This is a prompt </prompt> <!-- create a 'garbage' grammar that will never, EVER get a match --> <grammar> [(Supercalifragilisticexpialidocious)] </grammar> <filled> <prompt> Supercalifragilisticexpialidocious </prompt> </filled> <noinput> <submit next="someAction.do" /> </noinput> </field> </form> Regards, Jeff Kustermann Voxeo Support |
| login |
|