<?xml version="1.0" encoding="utf-8"?>
<!--
//  Copyright (C) 2006 Microsoft Corporation.  All rights reserved.
//  The xml file that describes the finite state machine.
-->
<FiniteStateMachine>
	<FsmModule>
		<Calendar id="200" firstActivityId="201">

			<!-- Uncaught exceptions -->
			<Transition event="quotaExceeded" action="null" refId="QuotaExceededError"/>
			<Transition event="xsoError" action="null" refId="FatalErrorStatement"/>

			<!-- Entry point for the calendar.  Find # remaining appointments on the current day  -->
			<Menu id="201" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="getTodaysMeetings" heavyaction="true" refId="202"/>
				<Transition event="noMeetings" action="null" refId="NoMeetingsStatement"/>
			</Menu>
			<!-- Say how many meetings there are today -->
			<Menu id="202" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="multiStatement" name="tuiNumberOfAppointmentsToday">
					<Prompt type="cardinal" name="remaining" suffix="singularPlural"/>
				</Prompt>
				<Transition event="noKey" action="null" refId="213"/>
			</Menu>
			<!-- Say there are no more meetings today and go right to the calendar menu -->
			<Menu id="203" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="multiStatement" name="tuiNumberOfAppointmentsToday">
					<Prompt type="cardinal" name="remaining" suffix="singularPlural"/>
				</Prompt>
				<Transition event="noKey" action="null" refId="206"/>
			</Menu>
			<!-- No meetings -->
			<Menu id="NoMeetingsStatement" dtmfInputValue="option">
				<!-- Import the no meetings prompts -->
				<FsmImport href="AsrCalendar.fsm" module="CalendarNoMeetingsStatementPrompts"/>
				<Transition event="noKey" action="null" refId="206"/>
			</Menu>

			<!-- Meeting Summaries  -->
			<Menu id = "205" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option" >
				<!-- Import the header prompts from AsrCalendar.fsm -->
				<FsmImport href="AsrCalendar.fsm" module="CalendarHeaderPrompts"/>
				<!-- Use transitions off the calendar menu -->
				<Transition event = "noKey" action = "null" refId = "206"/>
			</Menu>
			<!-- Calendar Menu  -->
			<Menu id="206" minDtmfSize="1" maxDtmfSize="2" dtmfInputValue="option">
				<Condition value="NOT IsNull(current)">
					<Condition value="NOT more">
						<!-- To replay this meeting's header, press 1 -->
						<Prompt type="statement" name="tuiCalendarMenuReplay"/>
						<!-- To call the meeting location, press 2 -->
						<Prompt condition="NOT IsNull(locationPhone)" type="statement" name="tuiCalendarMenuCallLocation"/>
						<!-- To inform participants that you'll be late, press 3 -->
						<Prompt condition="isMeeting AND (owner OR (NOT owner AND NOT tentative))" type="statement" name="tuiCalendarMenuYouWillBeLate"/>
						<!-- To accept the meeting, press 4 -->
						<Prompt condition="NOT owner AND tentative" type="statement" name="tuiCalendarMenuAccept"/>
						<!-- To mark it as tentative, press 4 -->
						<Prompt condition="NOT owner AND NOT tentative" type="statement" name="tuiCalendarMenuTentative"/>
						<!-- For meeting details, press 5 -->
						<Prompt type="statement" name="tuiCalendarMenuMeetingDetails"/>
						<!-- To cancel the meeting, press 7 -->
						<Prompt condition="owner" type="statement" name="tuiCalendarMenuCancelMeeting"/>
						<!-- To decline the meeting, press 7 -->
						<Prompt condition="NOT owner" type="statement" name="tuiCalendarMenuDeclineMeeting"/>
						<!-- For the next meeting, press the pound key  -->
						<Prompt type="statement" name="tuiCalendarMenuNextMeeting"/>
						<!-- To exit to the main menu, press the star key -->
						<Prompt type="statement" name="tuiCalendarMenuExitMain"/>
						<!-- To repeat this menu, press 0 -->
						<Prompt type="statement" name="tuiCommonRepeatMenu"/>
						<!-- For more options, press 0 0 -->
						<Prompt type="statement" name="tuiCommonMoreOptions"/>
					</Condition>
					<Condition value="more">
						<!-- for the previous meeting, press 1 1 -->
						<Prompt type="statement" name="tuiCalendarMenuPreviousMeeting"/>
						<!-- to call the meeting organizer, press 2 2 -->
						<Prompt condition="NOT owner AND NOT IsNull(organizerPhone)" type="statement" name="tuiCalendarMenuCallOrganizer"/>
						<!-- for participant details, press 5 5 -->
						<Prompt type="statement" name="tuiCalendarMenuParticipantDetails"/>
						<!-- To forward the meeting, press 6 -->
						<Prompt condition="isMeeting" type="statement" name="tuiCalendarMenuForwardMeeting"/>
						<!-- to clear your calendar, press 7 7 -->
						<Prompt type="statement" name="tuiCalendarMenuClearCalendar"/>
						<!-- to reply to the meeting organizer, press 8 -->
						<Prompt condition="NOT owner" type="statement" name="tuiCalendarMenuReplyToMeetingOrganizer"/>
						<!-- to reply to all the participants, press 8 8 -->
						<Prompt condition="isMeeting" type="statement" name="tuiCalendarMenuReplyToAllParticipants"/>
						<!-- To skip to the next day, press the pound key twice -->
						<Prompt type="statement" name="tuiCalendarMenuSkipToNextDay"/>
						<!-- To exit to the main menu, press the star key -->
						<Prompt type="statement" name="tuiCalendarMenuExitMain"/>
						<!-- To repeat this menu, press 0 -->
						<Prompt type="statement" name="tuiCommonRepeatMenu"/>
						<!-- To return to the previous menu, press 0 0 -->
						<Prompt type="statement" name="tuiCommonReturnPrevious"/>
					</Condition>
				</Condition>
				<Condition value="IsNull(current)">
					<!-- For the next meeting, press the pound key -->
					<Prompt condition="" type="statement" name="tuiCalendarMenuNextMeeting"/>
					<!-- To skip to the next day, press the pound key twice -->
					<Prompt condition="" type="statement" name="tuiCalendarMenuSkipToNextDay"/>
					<!-- To exit to the main menu, press the star key -->
					<Prompt condition="" type="statement" name="tuiCalendarMenuExitMain"/>
					<!-- To repeat this menu, press 0 -->
					<Prompt condition="" type="statement" name="tuiCommonRepeatMenu"/>
				</Condition>

				<!-- Transition events off of the Calendar Menu -->
				<Transition event = "11" action = "null" refId = "209"/>
				<Transition event = "#" action = "null" refId = "208"/>
				<Transition event = "##" action = "nextDay" heavyaction="true" refId = "213"/>
				<Transition event = "*" action = "null" refId = "out-106"/>
				<Transition event = "0" action = "null" refId = "206"/>

				<!-- auto events -->
				<Transition event="noMeetings" action="null" refId="NoMeetingsStatement"/>

				<Condition value="NOT IsNull(current)">
					<Transition event = "1" action = "null" refId = "205"/>
					<Transition condition = "NOT IsNull(locationPhone)" event = "2" action = "null" refId = "264"/>
					<Transition condition = "IsNull(locationPhone)" event = "2" action = "null" refId = "268"/>
					<Transition condition = "NOT owner AND NOT IsNull(organizerPhone)" event = "22" action = "callOrganizer" refId = "263"/>
					<Transition condition = "NOT owner AND IsNull(organizerPhone)" event = "22" action = "null" refId = "269"/>
					<Transition condition = "isMeeting AND (owner OR (NOT owner AND NOT tentative))" event = "3" action = "clearMinutesLate" refId = "230"/>
					<Transition condition = "NOT owner AND isMeeting" event = "8" action = "replyToOrganizer" refId = "250"/>
					<Transition condition = "isMeeting" event = "88" action = "replyToAll" refId = "251"/>
					<Transition condition = "NOT owner AND NOT tentative" event = "4" action = "markAsTentative" refId = "217"/>
					<Transition condition = "NOT owner AND tentative" event = "4" action = "acceptMeeting" heavyaction="true" refId = "216"/>
					<Transition event = "5" action = "getDetails" heavyaction="true" refId = "210"/>
					<Transition event = "6" condition="isMeeting" action = "forward" refId="1400"/>
					<Transition event = "55" action = "getParticipants" heavyaction="true" refId = "215"/>
					<Transition event = "7" action = "cancelOrDecline" refId = "270"/>
					<Transition event = "77" action = "cancelSeveral" heavyaction="true" refId = "278"/>
					<Transition event = "00" action = "more" refId = "206"/>
				</Condition>
			</Menu>


			<!-- Import the forward message module from DtmfEmail.fsm -->
			<FsmImport href="DtmfEmail.fsm" module="ForwardMessageModule"/>
			<Menu id="ForwardMessageComplete">
				<Transition event="noKey" refId="277" action="null"/>
			</Menu>
			<Menu id="ForwardMessageCancelled">
				<Transition event="noKey" refId="206" action="null"/>
			</Menu>

			<!-- No more meetings for the next 7 days -->
			<Menu id="207" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiNoMeetingsNextSevenDays">
					<Prompt type="date" name="calendarDate"/>
				</Prompt>
				<Transition event="noKey" action="null" refId="206"/>
			</Menu>
			<!-- Get next meeting -->
			<Menu id="208" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="nextMeeting" heavyaction="true" refId="213"/>
				<Transition event="xsoError" action="null" heavyaction="true" refId="XsoErrorState"/>
				<Transition event = "noMeetings" action = "null" refId = "205"/>
				<Transition event = "emptyCalendar" action = "null" refId = "207"/>
			</Menu>
			<!-- Get previous meeting -->
			<Menu id="209" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="previousMeeting" heavyaction="true" refId="214"/>
				<Transition event="xsoError" action="null" heavyaction="true" refId="XsoErrorState"/>
				<Transition event="noMeetings" action="null" refId="NoMeetingsStatement"/>
				<Transition event = "emptyCalendar" action = "null" refId = "207"/>
			</Menu>

			<!-- Error States -->
			<Menu id="XsoErrorState" minDtmfSize="1" maxDtmfSize="1" dtmfInputValue="option">
				<Prompt type="statement" name="tuiItemError"/>
				<Prompt type="statement" name="tuiCalendarMenuNextMeeting"/>
				<Prompt type="statement" name="tuiCalendarMenuExitMain"/>
				<Transition event="#" action="null" refId="208" />
				<Transition event="*" action="null" refId="out-106" />
			</Menu>
			<Menu id = "QuotaExceededError" uninterruptible="true">
				<Prompt type = "statement" name = "tuiErrorQuotaExceeded"/>				
				<Transition event="noKey" action="null" refId="206"/>
			</Menu>
			<Menu id="FatalErrorStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiCalendarFatalError"/>
				<Transition event="noKey" action="null" refId="out-106"/>
			</Menu>
			
			<!-- Meeting Details Instructions -->
			<Menu id="210" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiMeetingDetails"/>
				<Transition event="noKey" action="null" refId="211"/>
			</Menu>

			<!-- Meeting Details: Attendee information -->
			<Menu id = "211" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Condition value="NOT isMeeting">
					<Prompt type="statement" name="tuiAttendeeCountTotal_Zero"/>
				</Condition>
				<Condition value="isMeeting AND owner">
					<Prompt type="statement" name="tuiOrganizerSelf"/>
					<Prompt type="multiStatement" name="tuiAttendeeCountAccepted">
						<Prompt type="cardinal" name="numAccepted" suffix="singularPlural"/>
					</Prompt>
					<Prompt type="multiStatement" name="tuiAttendeeCountDeclined">
						<Prompt type="cardinal" name="numDeclined" suffix="singularPlural"/>
					</Prompt>
					<Prompt type="multiStatement" name="tuiAttendeeCountUndecided">
						<Prompt type="cardinal" name="numUndecided" suffix="singularPlural"/>
					</Prompt>
				</Condition>
				<Condition value="isMeeting AND NOT owner">
					<Prompt type="statement" name="tuiOrganizerNotSelf">
						<Prompt type="name" name="ownerName"/>
					</Prompt>
					<Prompt type="multiStatement" name="tuiAttendeeCountTotal">
						<Prompt type="cardinal" name="numAttendees" suffix="singularPlural"/>
					</Prompt>
				</Condition>
				<Transition event="noKey" action="null" refId="212"/>
			</Menu>
			<!-- Calendar body playback -->
			<MessagePlayer id = "212" firstActivityId="100">
				<Menu id = "100" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Transition event="noKey" action="firstMessagePart" heavyaction="true" refId="104"/>
					<Transition event="endOfSection" action="null" refId="106"/>
					<Transition event="xsoError" action="null" refId="105"/>
				</Menu>
				<PlayBackMenu id="101" minDtmfSize="0" maxDtmfSize="2" dtmfInputValue="option" stopPromptOnBargeIn="false">
					<Prompt condition="playMixedContentIntro" type="statement" name="tuiMixedAudioTextContent"/>
					<Prompt condition="playAudioContentIntro" type="statement" name="tuiPlayingAudioSection"/>
					<Prompt condition="playTextContentIntro" type="statement" name="tuiPlayingTextSection"/>
					
					<Prompt condition="wavePart" type="tempwave" name="messagePart" prosodyRate="user"/>
					<Prompt condition="textPart" type="email" name="messagePart" prosodyRate="user" language="message"/>
					<Transition event="1" action="rewind" refId="101" playbackAction="true"/>
					<Transition event="2" action="pause" refId="PauseMessageStatement"/>
					<Transition event="3" action="fastForward" refId="101" playbackAction="true"/>
					<Transition event="4" action="slowDown" refId="101"/>
					<Transition event="6" action="speedUp" refId="101"/>
					<Transition event="11" action="firstMessagePart" heavyaction="true" refId="101"/>
					<Transition event="33" action="nextMessageSection" heavyaction="true" refId="101"/>
					<Transition event="55" action="nextLanguagePause" refId="NextLanguage"/>
					<Transition event="*" action="null" refId="out-206"/>
					<Transition event="#" action="null" refId="out-208"/>
					<Transition event="0" action="pause" refId="102"/>
					<Transition event="noKey" action="nextMessagePart" heavyaction="true" refId="101"/>
					<Transition event="endOfSection" action="null" refId="103"/>
					<Transition event="xsoError" action="null" refId="105"/>
				</PlayBackMenu>
				<Menu id="102" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt condition="IsNull(selectableLanguages)" type="statement" name="tuiCalendarPlaybackMenu"/>
					<Prompt condition="NOT IsNull(selectableLanguages)" type="statement" name="tuiCalendarPlaybackMenuMultiLang"/>
					<Transition event="noKey" action="null" refId="101"/>
				</Menu>
				<Menu id="103" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt condition="isEmptyWave" type="statement" name="tuiWaveFileEmpty"/>
					<Transition event="noKey" action="nextMessageSection" refId="101"/>
					<Transition event="xsoError" action="null" refId="105"/>
					<Transition event="endOfSection" action="null" refId="out-206"/>
				</Menu>
				<Menu id="104" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<!-- Inform the user of auto detected language -->
					<Prompt condition="(NOT IsNull(messageLanguage)) AND (NOT IsNull(languageDetected))" type="statement" name="tuiLADCalendar">
						<Prompt type="language" name="messageLanguage"/>
					</Prompt>
					<Prompt type="statement" name="tuiMessageBodyReads"/>
					<Transition event="noKey" action="null" refId="101"/>
				</Menu>
				<Menu id="105" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt type="statement" name="tuiMessagePlaybackMenuError"/>
					<Transition event="noKey" action="null" refId="103"/>
				</Menu>
				<Menu id="106" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt type="statement" name="tuiMessageBodyEmpty"/>
					<Transition event="noKey" action="null" refId="out-206"/>
				</Menu>


				<!-- Paused State -->
				<Menu id="PauseMessageStatement" minDtmfSize="0" maxDtmfSize="1" dtmfInputValue="option">
					<Prompt condition="NOT (lastActivity EQ @PauseContinueStatement)" type="statement" name="tuiPauseInitialStatement"/>
					<Prompt type="silence" name="10s"/>
					<Transition event="anyKey" action="null" refId="101"/>
					<Transition event="noKey" action="null" refId="PauseContinueStatement"/>
				</Menu>
				<Menu id="PauseContinueStatement" minDtmfSize="0" maxDtmfSize="1" dtmfInputValue="option">
					<Prompt type="statement" name="tuiPauseContinueEmailStatement"/>
					<Prompt type="silence" name="5s"/>
					<Transition event="noKey" action="null" refId="PauseDisconnectStatement"/>
					<Transition event="#" action="more" refId="PauseMessageStatement"/>
					<Transition event="anyKey" action="null" refId="101"/>
				</Menu>
				<Menu id="PauseDisconnectStatement" dtmfInputValue="option">
					<Prompt type="statement" name="tuiPauseDisconnectStatement"/>
					<Transition event="noKey" action="disconnect" refId="PauseDisconnectStatement"/>
				</Menu>

				<!-- Statments about increase/decrease of speed on header -->
				<Menu id="SpeedMaximumStatement" dtmfInputValue="option">
					<Prompt type="statement" name="tuiPlaybackSpeedMaximum"/>
					<Transition event="noKey" action="resetPlayback" refId="101"/>
				</Menu>
				<Menu id="SpeedMinimumStatement" dtmfInputValue="option">
					<Prompt type="statement" name="tuiPlaybackSpeedMinimum"/>
					<Transition event="noKey" action="resetPlayback" refId="101"/>
				</Menu>
				
				<!-- Selecting the next language for playback -->
				<Menu id="NextLanguage" dtmfInputValue="option">
					<Prompt condition="IsNull(selectableLanguages)" type="statement" name="tuiOneLanguage">
						<Prompt type="language" name="defaultLanguage"/>
					</Prompt>
					<Prompt condition="NOT IsNull(selectableLanguages)" type="statement" name="tuiLanguageSelectedCalendar">
						<Prompt type="language" name="messageLanguage"/>
					</Prompt>
					<!-- NextLang -->
					<Transition event="55" action="nextLanguage" refId="NextLanguage"/>
					<Transition event="noKey" action="null" refId="101"/>
				</Menu>				

			</MessagePlayer>

			<!-- Next meeting prompt -->
			<Menu id="213" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Condition value="dateChanged">
					<!-- Opening...-->
					<FsmImport href="AsrCalendar.fsm" module="CalendarDateOpeningPrompts"/>
				</Condition>
				<Condition value="initial">
					<Prompt type="statement" name="tuiCalPreambleInitial"/>
				</Condition>
				<Condition value="NOT initial">
					<Prompt condition="first" type="statement" name="tuiCalPreambleFirst"/>
					<Prompt condition="last AND NOT first" type="statement" name="tuiCalPreambleLast"/>
					<Prompt condition="NOT first AND NOT last" type="statement" name="tuiCalPreambleNext"/>
				</Condition>
				<Transition event="noKey" action="null" refId="205"/>
			</Menu>

			<!-- Previous meeting prompt -->
			<Menu id="214" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Condition value="dateChanged">
					<!-- Opening...-->
					<FsmImport href="AsrCalendar.fsm" module="CalendarDateOpeningPrompts"/>
				</Condition>
				<Prompt condition="first" type="statement" name="tuiCalPreambleFirst"/>
				<Prompt condition="last AND NOT first" type="statement" name="tuiCalPreambleLast"/>
				<Prompt condition="NOT first AND NOT last" type="statement" name="tuiCalPreamblePrevious"/>
				<Transition event="noKey" action="null" refId="205"/>
			</Menu>

			<!-- Participant Details -->
			<Menu id="215" minDtmfSize="0" maxDtmfSize="1" dtmfInputValue="option">
				<Condition value="NOT isMeeting">
					<Prompt type="statement" name="tuiAttendeeCountTotal_Zero"/>
				</Condition>
				<Condition value="isMeeting AND owner">
					<Prompt type="statement" name="tuiOrganizerSelf" />

					<Prompt condition="IsNull(acceptedList)" type="statement" name="tuiAttendeeListAcceptedEmpty" />
					<Prompt condition="NOT IsNull(acceptedList)" type="statement" name="tuiAttendeeListAccepted">
						<Prompt type="text" name="acceptedList" />
					</Prompt>

					<Prompt condition="IsNull(declinedList)" type="statement" name="tuiAttendeeListDeclinedEmpty" />
					<Prompt condition="NOT IsNull(declinedList)" type="statement" name="tuiAttendeeListDeclined">
						<Prompt type="text" name="declinedList" />
					</Prompt>

					<Prompt condition="IsNull(undecidedList)" type="statement" name="tuiAttendeeListUndecidedEmpty" />
					<Prompt condition="NOT IsNull(undecidedList)" type="statement" name="tuiAttendeeListUndecided">
						<Prompt type="text" name="undecidedList" />
					</Prompt>
				</Condition>
				<Condition value="isMeeting AND NOT owner">
					<Prompt type="statement" name="tuiOrganizerNotSelf">
						<Prompt type="name" name="ownerName" />
					</Prompt>

					<Prompt condition="IsNull(attendeeList)" type="statement" name="tuiAttendeeCountTotal_Zero" />
					<Prompt condition="NOT IsNull(attendeeList)" type="statement" name="tuiAttendeeListTotal">
						<Prompt type="text" name="attendeeList" />
					</Prompt>
				</Condition>
				<Transition event="noKey" action="null" refId="206"/>
				<Transition event="*" action="null" refId="206"/>
			</Menu>
			<!-- Meeting Accepted -->
			<Menu id="216" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiCalendarMeetingAccepted"/>
				<Transition event="noKey" action="null" refId="208"/>
			</Menu>
			<!-- Meeting Marked tentative -->
			<Menu id="217" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiCalendarMeetingMarkedTentative"/>
				<Transition event="noKey" action="null" refId="208"/>
			</Menu>
			<!-- I'll be late -->
			<Menu id = "230" minDtmfSize = "1" maxDtmfSize = "24" minNumericInput = "1" maxNumericInput = "336" dtmfInputValue = "numeric" dtmfStopTones="#*" interDigitTimeout="3">
				<Prompt type ="statement" name = "tuiEnterMinutesLate" />
				<Transition event = "*" action = "null" refId = "206" />
				<Transition event = "#" action = "lateForMeeting" heavyaction="true" refId = "231" />
				<Transition event = "anyKey" action = "lateForMeeting" heavyaction="true" refId = "231"/>
				<Transition event = "timeout" action = "lateForMeeting" heavyaction="true" refId = "231"/>
			</Menu>
			<Menu id = "231" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "multiStatement" name = "tuiSentWillBeLate">
					<Prompt type = "cardinal" name = "minutesLateMax" suffix = "singularPlural"/>
				</Prompt>
				<Transition event = "noKey" action = "null" refId = "206"/>
			</Menu>

			<!-- ReplyToOrganizer -->
			<Menu id = "250" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiReplyingToOrganizer" />
				<Transition event = "noKey" action = "null" refId = "271"/>
			</Menu>
			<!-- ReplyToAll -->
			<Menu id = "251" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiReplyingToAll" />
				<Transition event = "noKey" action = "null" refId = "271"/>
			</Menu>

			<!-- Call meeting organizer -->
			<CallTransfer id="260" type="blind" numberType="variable" number="organizerPhone">
				<Transition event="transferFailed" action="null" refId="262"/>
			</CallTransfer>
			<!-- Call meeting location -->
			<CallTransfer id="261" type="blind" numberType="variable" number="locationPhone">
				<Transition event="transferFailed" action="null" refId="262"/>
			</CallTransfer>
			<Menu id="262" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiTransferFailed"/>
				<Transition event="noKey" refId="206" action="null"/>
			</Menu>
			<Menu id="263" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiToCancelCallTransfer"/>
				<Prompt type="statement" name="tuiCallingOrganizer"/>
				<Transition event="*" action="null" refId="265" />
				<Transition event="noKey" refId="260" action="null"/>
			</Menu>
			<Menu id="264" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiToCancelCallTransfer"/>
				<Prompt type="statement" name="tuiCallingLocation"/>
				<Transition event="*" action="null" refId="265" />
				<Transition event="noKey" refId="261" action="null"/>
			</Menu>
			<Menu id="265" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiCallTransferCancelled"/>
				<Transition event="noKey" refId="206" action="null"/>
			</Menu>

			<!-- Did not find the location phone number -->
			<Menu id="268" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiCallLocationNoPhone"/>
				<Transition event="noKey" refId="206" action="null"/>
			</Menu>
			<!-- Did not find the organizer's phone number -->
			<Menu id="269" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiCallOrganizerNoPhone"/>
				<Transition event="noKey" refId="206" action="null"/>
			</Menu>

			<!-- Cancel single appointment initital prompt -->
			<Menu id = "270" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt condition = "owner" type = "statement" name = "tuiCancelMeeting" />
				<Prompt condition = "NOT owner" type = "statement" name = "tuiDeclineMeeting" />
				<Transition event = "noKey" action = "null" refId = "271"/>
			</Menu>

			<!-- At the tone, record your cancellation, then press pound -->
			<Menu id = "271" minDtmfSize = "0" maxDtmfSize = "1" dtmfInputValue = "option">
				<Prompt condition="cancelIntro" type = "statement" name = "tuiMeetingUpdateMessageCue" />
				<Prompt condition="replyIntro" type="statement" name="tuiReplyMessageCue"/>
				<Prompt condition="replyAllIntro" type="statement" name="tuiReplyMessageCue"/>
				<Transition event = "noKey" action = "null" refId = "272"/>
				<Transition event = "#" condition="NOT replyIntro AND NOT replyAllIntro" action = "sendMessage" heavyaction="true" refId = "277"/>
				<Transition event = "#" condition="replyIntro OR replyAllIntro" action = "null" heavyaction="false" refId = "272"/>
				<Transition event = "*" action = "cancelMessage" refId = "274"/>
			</Menu>

			<!-- *Beep* -->
			<Record id = "272" dtmfStopTones="#*" type="message">
				<Transition event = "*" action = "cancelMessage" refId = "274" />
				<Transition event = "anyKey" action = "null" refId = "275" />
				<Transition event = "silence" condition="IsNull(recording)" action = "null" refId = "273" />
				<Transition event = "silence" condition="NOT IsNull(recording)" action = "null" refId = "275" />
				<Transition event = "timeout" action = "null" refId = "281" />
				<Transition event = "userHangup" action = "sendMessage" heavyaction="false" refId = "DisconnectState" />
			</Record>

			<!-- Are you still there? -->
			<Menu id = "273" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiAreYouThere" />
				<Transition event = "noKey" action = "appendRecording" refId = "271"/>
			</Menu>

			<!-- Recording cancelled -->
			<Menu id = "274" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type="statement" name="tuiMessageCancelled"/>
				<Transition event = "noKey" action = "null" refId = "206"/>
			</Menu>

			<!-- Recoding too long -->
			<Menu id = "281" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type="statement" name="tuiRecordingTooLong"/>
				<Transition event = "noKey" action = "null" refId = "275"/>
			</Menu>

			<!-- After recording menu -->
			<Menu id = "275" minDtmfSize = "1" maxDtmfSize = "2" dtmfInputValue = "option">
					<Prompt type = "statement" name = "tuiAfterRecordingMenu" />
					<Transition event = "1" action = "sendMessage" heavyaction="true" refId = "277" />
					<Transition event = "11" action = "sendMessageUrgent" heavyaction="true" refId = "277" />
					<Transition event = "2" action = "null" refId = "276" />
					<Transition event = "3" action = "clearRecording" refId = "271" />
					<Transition event = "4" condition="NOT recordingTimedOut" action = "appendRecording" refId = "280" />
					<Transition event = "4" condition="recordingTimedOut" action = "null" refId = "281" />
					<Transition event = "*" action = "cancelMessage" refId = "274" />
					<Transition event = "0" action = "null" refId = "275" />
					<Transition event = "userHangup" action = "sendMessage" heavyaction="false" refId = "DisconnectState" />
			</Menu>

			<!-- Replay recording -->
			<Menu id = "276" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "tempwave" name = "recording" />
				<Transition event = "noKey" action = "null" refId = "275"/>
			</Menu>

			<!-- "Message Sent". Go back to the menu and read the next calendar item -->
			<Menu id = "277" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiMessageSent" />
				<Transition condition = "cancelIntro" event = "noKey" action = "seekValidMeeting" refId = "213" />
				<Transition condition = "replyIntro" event = "noKey" action = "seekValidMeeting" refId = "206" />
				<Transition condition = "replyAllIntro" event = "noKey" action = "seekValidMeeting" refId = "206" />
				<Transition condition = "forwardIntro" event = "noKey" action = "seekValidMeeting" refId = "206" />
				<Transition event = "emptyCalendar" action = "null" refId = "207" />
			</Menu>

			<!-- Cancel Several Meetings Dialog -->
			<Menu id = "278" minDtmfSize = "1" maxDtmfSize = "10" minNumericInput = "1" maxNumericInput = "999" dtmfInputValue = "numeric" dtmfStopTones="#*">
				<Prompt type = "statement" name = "tuiClearCalendarHoursInput" />
				<Transition event = "*" action = "null" refId = "206" />
				<Transition event = "anyKey" action = "parseClearHours" refId = "279" />
			</Menu>
			<Menu id = "279" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "multiStatement" name = "tuiClearCalendarHoursConfirm">
					<Prompt type = "cardinal" name = "lastInput" suffix="singularPlural"/>
				</Prompt>
				<Transition event = "noKey" action = "null" refId = "271" />
			</Menu>

			<!-- Continue recording -->
			<Menu id = "280" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiContinueRecording"/>
				<Transition event = "noKey" action = "null" refId = "272" />
			</Menu>

			<!-- Dummy State for disconnect -->
			<Menu id = "DisconnectState">
				<Transition event = "noKey" action="disconnect" refId="DisconnectState"/>
			</Menu>
		</Calendar>
	</FsmModule>
</FiniteStateMachine>


