How to set a timeout in VoiceXML? - timeout

In VoiceXML, how can I set the timeout when start the xml?
This is my VoiceXML document:
<vxml version="2.1">
<form>
<block>
<prompt>Hello from VXML</prompt>
</block>
<transfer name="result" dest="tel:+12321312" bridge="true">
<prompt>Please wait while we transfer you.</prompt>
<grammar xml:lang="en-US" root = "TOPLEVEL" mode="voice">
<rule id="TOPLEVEL" scope="public">
<one-of>
<item> disconnect </item>
</one-of>
</rule>
</grammar>
</transfer>
</form>
</vxml>

Two transfer property you can use:
connecttimeout The time to wait while trying to connect the call before returning the noanswer condition. The value is a Time Designation . Only applies if bridge is true. Default is platform specific.
maxtime The time that the call is allowed to last, or 0s if no limit is imposed. The value is a Time Designation . Only applies if bridge is true. Default is 0s.

I'm not completely sure what you mean. If you want to set up a timeout so that it throws an error if that vxml page you posted is not fetched within that time, you can set the fetchtimeout property before your first form.
If you go to the W3C, it says:
A VoiceXML interpreter context needs to fetch VoiceXML documents, and other resources, such as audio files, grammars, scripts, and objects. Each fetch of the content associated with a URI is governed by the following attributes:
fetchtimeout
The interval to wait for the content to be returned before throwing an error.badfetch event. The value is a Time Designation (see Section 6.5). If not specified, a value derived from the innermost fetchtimeout property is used.
fetchhint
Defines when the interpreter context should retrieve content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed. If not specified, a value derived from the innermost relevant fetchhint property is used.
maxage
maxscale

Related

The effect of use_sim_time in ROS

I am trying to understand what effects does setting use_sim_time to true does specially when recording and playing a rosbag, but unfortunately the info is few and hard to understand.
I know already how to set it to true, so that is no problem.how to do it
I have done some experiments with a rosbag file I have and I noticed:
When I do rosplay play file.bag , the topic \clock is not published
When I do rosplay play file.bag --clock the topic \clock is published
I also have noticed that when I do rostopic echo \clock and I play the bag, many of the time published is the same! (what does this mean??)
And lastly I have noticed that use_sim_time has no effect on any of these results.
So what effect does setting this parameter to true have?
In order for a ROS node to use simulation time according to the /clock topic, the /use_sim_time parameter must be set to true before the node is initialized. In other words,
The ROS API used to get times ros::Time time = ros::Time::now() will retrieve time data from the /clock topic rather than using the system clock. If you turn use_sim_time off then any time values published to /clock will be ignored
If the /use_sim_time parameter is set, the ROS Time API will return time=0 until it has received a value from the /clock topic. Then, the time will only be updated on receipt of a message from the /clock topic and will stay constant between updates
More information follow: [1], [2]

ColdFusion RequestTimeout in component ignored or ineffective

We have several repos where individual pages (eg. scheduled maintenance operations) need to be allowed to execute longer requests (eg. 5 minutes).
However in one repo, setting requesttimeout to 360 seems completely ineffectual! No matter what we set this value to it timesout at 60.
<cfcomponent>
<cfsetting requesttimeout="360" />
<cffunction
name="doit"
access="public"
returntype="string"
output="true" >
<cfinclude template="arrComs.inc.cfm">
<cfset strHTMLReport = '<ul>'>
<cfloop array="#arrComs#" index="i">
<cfscript>
thisCom = CreateObject( 'component', i.fileSansExt );
skvResult = thisCom.generate();
// Sleep for 5 seconds to give MySQL a bit of breathing space
sleep( 3000 );
</cfscript>
<cfset strHTMLReport &= '<li>' & skvResult.msg & '</li>'>
</cfloop>
<cfset strHTMLReport &= '</ul>'>
<cfreturn strHTMLReport>
</cffunction>
</cfcomponent>
Any ideas? Where can I look to help diagnose this? How many locations can requesttimeout be set and why does it seem repo specific?
SOLVED: Deleted the same 1 line of code from 2 of the components that were called inside the loop. The lines set the RequestTimeout to 60, thus overriding the timeout set in the parent.
Humble Pie Time: My mistake was to forget that the components that are called inside the loop also have a line of code with sets the timeout to 60 seconds. Although the error was reporting a timeout it was not clear exactly where. In hindsight I should have searched my code base for the number 60 and I would have found the 2 offending lines a lot sooner.
Further thinking, whilst researching this I found that CFLOOP and CFQUERY both have timeout limits which can be set so for thoroughness I also increased the timeouts on the MySQL queries in the component.
Further further thinking, components that were called earlier in the loop changed the requesttimeout for components that were called later. So although I was diagnosing by inspecting the parent function and the function that it timedout on, I was not given any reason to suspect the components that were called previously in the process.

Smart European Date input control

Using orbeon-4.1.0.201304182144-PE, I'm having a problem with Smart Date completion.
I've included the configuration property:
<property as="xs:string" name="oxf.xforms.format.input.date" value="[D]/[M]/[Y]"/>
to take European-style dates as input.
The condition for Smart Date completion:
When the oxf.xforms.format.input.date property starts with [D: e.g.
20/10
from Input Control-Forms doesn't seem to trigger. I get:
Input Output
20 20/5/2013 (Correct)
20/5 Not Valid (Incorrect, should be 20/5/2013)
20/5/13 20/5/2013 (Correct)
5/20 20/5/2013 (Incorrect, should be Not Valid)
Is this a bug?
This was a bug, and it is now fixed. The fix will be in the next release of Orbeon Forms, which at the time of this writing will most likely be 4.2.

JobDataMap for trigger in Quatz jobs xml

I am running into an issue setting the job data map for the trigger in Quartz. I know it's possible pro grammatically, but I need to do it in the xml jobs file. However, every time I try to add it to the trigger, it says that job-data-map is invalid. Looking at the XSD (http://www.quartz-scheduler.org/xml/job_scheduling_data_2_0.xsd) for the jobs file, it looks like it should be a valid child of the cron tag because it inherits abstractTriggerType, but my app won't accept it.
Here is my code. I am using Quartz.Net 2.0
<job>
<name>StagingJob</name>
<job-type>MyAssembly.StagingJob, MyAssembly</job-type>
<durable>true</durable>
<recover>false</recover>
</job>
<trigger>
<cron>
<name>StagingTrigger</name>
<job-name>StagingJob</job-name>
<misfire-instruction>SmartPolicy</misfire-instruction>
<job-data-map>
<entry>
<key>end-time-cron</key>
<value>0 59 * * * ?</value>
</entry>
<entry>
<key>thread-count</key>
<value>3</value>
</entry>
</job-data-map>
<cron-expression>0 1 * * * ?</cron-expression>
</cron>
</trigger>
What is the correct way to add job data to the trigger via xml?
Try removing the element misfire-instruction, smart policy is the default anyway. If you'd like to keep the element, it should come after the job-data-map element. Quartz is quite strict about ordering of XML elements.
Visual Studio should also give you intellisense with this document if you set Schemas in VS property window point to XSD file included in the distribution.

How to upload files larger than 16k to a WCF-service?

To make a long story short:
Making a web application
Each user profile contains exactly one profile image, which is stored in the database
The bottom layer uses ADO.NET entity framework for data access and relationships between classes
Inserting images into the database on the bottom data access layer of the application works fine
On the top layer, in an MVC application, we use WCF to get the profile image to display. Displaying the image works fine no matter what the size, meaning that uploading images is the only problem.
In my Upload picture-function i can upload pictures up to 16k. Nothing bigger.
I have found all maxBufferSize and maxReceivedMessageSize properties in all app.config and web.config-files in the solution, and changed the values to 1MB (1 048 576)
This is the error i get:
The formatter threw an exception while
trying to deserialize the message:
There was an error while trying to
deserialize parameter
http://www.mydomain.com/contracts/profile/2009/07:userProfile.
The InnerException message was 'There
was an error deserializing the object
of type
Myproject.Commons.BusinessObjects.UserProfile.
The maximum array length quota (16384)
has been exceeded while reading XML
data. This quota may be increased by
changing the MaxArrayLength property
on the XmlDictionaryReaderQuotas
object used when creating the XML
reader. Line 1, position 44978.'.
Please see InnerException for more
details.
It also tells me that the source file of the error is Reference.cs within the service reference.
...and now i basically cannot understand where this really comes from. Anyone has a clue?
The error message says it all, really :-)
The maximum array length quota (16384)
has been exceeded while reading XML
data.
Besides all the maxBufferSize etc. settings, there's also a set of settings called ReaderQuotas which you can set when customizing a binding. One of those settings if the "maxArrayLength" which defaults to 16'384.
<bindings>
<wsHttpBinding>
<binding name="Default" bypassProxyOnLocal="true"
useDefaultWebProxy="true" >
<readerQuotas maxArrayLength="16384"
maxBytesPerRead="4096"
maxDepth="32"
maxNameTableCharCount="16384"
maxStringContentLength="8192"/>
</binding>>
</wsHttpBinding>
</bindings>
These settings influence how the DataContractSerializer on the server will deserialize your message - you can look up details on the MSDN docs and set the values as you need them.
Marc

Resources