<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="3.0">
	<wait value="2s"/>
	
	<do choices="record (record, make a recording, record a message, record message),
				listen (listen, listen to story, story)">
		<say>would you like to record a message or listen to a story?</say>
		<wait value="5s"/>
		
		<on event="choice:record">
			<say>begin recording at the beep</say>
			<recordaudio format="audio/wav"
							value="ftp://drewcogbill:whale.gorgon36@ftp.voxeo.net/www/recording.wav"
							termdigits="#"
							maxtime="30s"
							maxsilence="4s"
							beep="true"/>
		
			<on event="termdigit:#">
				<say>Your message was sent.</say>
			</on>
			
			<on event="maxtime">
				<say>You have reached the maximum amount of time allowed for recording.  Message was sent.</say>
			</on>
			
			<on event="maxsilence">
				<say>You didn't say anything for 4 seconds, so we figured you were finished. The message was sent.</say>
			</on>
			
			<wait value="2s"/>
			<hangup/>
		</on>
		
		<on event="choice:listen">
			<say>There once was a little boy named Yury. He travelled the world in a magical hot air baloon. The end!</say>
		</on>
	</do>

	
	<do>
		
	
	</do>
	<wait value="2s"/>
</callxml>