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!
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
cache control issues
IVR system
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.
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.
Last edited by support on Thu Feb 18, 2010 4:56 pm, edited 4 times in total.
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 ";"
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
Hi,
Looking at your IVR code, you need to revise these lines:
to this:
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:
to this:
Hope this helps.
Regards,
Plum Support
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>
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>
Also, make sure that you change this line of IVR code:
Code: Select all
var Iapplication.NTV_NULL;
Code: Select all
application.INTV_NULL;
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com