| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<playaudio><inputaudio><inputdigits> <goto> <run>
<playaudio value="helloworld.wav" format="audio/wav" cache="NO"/>
<playaudio value="greeting.wav" format="audio/wav" cache="NO"/>
<playaudio value="mainmenu.wav" format="audio/wav"/>
<goto value="mynextpage.xml" submit="*" method="get" cache="NO"/>
<?PHP
header ("Cache-Control: no-cache");
... body of code here ...
?>
<%
response.Expires = -1
... body of code here ...
%>
<CFHEADER NAME="Cache-Control" VALUE="no-cache">
... body of code here ...
<%
response.setHeader("Cache-Control","no-cache");
... body of code here ...
%>
print "Cache-Control: no-cache";
... body of code here ...
<?PHP
header ("Pragma: no-cache");
... body of code here ...
?>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="3.0">
<do>
<playaudio value="helloworld.wav"
choices="*,#"
cache="no"/>
<on event="choice:*">
<goto value="helloworld-handler.php?key=star"
submit="*"
method="get"
cache="yes"/>
</on>
<on event="choice:#">
<goto value="helloworld-handler.php?key=pound"
submit="*"
method="get"
cache="yes"/>
</on>
</do>
</callxml>
<goto> calls, but not for the <playaudio>. Now let's code the PHP script:
<?PHP
header ("Cache-Control: no-cache");
$s = $HTTP_GET_VARS["key"];
echo "<?xml version="1.0" encoding="UTF-8" ?> ";
echo "<callxml version="3.0"> ";
echo " <do label=" $s "> ";
if ($s == "star") {
echo " <say>you pressed the star key.</say> ";
} else {
echo " <say>you pressed the pound key.</say> ";
}
echo " </do> ";
echo "</callxml>";
?>
| ANNOTATIONS: EXISTING POSTS |
| login |
|