<?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>
		<!-- Email Manager ==========================================================================-->
		<Email id = "1000" firstActivityId = "1001">

			<!-- Uncaught exceptions -->
			<Transition event="quotaExceeded" action="null" refId="QuotaExceededError"/>
			<Transition event="xsoError" action="null" refId="ErrorMenu"/>

			<!-- Get the new message list and return to main menu if there are none -->
			<Menu id="1001" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="nextMessage" heavyaction="true" refId="1009"/>
				<Transition event="xsoError" action="null" heavyaction="true" refId="ErrorRetryNext"/>
				<Transition event="endOfMessages" action="null" refId="NoMessagesStatement"/>
			</Menu>
			<Menu id="1002" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type = "statement" name = "tuiEndOfMessages" />
				<Transition event="noKey" action="commitPendingDeletions" heavyaction="true" refId="out-106"/>
			</Menu>
			<Menu id="1003" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="commitPendingDeletions" heavyaction="true" refId="out-106"/>
			</Menu>

			<!-- You have no messages -->
			<Menu id="NoMessagesStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiEmailNoMessages"/>
				<Transition event="noKey" action="commitPendingDeletions" heavyaction="true" refId="out-106"/>
			</Menu>


			<!-- Playback menu during message header -->
			<Menu id="1004" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="IsNull(selectableLanguages)" type="statement" name="tuiEmailMessagePlaybackOptionsOneLang"/>
				<Prompt condition="NOT IsNull(selectableLanguages)" type="statement" name="tuiEmailMessagePlaybackOptionsMultiLang"/>
				<Transition event="noKey" action="null" refId="1005"/>
			</Menu>

			<!-- Initialize playback of this message before reading the header, so the language detection can run -->
			<MessagePlayer id="PreLoadMessage" firstActivityId="InitializePlayBack">
				<Menu id="InitializePlayBack" dtmfInputValue="option">
					<Transition event="noKey" action="firstMessagePart" heavyaction="true" refId="out-1005"/>
					<Transition event="endOfSection" action="null" refId="out-1005"/>
					<Transition event="xsoError" action="null" refId="out-1005"/>
				</Menu>
			</MessagePlayer>			
			
			<!-- Read the email header -->
			<Menu id="1005" minDtmfSize="0" maxDtmfSize="2" dtmfInputValue="option">
				<!-- Import the e-mail header prompts from AsrEmail.fsm -->
				<FsmImport href="AsrEmail.fsm" module="EmailHeaderPrompts"/>
				
				<!-- Inform the user of auto detected language -->
				<Prompt condition="(NOT isMissedCall) AND (NOT IsNull(messageLanguage)) AND (NOT IsNull(languageDetected))" type="statement" name="tuiLADEmail">
					<Prompt type="language" name="messageLanguage"/>
				</Prompt>

				<!-- Auto events -->
				<Transition condition="NOT drm" event="noKey" action="null" refId="1006"/>
				<Transition condition="drm" event="noKey" action="null" refId="1007"/>
				<Transition event="endOfMessages" action="null" refId="1002"/>
				
				<!-- Rewind   --><Transition event="1" action="null" refId="1005"/>
				<!-- FForward --><Transition event="3" action="null" refId="1006"/>
				<!-- Envelope --><Transition event="5" action="null" refId="1016"/>
				<!-- Delete   --><Transition event="7" condition="NOT owner AND meetingRequest" action="declineMeeting" refId="1021"/>
				<!-- Decline  --><Transition event="7" condition="owner AND meetingRequest" action="null" heavyaction="true" refId="RespondAsOrganizerStatement"/>
				<!-- Decline  --><Transition event="7" condition="NOT meetingRequest" action="deleteMessage" heavyaction="true" refId="1022"/>
				<!-- Reply    --><Transition event="8" action="reply" refId="1024"/>
				<!-- Unread   --><Transition event="9" action="markUnread" refId="1026"/>
				<!-- Replay   --><Transition event="11" action="null" refId="1005"/>
				<!-- Goto End --><Transition event="33" action="null" refId="1015"/>
				<!-- FollowUP --><Transition event="44" action="flagMessage" heavyaction="true" refId="FlaggedForFollowUpStatement"/>
				<!-- NextLang --><Transition event="55" action="nextLanguage" refId="NextLanguage"/>
				<!-- DelThread--><Transition event="77" action="deleteThread" heavyaction="true" refId="ThreadDeletedStatement"/>
				<!-- ReplyAll --><Transition event="88" action="replyAll" refId="1025"/>
				<!-- HidThread--><Transition event="99" action="hideThread" refId="ThreadHiddenStatement"/>
				<!-- MainMenu --><Transition event="*" action="null" refId="1003"/>
				<!-- Save/Next--><Transition event="#" action="saveMessage" heavyaction="true" refId="1008"/>
				<!-- NxtUnread--><Transition event="##" action="saveMessage" heavyaction="true" refId="NavigateNextUnreadMessage"/>
				<!-- Undelete --><Transition event="*7" condition="canUndelete" action="undeleteMessage" heavyaction="true" refId="1023"/>
				<!-- CantUndel--><Transition event="*7" condition="NOT canUndelete" action="null" refId="NothingToUndeleteStatement"/>
				<!-- PlayMenu --><Transition event="0" action="null" refId="1004"/>
				<!-- MoreOpts --><Transition event="00" action="null" refId="1015"/>
				<!-- Error playing header-->
				<Transition event="xsoError" action="null" refId="1006"/>
			</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="tuiLanguageSelectedEmail">
					<Prompt type="language" name="messageLanguage"/>
				</Prompt>
				<!-- NextLang -->
				<Transition event="55" action="nextLanguage" refId="NextLanguage"/>
				<Transition event="noKey" action="null" refId="1006"/>
			</Menu>


			<!-- Flagged for follow-up -->
			<Menu id = "FlaggedForFollowUpStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiMessageFlagged"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>
			<!-- Thread delete/hidden statements -->
			<Menu id = "ThreadDeletedStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiThreadDeleted"/>
				<Prompt condition="NOT playedUndelete" type="statement" name="tuiUndelete"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>
			<Menu id = "ThreadHiddenStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiThreadHidden"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>
			<!-- There's nothing to undelete -->
			<Menu id = "NothingToUndeleteStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiNoUndelete"/>
				<Transition event="noKey" action="null" refId="1005"/>
			</Menu>


			<!-- Playback menu for a message thread -->
			<MessagePlayer id = "1006" firstActivityId="100">
				<Menu id = "100" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Transition event="noKey" condition="isMissedCall" action="null" refId="out-1015"/>
					<Transition event="noKey" condition="NOT isMissedCall" action="firstMessagePart" heavyaction="true" refId="101"/>
					<Transition event="endOfSection" action="null" refId="103"/>
					<Transition event="xsoError" action="null" refId="104"/>
				</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"/>
					<!-- Rewind   -->
					<Transition event="1" action="rewind" refId="101" playbackAction="true"/>
					<!-- Pause	  -->
					<Transition event="2" action="pause" refId="PauseMessageStatement" />
					<!-- FForward -->
					<Transition event="3" action="fastForward" refId="101" playbackAction="true"/>
					<!-- Slower   -->
					<Transition event="4" action="slowDown" refId="101"/>
					<!-- Envelope -->
					<Transition event="5" action="null" refId="out-1016"/>
					<!-- Faster   -->
					<Transition event="6" action="speedUp" refId="101"/>
					<!-- Delete   -->
					<Transition event="7" condition="NOT meetingRequest" action="deleteMessage" heavyaction="true" refId="out-1022"/>
					<!-- Decline  -->
					<Transition event="7" condition="NOT owner AND meetingRequest" action="declineMeeting" refId="out-1021"/>
					<!-- Decline  -->
					<Transition event="7" condition="owner AND meetingRequest" action="null" heavyaction="true" refId="out-RespondAsOrganizerStatement"/>
					<!-- Reply    -->
					<Transition event="8" action="reply" refId="out-1024"/>
					<!-- Unread   -->
					<Transition event="9" action="markUnread" refId="out-1026"/>
					<!-- Replay   -->
					<Transition event="11" action="firstMessagePart" heavyaction="true" refId="out-1005"/>
					<!-- Goto End -->
					<Transition event="33" action="nextMessageSection" refId="101"/>
					<!-- FollowUP -->
					<Transition event="44" action="flagMessage" heavyaction="true" refId="out-FlaggedForFollowUpStatement"/>
					<!-- NextLang -->
					<Transition event="55" action="nextLanguagePause" refId="NextLanguage"/>
					<!-- DelThread-->
					<Transition event="77" action="deleteThread" refId="out-ThreadDeletedStatement"/>
					<!-- ReplyAll -->
					<Transition event="88" action="replyAll" refId="out-1025"/>
					<!-- HidThread-->
					<Transition event="99" action="hideThread" refId="out-ThreadHiddenStatement"/>
					<!-- MainMenu -->
					<Transition event="*" action="null" refId="out-1003"/>
					<!-- Save/Next-->
					<Transition event="#" action="saveMessage" heavyaction="true" refId="out-1008"/>
					<!-- NxtUnread-->
					<Transition event="##" action="saveMessage" heavyaction="true" refId="out-NavigateNextUnreadMessage"/>
					<!-- Undelete -->
					<Transition event="*7" condition="canUndelete" action="undeleteMessage" heavyaction="true" refId="out-1023"/>
					<!-- CantUndel-->
					<Transition event="*7" condition="NOT canUndelete" action="pause" refId="NothingToUndeleteStatement"/>
					<!-- PlayMenu -->
					<Transition event="0" action="pause" refId="102"/>
					<!-- MoreOptions -->
					<Transition event="00" action="null" refId="out-1015"/>
					
					<Transition event="noKey" action="nextMessagePart" heavyaction="true" refId="101"/>
					<Transition event="endOfSection" action="null" refId="103"/>
					<Transition event="xsoError" action="null" refId="104"/>
					<Transition event="anyKey" action="null" refId="101" playbackAction="true"/>
				</PlayBackMenu>
				<Menu id="102" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt condition="IsNull(selectableLanguages)" type="statement" name="tuiEmailMessagePlaybackOptionsOneLang"/>
					<Prompt condition="NOT IsNull(selectableLanguages)" type="statement" name="tuiEmailMessagePlaybackOptionsMultiLang"/>
					<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="104"/>
					<Transition event="endOfSection" action="null" refId="EndOfMessageStatement"/>
				</Menu>
				<Menu id="104" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
					<Prompt type="statement" name="tuiMessagePlaybackMenuError"/>
					<Transition event="noKey" action="null" refId="103"/>
				</Menu>
				<Menu id="EndOfMessageStatement" dtmfInputValue="option">
					<Prompt type="statement" name="tuiEndOfMessage"/>
					<Transition event="noKey" action="saveMessage" heavyaction="true" refId="out-1015"/>
				</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="tuiLanguageSelectedEmail">
						<Prompt type="language" name="messageLanguage"/>
					</Prompt>
					<!-- NextLang -->
					<Transition event="55" action="nextLanguage" refId="NextLanguage"/>
					<Transition event="noKey" action="null" refId="101"/>
				</Menu>

				<!-- There's nothing to undelete -->
				<Menu id = "NothingToUndeleteStatement" dtmfInputValue="option">
					<Prompt type="statement" name="tuiNoUndelete"/>
					<Transition event="noKey" action="null" refId="101"/>
				</Menu>
			</MessagePlayer>

			<!-- Played for DRM messages -->
			<Menu id="1007" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiEmailRestrictedAccess"/>
				<Transition event="noKey" action="null" refId="1015"/>
			</Menu>

			<!-- Next email -->
			<Menu id="1008" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="nextMessage" heavyaction="true" refId="1009"/>
				<Transition event="xsoError" action="null" heavyaction="true" refId="ErrorRetryNext"/>
				<Transition event="endOfMessages" action="null" refId="1002"/>
			</Menu>
			<!-- Next unread email -->
			<Menu id="NavigateNextUnreadMessage" dtmfInputValue="option">
				<Transition event="noKey" action="nextUnreadMessage" heavyaction="true" refId="1009"/>
				<Transition event="xsoError" action="nextUnreadMessage" heavyaction="true" refId="1009"/>
				<Transition event="endOfMessages" action="null" refId="NoMoreUnreadMessagesStatement"/>
			</Menu>

			<!--Next Message Prompt ========================================================-->
			<Menu id="1009" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="NOT firstMessage" type="statement" name="tuiEmailPositionNext"/>
				<Prompt condition="firstMessage" type="statement" name="tuiEmailPositionFirst"/>
				<Prompt condition="lastMessage" type="statement" name="tuiEmailPositionLast"/>
				<Transition event="noKey" action="null" refId="PreLoadMessage"/>
			</Menu>

			<!-- Previous email -->
			<Menu id="1010" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="previousMessage" refId="1011"/>
				<Transition event="xsoError" action="null" refId="ErrorRetryPrevious"/>
				<Transition event="noPreviousMessages" action="null" refId="1012"/>
			</Menu>
			<!-- Previous Message Prompt =====================================================-->
			<Menu id="1011" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="NOT firstMessage" type="statement" name="tuiEmailPositionPrevious"/>
				<Prompt condition="firstMessage" type="statement" name="tuiEmailPositionFirst"/>
				<Transition event="noKey" action="null" refId="PreLoadMessage"/>
			</Menu>
			<!-- This is your first message -->
			<Menu id="1012" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiEmailFirstMessage"/>
				<Transition event="noKey" action="null" refId="1015"/>
			</Menu>
			<!-- No more unread messages (from ##) -->
			<Menu id="NoMoreUnreadMessagesStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiNoMoreUnreadMessages"/>
				<Transition event="noKey" action="null" refId="1015"/>
			</Menu>

			<!-- ErrorRetry -->
			<Menu id="ErrorRetryNext" dtmfInputValue="option">
				<Transition event="noKey" action="nextMessage" heavyaction="true" refId="1009"/>
				<Transition event="xsoError" action="null" refId="ErrorMenu"/>
				<Transition event="endOfMessages" action="null" refId="1002"/>
			</Menu>
			<Menu id="ErrorRetryPrevious" dtmfInputValue="option">
				<Transition event="noKey" action="previousMessage" heavyaction="true" refId="1011"/>
				<Transition event="xsoError" action="null" refId="ErrorMenu"/>
				<Transition event="noPreviousMessages" action="null" refId="1012"/>
			</Menu>

			<!-- FatalError -->
			<Menu id="FatalErrorStatement" dtmfInputValue="option">
				<Prompt type="statement" name="tuiEmailFatalError"/>
				<Transition event="noKey" action="null" refId="out-106"/>
			</Menu>
			<Menu id = "QuotaExceededError" uninterruptible="true">
				<Prompt type = "statement" name = "tuiErrorQuotaExceeded"/>				
				<Transition event = "noKey" action="null" refId="1015"/>
			</Menu>
			<Menu id = "ErrorMenu" minDtmfSize="1" maxDtmfSize="1" dtmfInputValue="option">
				<Prompt type = "statement" name = "tuiItemError"/>				
				<Prompt type = "statement" name = "tuiCommonNextMessage"/>
				<Prompt type = "statement" name = "tuiCommonExit"/>
				<Transition event="#" action="null" refId="ErrorRetryNext"/>
				<Transition event="*" action="null" refId="out-106"/>
			</Menu>

			<!-- After Message Menu -->
			<Menu id="1015" minDtmfSize="1" maxDtmfSize="2" dtmfInputValue="option" interDigitTimeout="2">
				<Condition value="NOT more">
					<!-- To replay this message, press 1 -->
					<Prompt type="statement" name="tuiCommonReplay" />

					<!-- Meeting Request -->
					<Condition value="meetingRequest">
						<!-- To accept, press 4 -->
						<Prompt type="statement" name="tuiCommonAcceptMeeting"/>
						<!-- To decline and delete, press 7 -->
						<Prompt type="statement" name="tuiCommonDeclineMeeting"  />
					</Condition>

					<!-- Meeting Cancellation -->
					<Condition value="meetingCancellation">
						<!-- To remove the meeting from calendar and delete this request, press 7 -->
						<Prompt type="statement" name="tuiCommonRemoveCancellation" />
					</Condition>

					<!-- Any other kind of Email -->
					<Condition value="NOT meetingRequest AND NOT meetingCancellation">
						<!-- To delete, press 7 -->
						<Prompt type="statement" name="tuiCommonDelete" />
						<!-- To reply, press 8 -->
						<Prompt type="statement" name="tuiCommonReplyToSender" />
					</Condition>

					<!-- For the next message, press the pound key -->
					<Prompt type="statement" name="tuiCommonNextMessage" />
					<!-- To exit, press the star key -->
					<Prompt type="statement" name="tuiCommonExit" />
					<!-- To repeat this menu, press 0 -->
					<Prompt type="statement" name="tuiCommonRepeatMenu" />
					<!-- To hear more options, press 0 0 -->
					<Prompt type="statement" name="tuiCommonMoreOptions" />
				</Condition>

				<!-- More options selected -->
				<Condition value="more">
					<!-- For the next unread message, press # # -->
					<Prompt type="statement" name="tuiCommonNextUnreadMessage" />

					<!-- For the previous message, press 1 1 -->
					<Prompt type="statement" name="tuiCommonPreviousMessage" />

					<!-- Meeting Request OR Cancellation -->
					<Condition value="meetingRequest OR meetingCancellation">
						<!-- To call the meeting organizer, press 2 -->
						<Prompt type="statement" name="tuiCommonCallOrganizer" condition="NOT IsNull(targetPhoneNumber)"/>
					</Condition>

					<!-- Any other kind of Email -->
					<Condition value="NOT meetingRequest AND NOT meetingCancellation">
						<!-- To call this contact, press 2 -->
						<Prompt type="statement" name="tuiCommonCallContact" condition="NOT IsNull(targetPhoneNumber)"/>
					</Condition>

					<!-- To flag the message for follow-up, press 4 4 -->
					<Prompt type="statement" name="tuiCommonFlagForFollowUp" />
					<!-- For envelope information, press 5 -->
					<Prompt type="statement" name="tuiCommonEnvelopInfo" />
					<!-- For the next language, press 5 5 -->
					<Prompt condition="NOT IsNull(selectableLanguages)" type="statement" name="tuiCommonNextLanguage" />
					<!-- To forward this message, press 6 -->
					<Prompt type="statement" name="tuiCommonForwardMessage" />
					<!-- To delete the e-mail thread, press 7 7 -->
					<Prompt type="statement" name="tuiCommonDeleteThread" />
					<!-- Meeting Request OR Cancellation -->
					<Condition value="meetingRequest OR meetingCancellation">
						<!-- To reply, press 8 -->
						<Prompt type="statement" name="tuiCommonReplyToSender" />
					</Condition>
					<!-- To reply to all recipients, press 8 8 -->
					<Prompt type="statement" name="tuiCommonReplyToAll" />
					<!-- To mark as unread, press 9 -->
					<Prompt type="statement" name="tuiCommonMarkAsUnread" />
					<!-- To hide the e-mail thread, press 9 9 -->
					<Prompt type="statement" name="tuiCommonHideThread" />
					<!-- To exit, press the star key -->
					<Prompt type="statement" name="tuiCommonExit" />
					<!-- 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>

				<Transition event="1" action="null" refId="1005"/>
				<Transition event="2" condition="NOT IsNull(targetPhoneNumber)" action="null" refId="1062"/>
				<Transition event="2" condition="IsNull(targetPhoneNumber)" action="null" refId="1069"/>
				<Transition event="4" condition="NOT owner AND meetingRequest" action="acceptMeeting" heavyaction="true" refId="1020"/>
				<Transition event="4" condition="owner AND meetingRequest" action="null" heavyaction="true" refId="RespondAsOrganizerStatement"/>
				<Transition event="5" action="null" refId="1016"/>
				<Transition event="6" action="forward" refId="1027"/>
				<Transition event="7" condition="NOT owner AND meetingRequest" action="declineMeeting" refId="1021"/>
				<Transition event="7" condition="owner AND meetingRequest" action="null" heavyaction="true" refId="RespondAsOrganizerStatement"/>
				<Transition event="7" condition="NOT meetingRequest" action="deleteMessage" heavyaction="true" refId="1022"/>
				<Transition event="8" action="reply" refId="1024"/>
				<Transition event="9" action="markUnread" refId="1026"/>
				<Transition event="#" action="saveMessage" heavyaction="true" refId="1008"/>
				<Transition event="*" action="commitPendingDeletions" heavyaction="true" refId="out-106"/>
				<Transition event="0" action="null" refId="1015"/>
				<Transition event="00" action="more" refId="1015"/>
				<Transition event="11" action="saveMessage" heavyaction="true" refId="1010"/>
				<Transition event="44" action="flagMessage" refId="FlaggedForFollowUpStatement"/>
				<Transition event="55" action="nextLanguage" refId="NextLanguage"/>
				<Transition event="77" action="deleteThread" heavyaction="true" refId="ThreadDeletedStatement"/>
				<Transition event="*7" condition="canUndelete" action="undeleteMessage" heavyaction="true" refId="1023"/>
				<Transition event="*7" condition="NOT canUndelete" action="pause" refId="NothingToUndeleteStatement"/>
				<Transition event="88" action="replyAll" refId="1025"/>
				<Transition event="99" action="hideThread" refId="ThreadHiddenStatement"/>
				<Transition event="##" action="saveMessage" heavyaction="true" refId="NavigateNextUnreadMessage"/>
				<Transition event="endOfMessages" action="null" refId="1002"/>
			</Menu>

			<!-- Error message played if the user tries to accept or decline their own meeting -->
			<Menu id="RespondAsOrganizerStatement">
				<Prompt type="statement" name="tuiRespondAsOrganizer"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>

			<!-- Envelope Information =====================================================-->
			<Menu id="1016" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="NOT IsNull(emailToField) AND NOT IsNull(emailCCField)" type="statement" name="tuiEmailEnvelopeToAndCC">
					<Prompt type="text" name="emailToField"/>
					<Prompt type="text" name="emailCCField"/>
				</Prompt>
				<Prompt condition="NOT IsNull(emailToField) AND IsNull(emailCCField)" type="statement" name="tuiEmailEnvelopeTOOnly">
					<Prompt type="text" name="emailToField"/>
				</Prompt>
				<Prompt condition="IsNull(emailToField) AND NOT IsNull(emailCCField)" type="statement" name="tuiEmailEnvelopeCCOnly">
					<Prompt type="text" name="emailCCField"/>
				</Prompt>
				<Transition event="noKey" action="null" refId="1015"/>
			</Menu>

			<!-- Meeting Accepted (no prompt for recording) -->
			<Menu id="1020" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiAcceptedRequest"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>

			<!-- Decline Meeting -->
			<Menu id="1021" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiDeclineMeeting"/>
				<Transition event="noKey" action="null" refId="1050"/>
			</Menu>

			<!-- Delete Message -->
			<Menu id="1022" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiMessageDeleted"/>
				<Prompt condition="NOT playedUndelete" type="statement" name="tuiUndelete"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>
			<Menu id="1023" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="undeletedAConversation" type="statement" name="tuiConversationRestored"/>
				<Prompt condition="NOT undeletedAConversation" type="statement" name="tuiRestored"/>
				<Transition event="noKey" action="null" refId="1015"/>
			</Menu>

			<!-- Reply & Reply-All -->
			<Menu id="1024" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiReplyingToSender"/>
				<Transition event="noKey" action="null" refId="1050"/>
			</Menu>
			<Menu id="1025" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiReplyingToAll"/>
				<Transition event="noKey" action="null" refId="1050"/>
			</Menu>

			<!-- Skip & Save -->
			<Menu id="1026" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiMessageMarkedUnread"/>
				<Transition event="noKey" action="null" refId="1008"/>
			</Menu>

			<!-- Forward -->
			<Menu id="1027" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiForwardingMessage"/>
				<Transition event="noKey" action="null" refId="1400"/>
			</Menu>

			<!-- Call targetPhoneNumber -->
			<Menu id="1062" minDtmfSize="0" maxDtmfSize="1" dtmfInputValue="option" interDigitTimeout="2">
				<Prompt type="statement" name="tuiToCancelCallTransfer"/>
				<Condition value="NOT IsNull(emailSender)">
					<Prompt type="statement" name="tuiCallTransferIntro">
						<Prompt type="name" name="emailSender"/>
					</Prompt>
				</Condition>
				<Transition event="*" action="null" refId="1068" />
				<Transition event="noKey"  action="null" refId="1065"/>
			</Menu>
			<!-- Call transfer -->
			<CallTransfer id="1065" type="blind" numberType="variable" number="targetPhoneNumber">
				<Transition event="transferFailed" action="null" refId="1066"/>
			</CallTransfer>
			<!-- Call transfer results -->
			<Menu id="1066" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiCallTransferFailed"/>
				<Prompt type="statement" name="tuiReturningToPreviousMenu"/>
				<Transition event="noKey" refId="1015" action="null"/>
			</Menu>
			<Menu id="1068" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiCallTransferCancelled"/>
				<Transition event="noKey" refId="1015" action="null"/>
			</Menu>

			<!-- Could not find a valid phone number -->
			<Menu id="1069" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" >
				<Prompt type="statement" name="tuiTransferUserNoPhone"/>
				<Transition event="noKey" refId="1015" action="null"/>
			</Menu>

			<!-- Import the forward message module from DtmfEmail.fsm -->
			<FsmImport href="DtmfEmail.fsm" module="ForwardMessageModule"/>
			<Menu id="ForwardMessageComplete">
				<Transition event="noKey" refId="1056" action="null"/>
			</Menu>
			<Menu id="ForwardMessageCancelled">
				<Transition event="noKey" refId="1015" action="null"/>
			</Menu>
			<!-- "Message Sent".  For declines, send them to the next message -->
			<Menu id = "1056" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
				<Prompt type = "statement" name = "tuiMessageSent" />
				<Transition condition="declineIntro" event = "noKey" action = "null" refId = "1008" />
				<Transition condition="replyIntro" event = "noKey" action = "null" refId = "1015" />
				<Transition condition="replyAllIntro" event = "noKey" action = "null" refId = "1015" />
				<Transition condition="forwardIntro" event = "noKey" action = "null" refId = "1015" />
			</Menu>

			<!-- Dummy State for disconnect -->
			<Menu id = "DisconnectState">
				<Transition event = "noKey" action="disconnect" refId="DisconnectState"/>
			</Menu>
		</Email>
	</FsmModule>


	<!-- 
		ForwardMessageModule: This module is imported in
		-DtmfEmail.fsm
		-DtmfCalendar.fsm
	-->
	<FsmModule id="ForwardMessageModule">
		<!-- Directory search for forward message menu -->
		<DirectorySearch id="1400" firstActivityId="1302" searchPurpose="sendMessage">
			<!-- Contact Search Menu -->
			<!-- NOTE: dtmfStopTones=noKey forces the recognizer to honor interDigitTimeout before returning a partial match -->
			<Menu id="1301" minDtmfSize="1" maxDtmfSize="name" dtmfInputValue="name" interDigitTimeout="3" dtmfStopTones="noKey">
				<Condition value="newSearch">
					<Prompt type="statement" name="tuiPersonalContacts"/>
					<Prompt type="statement" name="tuiForwardLastFirstNoEmail"/>
					<Prompt type="statement" name="tuiToFindSomeoneInDirectory"/>
					<Prompt type="statement" name="tuiToCancelPressStar"/>
				</Condition>
				<Prompt condition="NOT newSearch" type="statement" name="tuiContinueName" />

				<Transition condition="newSearch" event="*" refId="out-502" action="null" />
				<Transition condition="NOT newSearch" event="*" refId="1301" action="startNewSearch" />
				<Transition event="0" refId="1301" action="null" />
				<Transition event="00" refId="1302" action="changeSearchTarget" />
				<Transition event="anyKey" refId="1301" action="searchDirectory" heavyaction="true" />
				<Transition event="resultsLessThanAllowed" refId="1303" action="null"/>
				<Transition event="resultsMoreThanAllowed" refId="1301" action="continueSearch"/>
				<Transition event="noResultsMatched" refId="1326" action="null"/>
				<Transition event="invalidSearchKey" action="handleInvalidSearchKey" refId="1411" />

				<Transition event="adTransientError" action="null" refId="adTransientErrorPrompt" />
			</Menu>

			<!-- GAL Search Menu -->
			<!-- NOTE: dtmfStopTones=noKey forces the recognizer to honor interDigitTimeout before returning a partial match -->
			<Menu id="1302" minDtmfSize="1" maxDtmfSize="name" dtmfInputValue="name" interDigitTimeout="3" dtmfStopTones="noKey">
				<!-- Directory Search -->
				<Prompt type="statement" name="tuiDirectorySearch"/>

				<Condition value="newSearch">
					<!-- two different search modes -->
					<Condition value="(secondarySearchMode NE none) AND (primarySearchMode NE secondarySearchMode)">
						<!-- one of the search modes is email, use simplified name wording -->
						<Condition value="(primarySearchMode EQ emailAlias) OR (secondarySearchMode EQ emailAlias)">
							<Prompt condition="(currentSearchMode EQ lastNameFirstName)" type="statement" name="tuiForwardLastFirst" />
							<Prompt condition="(currentSearchMode EQ firstNameLastName)" type="statement" name="tuiForwardFirstLast" />
							<Prompt condition="(currentSearchMode EQ emailAlias)" type="statement" name="tuiForwardEmail" />
						</Condition>
						<!-- only two possible search modes, the different name orderings -->
						<Condition value="NOT((primarySearchMode EQ emailAlias) OR (secondarySearchMode EQ emailAlias))">
							<Prompt condition="(currentSearchMode EQ lastNameFirstName)" type="statement" name="tuiForwardLastFirstFirstLast" />
							<Prompt condition="(currentSearchMode EQ firstNameLastName)" type="statement" name="tuiForwardFirstLastLastFirst" />
						</Condition>
					</Condition>
					<!-- only one search mode set, or both modes are the same -->
					<Condition value="(secondarySearchMode EQ none) OR (primarySearchMode EQ secondarySearchMode)">
						<Prompt condition="(currentSearchMode EQ lastNameFirstName)" type="statement" name="tuiForwardLastFirstNoEmail" />
						<Prompt condition="(currentSearchMode EQ firstNameLastName)" type="statement" name="tuiForwardFirstLastNoEmail" />
						<Prompt condition="(currentSearchMode EQ emailAlias)" type="statement" name="tuiForwardEmailNoName" />
					</Condition>
				</Condition>
				<Prompt condition = "NOT newSearch" type="statement" name="tuiContinueName" />
				<Prompt type="statement" name="tuiIfYouKnowExtension"/>
				<Prompt type="statement" name="tuiToSendToContact"/>
				<Prompt condition="newSearch" type="statement" name="tuiToCancelPressStar"/>

				<Transition event="#" refId="1320" action="null" />
				<Transition condition="(secondarySearchMode NE none) AND (primarySearchMode NE secondarySearchMode)" event="##" refId="1302" action="changeSearchMode" />
				<Transition event="00" refId="1301" action="changeSearchTarget" />

				<Transition condition="newSearch" event="*" refId="out-502" action="null" />
				<Transition condition="NOT newSearch" event="*" refId="1302" action="startNewSearch" />
				<Transition event="anyKey" refId="1302" action="searchDirectory" heavyaction="true" />
				<Transition event="resultsLessThanAllowed" refId="1303" action="null"/>
				<Transition event="resultsMoreThanAllowed" refId="1302" action="continueSearch"/>
				<Transition event="noResultsMatched" refId="1327" action="null"/>
				<Transition event="invalidSearchKey" action="handleInvalidSearchKey" refId="1412" />

				<Transition event="adTransientError" action="null" refId="adTransientErrorPrompt" />
			</Menu>

			<!-- play out the results -->
			<Menu id="1303" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Condition value="(promptindex EQ 1)">
					<Prompt type="statement" name="tuiForUserPress1">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 2)">
					<Prompt type="statement" name="tuiForUserPress2">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 3)">
					<Prompt type="statement" name="tuiForUserPress3">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 4)">
					<Prompt type="statement" name="tuiForUserPress4">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 5)">
					<Prompt type="statement" name="tuiForUserPress5">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 6)">
					<Prompt type="statement" name="tuiForUserPress6">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 7)">
					<Prompt type="statement" name="tuiForUserPress7">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 8)">
					<Prompt type="statement" name="tuiForUserPress8">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>
				<Condition value="(promptindex EQ 9)">
					<Prompt type="statement" name="tuiForUserPress9">
						<Prompt type="name" name="userName"/>
					</Prompt>
				</Condition>


				<Transition event="noKey" action="anyMoreResultsToPlay" heavyaction="true" refId="1303" />
				<Transition event="noMoreResultsToPlay" action="null" refId="1304" />
				<Transition event="moreResultsToPlay" action="null" refId="1303" />
			</Menu>

			<!-- this menu is for taking input from user for the option he wants to select -->
			<Menu id="1304" minDtmfSize="1" maxDtmfSize="1" dtmfInputValue="option" interDigitTimeout="2">
				<Prompt type="statement" name="tuiNoneCorrect"/>
				<Prompt type="statement" name="tuiToRepeatNames"/>

				<Transition event="anyKey" action="validateSearchSelection" heavyaction="true" refId="1303" />
				<Transition event="validSelection" action="null" refId="out-506" />
				<Transition event="invalidSelection" action="null" refId="1410" />
				<Transition condition="searchTarget EQ personalContacts" event="*" action="continueSearch" refId="1301" />
				<Transition condition="searchTarget EQ globalAddressList" event="*" action="continueSearch" refId="1302" />
				<Transition event="0" action="replayResults" heavyaction="true" refId="1303" />
				<!-- If we have a # in the buffer repeat the results (to avoid the 'number is not valid' message) -->
				<Transition event="#" action="replayResults" heavyaction="true" refId="1303" />
			</Menu>

				<!-- wrong dtmf map entered, or no user matched -->
				<Menu id="1326" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" interDigitTimeout="2">
					<!--The keys entered do not match a recognized name.  -->
					<Prompt type="statement" name="tuiDtmfMapNotName"/>
					<Transition event="noKey" action="startNewSearch" refId="1301"/>
				</Menu>

				<!-- wrong dtmf map entered, or no user matched -->
				<Menu id="1327" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" interDigitTimeout="2">
					<!--The keys entered do not match a recognized name.  -->
					<Prompt condition="currentSearchMode NE emailAlias" type="statement" name="tuiDtmfMapNotName"/>
					<!--The keys entered do not match a recognized e-mail alias.  -->
					<Prompt condition="currentSearchMode EQ emailAlias" type="statement" name="tuiKeysNotAlias"/>
					<Transition event="noKey" action="startNewSearch" refId="1302"/>
				</Menu>

			<!-- enter user by extension -->
			<Menu id="1320" minDtmfSize="extension" maxDtmfSize="extension" dtmfInputValue="extension" interDigitTimeout="5" inputTimeout="20">
				<Prompt type="statement" name="tuiForwardExtension"/>

				<!-- lookup user -->
				<Transition event="anyKey" action="searchDirectoryByExtension" heavyaction="true" refId="1320"/>
				<Transition event="resultsLessThanAllowed" action="null" refId="out-506"/>
				<Transition event="noResultsMatched" action="null" refId="1325"/>
				<Transition event="*" action="null" refId="1302"/>
				<Transition event="timeout" condition="NOT IsNull(lastInput)" action="null" refId="1325"/>
			</Menu>

			<!-- wrong extension entered, or no user matched -->
			<Menu id="1325" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option" interDigitTimeout="2">
				<!--The keys entered do not match a recognized name.  -->
				<Prompt type="statement" name="tuiKeysNotName"/>
				<Transition event="noKey" action="null" refId="1320"/>
			</Menu>


			<!-- invalid selection in contact search -->
			<Menu id="1410" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt type="statement" name="tuiInvalidKeys">
					<Prompt type="text" name="invalidSearchSelection"/>
				</Prompt>
				<Transition event="noKey" action="replayResults" heavyaction="true" refId="1303" />
			</Menu>

			<!-- invalid search input. User entered key =1,0,* in Contact Search  -->
			<Menu id="1411" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="null" refId="1301"/>
				<Prompt type="statement" name="tuiInvalidKeys">
					<Prompt type="digit" name="searchInput"/>
				</Prompt>
			</Menu>

			<!-- invalid search input. User entered key =1,0,* in directory Search  -->
			<Menu id="1412" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Transition event="noKey" action="null" refId="1302"/>
				<Prompt type="statement" name="tuiInvalidKeys">
					<Prompt type="digit" name="searchInput"/>
				</Prompt>
			</Menu>
			
			<Menu id="adTransientErrorPrompt" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
				<Prompt condition="searchTarget EQ personalContacts" type="statement" name="tuiSorryContactsSearchError"/>
				<Prompt condition="searchTarget EQ globalAddressList" type="statement" name="tuiSorryADSearchError"/>
				<Transition condition="searchTarget EQ personalContacts" event="noKey" action="startNewSearch" refId="1301" />
				<Transition condition="searchTarget EQ globalAddressList" event="noKey" action="startNewSearch" refId="1302" />
			</Menu>
		</DirectorySearch>
		<!-- cancel out of directory search goes here -->
		<Menu id="502" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
			<Transition condition="numRecipients LT 1" event="noKey" action="cancelMessage" refId="503"/>
			<Transition condition="numRecipients GT 0" event="noKey" action="null" refId="505"/>
		</Menu>

		<!-- "message cancelled" -->
		<Menu id="503" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
			<Prompt type="statement" name="tuiMessageCancelled"/>
			<Transition event="noKey" action="null" refId="ForwardMessageCancelled"/>
		</Menu>

		<!-- "[name] added" -->
		<Menu id="504" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
			<Prompt type="statement" name="tuiUserAddedToMessage">
				<Prompt type="name" name="userName"/>
			</Prompt>
			<Transition event="noKey" action="null" refId="505"/>
		</Menu>

		<!-- Submit Message Menu -->
		<Menu id = "505" minDtmfSize = "1" maxDtmfSize = "1" dtmfInputValue = "option">
			<Prompt type = "statement" name = "tuiSubmitMessageMenu" />
			<Transition event = "1" action = "null" refId = "1050"/>
			<Transition event = "2" action = "null" refId = "1400"/>
			<Transition event = "3" action = "removeRecipient" refId = "505"/>
			<Transition event = "*" action = "cancelMessage" refId = "503"/>
			<Transition event = "0" action = "null" refId = "505"/>
			<Transition event="noRecipients" action="null" refId="1400"/>
		</Menu>

		<!-- Directory search menu goes here after successfully finding a recipient -->
		<Menu id="506" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
			<Transition event="noKey" action="addRecipientBySearch" refId="504"/>
			<Transition event="unknownRecipient" action="null" refId="507"/>
		</Menu>

		<!-- Played if the user selected through directory search doesn't have a valid address -->
		<Menu id="507" minDtmfSize="0" maxDtmfSize="0" dtmfInputValue="option">
			<Prompt type="statement" name="tuiUserNotAddedToMessageEmail"/>
			<Transition event="noKey" action="null" refId="1400"/>
		</Menu>

		<!-- At the tone, please record... -->
		<Menu id="1050" minDtmfSize="0" maxDtmfSize="1" dtmfInputValue="option">
			<Prompt condition="forwardIntro" type="statement" name="tuiForwardMessageCue"/>
			<Prompt condition="declineIntro" type="statement" name="tuiDeclineMeetingMessageCue"/>
			<Prompt condition="replyIntro" type="statement" name="tuiReplyMessageCue"/>
			<Prompt condition="replyAllIntro" type="statement" name="tuiReplyAllMessageCue"/>
			<Transition event="noKey" action="null" refId="1051"/>
			<Transition event = "#" condition="NOT replyIntro AND NOT replyAllIntro" action = "sendMessage" heavyaction="true" refId = "ForwardMessageComplete"/>
			<Transition event = "#" condition="replyIntro OR replyAllIntro" action = "null" heavyaction="false" refId = "1051"/>
			<Transition event = "*" action = "cancelMessage" refId = "1053"/>
		</Menu>

		<!-- *Beep* -->
		<Record id = "1051" dtmfStopTones="#*" type="message">
			<Transition event = "*" action = "cancelMessage" refId = "1053" />
			<Transition event = "anyKey" action = "null" refId = "1055" />
			<Transition event = "silence" condition = "IsNull(recording)" action = "null" refId = "1052" />
			<Transition event = "silence" condition = "NOT IsNull(recording)" action = "null" refId = "1055" />
			<Transition event = "timeout" action = "null" refId = "1057" />
			<Transition event = "userHangup" action = "sendMessage" heavyaction="false" refId = "DisconnectState" />
		</Record>

		<!-- Are you still there? -->
		<Menu id = "1052" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
			<Prompt type = "statement" name = "tuiAreYouThere" />
			<Transition event = "noKey" action = "appendRecording" refId = "1050"/>
		</Menu>

		<!-- Recording cancelled -->
		<Menu id = "1053" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
			<Prompt type="statement" name="tuiMessageCancelled"/>
			<Transition event = "noKey" action = "null" refId = "ForwardMessageCancelled"/>
		</Menu>

		<!-- Replay recording -->
		<Menu id = "1054" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
			<Prompt type = "tempwave" name = "recording" />
			<Transition event = "noKey" action = "null" refId = "1055"/>
		</Menu>

		<!-- Recoding too long -->
		<Menu id = "1057" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
			<Prompt type="statement" name="tuiRecordingTooLong"/>
			<Transition event = "noKey" action = "null" refId = "1055"/>
		</Menu>

		<!-- After recording menu -->
		<Menu id = "1055" minDtmfSize = "1" maxDtmfSize = "2" dtmfInputValue = "option">
			<Prompt type = "statement" name = "tuiAfterRecordingMenu" />
			<Transition event = "1" action = "sendMessage" heavyaction="true" refId = "ForwardMessageComplete" />
			<Transition event = "11" action = "sendMessageUrgent" heavyaction="true" refId = "ForwardMessageComplete" />
			<Transition event = "2" action = "null" refId = "1054" />
			<Transition event = "3" action = "clearRecording" refId = "1050" />
			<Transition event = "4" condition="NOT recordingTimedOut" action = "appendRecording" refId = "1058" />
			<Transition event = "4" condition="recordingTimedOut" action = "null" refId = "1057" />
			<Transition event = "*" action = "cancelMessage" refId = "1053" />
			<Transition event = "0" action = "null" refId = "1055" />
			<Transition event = "userHangup" action = "sendMessage" heavyaction="false" refId = "DisconnectState" />
		</Menu>

		<!-- Continue recording -->
		<Menu id = "1058" minDtmfSize = "0" maxDtmfSize = "0" dtmfInputValue = "option">
			<Prompt type = "statement" name = "tuiContinueRecording"/>
			<Transition event = "noKey" action = "null" refId = "1051" />
		</Menu>
	</FsmModule>
</FiniteStateMachine>




