<disconnect>

The <disconnect> element disconnects the user's phone call. As a result, the interpreter context will throw a connection.disconnect.hangup event and enter the final processing state. Processing the <disconnect> element will also flush the prompt queue.

The <disconnect> element is similar to the <exit> element, which also closes the user call and flushes remaining prompts. However, <exit> does not generate an event, while <disconnect> does. A <disconnect> also differs from an <exit> in that it forces the interpreter context to drop the call, where <exit> does not.

Attributes

This section describes the attributes you can set for this element.

Name

Data type

Default

namelist

CDATA

optional

namelist

Implemented according to the VoiceXML 2.1 specification.

The namelist attribute specifies the variable names to be returned to the interpreter context. The default is to return no variables meaning the interpreter context receives an empty ECMAScript object. If an undeclared variable is referenced in the namelist, then an error.semantic is thrown.

The <disconnect> namelist and the <exit> namelist are processed independently. If the interpreter executes both a <disconnect> namelist and an <exit> namelist, both sets of variables are available to the interpreter context. The precise mechanism by which these variables are made available to the interpreter context is platform-specific.

Children

None.

Parents

Sample code

<block>
    Thanks for calling. Goodbye. <disconnect/>
</block>