Page 1 of 1

cache control issues

Posted: Thu Feb 23, 2006 9:44 am
by tcharron
I had a small issue that deals wioth the caching of the app root document for an IVR application. Below is an example of the VoiceXML welcome message:

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" application="app.vxml">
<form>
<block>
<prompt><voice name="julia">Welcome to the test Application.</voice></prompt>
<assign name="ANI" expr="session.telephone.ani"/>
<submit next="ControllerServlet" namelist="ANI"/>
</block>
</form>
</vxml>

And the corresponding app.vxml:

<?xml version="1.0"?>
<vxml version="2.0">

<var name="ANI"/>
<var name="Action"/>

<property name="maxspeechtimeout" value="300s"/>
<property name="documentmaxage" value="0"/>
<property name="scriptmaxage" value="0"/>
<property name="interdigittimeout" value="2s"/>
<property name="sensitivity" value="0.65"/>
<property name="bargeintype" value="hotword"/>

<!-- handle all error events -->
<error>
APP ERROR!!! <value expr="_event"/>
Sorry, there was a problem processing your request.
Please try again later.
<disconnect/>
</error>

<catch event="connection.disconnect.hangup">
<assign name="Action" expr="'Logout'"/>
<submit next="ControllerServlet" namelist="Action"/>
</catch>

<link expr="'ControllerServlet?Action=Main'">
<grammar type="application/srgs+xml" root="optmain">
<rule id="optmain">
<one-of>
<item>main</item>
<item>88</item>
</one-of>
</rule>
</grammar>
</link>

<link expr="'ControllerServlet?Action=Forums'">
<grammar type="application/srgs+xml" root="optforum">
<rule id="optforum">
<one-of>
<item>forums</item>
</one-of>
</rule>
</grammar>
</link>

<link expr="'logout.jsp'">
<grammar type="application/srgs+xml" root="optlogout">
<rule id="optlogout">
<one-of>
<item>logout</item>
<item>exit</item>
</one-of>
</rule>
</grammar>
</link>

</vxml>


The application document *ALWAYS* get's cached. I would prefer, specifically during development, that *NOTHING* be cached, but there seems to be no way to actually accomplish this, as once it's loaded, it doesn't seem to respect it's own property!

IVR system

Posted: Thu Feb 23, 2006 12:28 pm
by support
Thanks for posting the IVR code. The IVR issue appears to be that, in voicexml, you can't declare global properties before your root document is loaded. And any cache settings in your root document won't apply to the way the root document itself is loaded. In other words, those cache settings in your root document aren't self-referential to its own loading because it's already been loaded.

The way we typically work around this limitation is to make the root document generated by a script instead of a storing it as a static file which forces our web server to send flags back to the IVR to never cache the file (since it was dynamically generated). Alternatively, you can go into your web server configuration and see if there's a global setting that will force the web server to tell the client to never cache files. You can change the setting back after you're done testing.

Posted: Mon Jun 30, 2008 2:11 pm
by pkeogan
I was having a caching issue, so I follow your suggestion, but nowI'm getting the following error:

DocumentParser::FetchDocument()DocumentParser::FetchDocument(http://www.liveconx.com/liveconxdev/vxm ... _plum.aspx)Cache Miss: http://www.liveconx.com/liveconxdev/vxm ... Attempting to fetch http://www.liveconx.com/liveconxdev/vxm ... .aspxClick here to view saved VoiceXML scriptDocumentParser::FetchDocument(./outbound/Root_VXML.aspx)Cache Miss: http://www.liveconx.com/liveconxdev/vxm ... Attempting to fetch http://www.liveconx.com/liveconxdev/vxm ... ML.aspxMon 30 Jun 2008 02:47:57 PM EDT:Click here to view saved VoiceXML scriptmissing ; before statement line 2SyntaxError: missing ; before statement line 2 (000001;029;1214850965) [IVB_HISTORY] LOCAL: ERROR EVENT=error.semantic.ecmascript MESSAGE= VXI::exit_element()Call End EventEnding sessionEnding Session On Channel 29

We've validated all our files with your validation tool.

The error message seems be saying it's missing a ";"

IVR code fix for caching errors

Posted: Mon Jun 30, 2008 3:09 pm
by support
Hi,

Looking at your IVR code, you need to revise these lines:

Code: Select all

<script><![CDATA[
      var application.callLength = 0;
      var application.callstartTime;
      var application.serviceUrl = 'http://www.liveconx.com/liveconxdev/liveconx_callservice.asmx?wsdl';
      var application.targetNumber = 0;
      var application.trans_id;
      var application.callDurationSeconds;
      var application.date_obj = new Date();
      var application.audio_folder = 'LUM';
      var application.INTV_DOC_NAME='Root';
      var application.INTV_ERROR_COUNT=0;
      var application.INTV_NOINPUT_COUNT=0;
      var application.INTV_NOMATCH_COUNT=0;
      var application.INTV_CONFIRM_COUNT=0;
      var application.INTV_RETURN_VALUE;
      var application.INTV_RETURN_LEG;
      var Iapplication.NTV_NULL;
      if (typeof(application.INTV_CLEANUP_COMPLETE) == 'undefined')
      {
         application.INTV_CLEANUP_COMPLETE = false;
      }
   ]]></script>
to this:

Code: Select all

<script>
<![CDATA[
      application.callLength = 0;
      application.callstartTime;
      application.serviceUrl = 'http://www.liveconx.com/liveconxdev/liveconx_callservice.asmx?wsdl';
      application.targetNumber = 0;
      application.trans_id;
      application.callDurationSeconds;
      application.date_obj = new Date();
      application.audio_folder = 'LUM';
      application.INTV_DOC_NAME='Root';
      application.INTV_ERROR_COUNT=0;
      application.INTV_NOINPUT_COUNT=0;
      application.INTV_NOMATCH_COUNT=0;
      application.INTV_CONFIRM_COUNT=0;
      application.INTV_RETURN_VALUE;
      application.INTV_RETURN_LEG;
      application.INTV_NULL;
      if (typeof(application.INTV_CLEANUP_COMPLETE) == 'undefined')
      {
         application.INTV_CLEANUP_COMPLETE = false;
      }
]]>
</script>
Since the IVR application variables (application.*) already exist, you cannot redeclare them using var. So, if you remove all the "var"'s within your <script> tags, this should fix the IVR error that you are getting.

Also, make sure that you change this line of IVR code:

Code: Select all

var Iapplication.NTV_NULL;
to this:

Code: Select all

application.INTV_NULL;
Hope this helps.

Regards,
Plum Support