[Voiceglue] Catching disconnects
James Green
james.green at mjog.com
Tue Apr 13 10:30:23 UTC 2010
Doug,
We've now conducted some simple testing.
To shorten things considerably, consider the idea we have:
<vxml>
<var name="test" expr="'Value assigned by the document'"/>
<catch event="connection.disconnect">
<log expr="document.test"/>
</catch>
<form>
<block>
<assign name="document.test" expr="'Value assigned within a form'"/>
<disconnect/>
</block>
</form>
</vxml>
What is logged: Value assigned by the document
What we expected: Value assigned within a form
We have also tried swapping 'document.' for 'application.' without any
change - they both appear to reference the same symbol.
I might have understood things had the variable scoping prefix not been
in place, but with it there appears to be a stack in operation.
Makes things a right mess as we want to use an application-level JS
object to maintain state, and within a disconnect catch block fire a
JSON representation to the web server to record the call activity. This
appears in fact to be recommended by the various guides I've found
discussing <disconnect/> and it's correcting catch block.
Naturally if anyone else has this or similar actually working, do tell!
James
-----Original Message-----
From: voiceglue-bounces at voiceglue.org
[mailto:voiceglue-bounces at voiceglue.org] On Behalf Of Doug Campbell
Sent: 12 April 2010 20:07
To: General discussion about voiceglue
Subject: Re: [Voiceglue] Catching disconnects
> I'm wondering if during my call I'm in one context, then in the catch
> condition the engine discards that context and somehow brings forward
> a representation of the javascript environment as if the call has only
> just begun? I am at a loss to explain this otherwise.
Apologies if you've already thought of this, but are you being careful
about the scope in which your javascript objects are being defined?
Section 5.1.2 in the VXML reference describes them fairly clearly.
As I read the code, there is only a single javascript context that gets
created for the entire call, so I don't think that voiceglue/openvxi are
doing anything strange behind your back.
Of course, I've been wrong before. :-)
Doug Campbell
_______________________________________________
Voiceglue mailing list
Voiceglue at voiceglue.org
http://www.voiceglue.org/mailman/listinfo/voiceglue
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.801 / Virus Database: 271.1.1/2807 - Release Date: 04/12/10
19:32:00
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 9.0.801 / Virus Database: 271.1.1/2807 - Release Date: 04/13/10
07:32:00
-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 9.0.801 / Virus Database: 271.1.1/2808 - Release Date: 04/13/10 07:32:00
More information about the Voiceglue
mailing list