Last Updated: 09-26-2005
Terminates the phone call.
namelist = "string"
- A space-separated list of variables to be submitted via HTTP to the specified document.
use the transfer element
to connect to a second application that uses a
disconnect element, control is returned to the original application.|
|The disconnect element causes the Platform to hang up on the user,
which in turn causes the Platform to throw a telephone.disconnect.hangup event
in Revision 0 or a connection.disconnect.hangup event in
Revision 1 or later.
Catch the appropriate event to perform post-hang-up processing.
Post-hang-up processing is limited to 5 seconds.
Your event handler can use a data element to post data from your application
to your Web server.|
If the Tellme VoiceXML interpreter encounters a disconnect element within a
connection.disconnect.hangup event handler,
the interpreter will not throw another telephone.disconnect.hangup
or connection.disconnect.hangup event.
|The namelist attribute can be used to return
variables to the interpreter context. Currently, the Tellme
interpreter context does not perform any processing on the variables.
Prior to revision 3, the interpreter ignores any undeclared variables in
the namelist attribute. In
revision 3 and later, the interpreter throws
error.semantic if any of the variables is undeclared.|
The following example requests a password from the user. If the user says
"Tuesday", the application proceeds to the access_granted dialog.
The first two times the user says nothing, she is played a message and reprompted.
The third time the user says nothing, she is disconnected.
If the user says something other than Tuesday, a retry counter, iRetries, is incremented.
The third time the user says something other than Tuesday, she is
played a fatal error message and is disconnected.
To centralize the handling of an invalid password, both the nomatch handler and the
handler throw a custom event, event.password.invalid.
<var name="iMaxTries" expr="3"/> <!-- max allowed password tries -->
<var name="iTries" expr="0"/>
<var name="hint" expr="'It is a day of the week.'"/>
expr="'We are having technical difficulties validating your credentials. Try back later.'"/>
<!-- increment the attempt counter; if the count is exceeded, disconnect -->
<assign name="iTries" expr="iTries+1"/>
<if cond="iMaxTries == iTries">
clear is unnecessary on a nomatch,
but we use the same code to handle a bad filled
What is the code word?
<grammar src="dow-voice.grxml" mode="voice" type="application/srgs+xml"/>
<grammar src="dow-dtmf.grxml" mode="dtmf" type="application/srgs+xml"/>
<!-- exec this on the first and second noinput/nomatch -->
<!-- each event has its own counter -->
I'm sorry. I didn't hear you.
<!-- exec this on the third nomatch -->
<!-- silently disconnect on the third noinput -->
<catch event="noinput" count="3">
<if cond="'tuesday' == password">
<value expr="password"/> is correct!
<!-- we go home here; a *real* app would proceed via goto or submit -->