0

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>
Anupam
  • 14,950
  • 19
  • 67
  • 94

2 Answers2

0

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.

0

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
Lucas Bernalte
  • 1,179
  • 11
  • 17