<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>

    <!-- 
        Service Settings 
    -->
    
    <!-- Whether the UM Service should use text-to-speech for system prompt recordings if a wave file is not found -->
    <add key="EnableTemporaryTTS" value="true"/>

    <!-- Whether the service should add additional whitespacing logic to transcription attempts, such as paragraph breaks -->
    <add key="EnableTranscriptionWhitespace" value="true"/>
    
    <!-- The maximum length (in time)  a message can have and still qualify for a transcription attempt -->
    <add key="TranscriptionMaximumMessageLength" value="00:01:15.00"/>

    <!-- The maximum amount of time a message can be being transcribed before transcription is cancelled -->
    <add key="MessageTranscriptionTimeout" value="00:03:00.00"/>

    <!-- The maximum number of audio time that can be queued up for transcription on this server per CPU core-->
    <add key="TranscriptionMaximumBacklogPerCore" value="00:05:00.00"/>
    
    <!-- How often the submission thread should scan the pickup directory for changes 
         as a backup to the NTFS eventing system -->
    <add key="PickupDirectoryPollingPeriod" value="00:00:30.00"/>

    <!-- How many messages to queue up before refusing to take another -->
    <add key="PickupDirectoryMaximumBacklog" value="100"/>
    
    <!-- Threshold for a mailbox operation in the call answering background thread
         If the previous operation takes more than this, we do not do the remaining operations -->
    <add key="CallAnswerMailboxDataTimeoutThreshold" value="00:00:04.00"/>

    <!-- Timeout in milliseconds for fetching call answering data -->
    <add key="CallAnswerMailboxDataTimeout" value="00:00:06.00"/>
    
    <!-- Relative path (from Exchange) to the UM menu state machine definition file -->
    <add key="FiniteStateMachinePath" value="UnifiedMessaging\root.fsm"/>
    
    <!-- Realtive path (from Exchange) to the wave file directory root -->
    <add key="PromptDirectory" value="UnifiedMessaging\prompts"/>

    <!-- Realtive path (from Exchange) to the grammar file directory root -->
    <add key="GrammarDirectory" value="UnifiedMessaging\grammars"/>
    
    <!-- Whether delayed source party information is enabled on the gateway -->
    <add key="EnableDelayedSourcePartyInfo" value="false"/>
    
    <!-- Whether speech recognition should be turned off, regardless of user preference -->
    <add key="EnableSpeechRecognitionOverride" value="false"/>
    
    <!-- The DB level the UM Service will use for normalizing recorded audio -->
    <add key="NormalizationLevelDB" value="-18"/>

    <!-- Signals with energy below this value will be considered noise and will not be amplified -->
    <add key="NoiseFloorLevelDB" value="-78"/>
    
    <!-- The maximum number of queued voice messages the UM server will accept before refusing call answering calls -->
    <add key="CallAnsweringMaximumBacklog" value="100"/>

    <!-- Whether grammar generation should proceed on the provisioned shedule -->
    <add key="EnableGrammarGenerationSchedule" value="true"/>
    
    <!-- Whether grammar generation should proceed when the server object changes in the active directory -->
    <add key="EnableGrammarGenerationOnChanges" value="true"/>

    <!-- Whether grammar generation should include distribution list grammars  -->
    <add key="EnableGrammarDistributionListGeneration" value="true"/>

    <!-- This setting determines if the SpeechGrammarFilterList should be used for grammar generation -->
    <add key="EnableGrammarExclusionList" value="true"/>

    <!-- Whether generated grammars should be pre-loaded by the speech recognition service after being generated -->
    <add key="EnableGrammarPreloading" value="true"/>
    
    <!-- Whether the DTMFMap property on AD user objects should be updated as part of the grammar generation process -->
    <add key="EnableDtmfMapGeneration" value="true"/>

    <!-- The filter list used for generating grammar -->
    <add key="GrammarExclusionListFile" value="SpeechGrammarFilterList.xml"/>

    <!-- The maximum number of forms an item can have and still be included in a generated grammar -->
    <add key="GrammarNormalizedFormLimit" value="1"/>

    <!--  Specifies whether inband fax detection is enabled. If false, UM relies on the IP Gateways to perform detection.  -->
    <add key="EnableInbandFaxDetection" value="false"/>

    <!-- Minimum length of text needed for language auto-detection	(-1: Disable auto-detection; 0 no min length required)-->
    <add key="LanguageAutoDetectionMinLength" value="64"/>

    <!-- Maximum length of text needed for language auto-detection -->
    <add key="LanguageAutoDetectionMaxLength" value="2048"/>

    <!-- The format used for G.711 encoding when compressing voice messages for storage in the mailbox (ALAW or MULAW)-->
    <add key="G711EncodingFormat" value="MULAW"/>

    <!-- The number of threads per-CPU to use for CPU intensive tasks in the submission pipeline -->
    <add key="PipelineScaleFactorCPU" value="1"/>

    <!-- The number of threads per-CPU to use for non-CPU intensive tasks in the submission pipeline -->
    <add key="PipelineScaleFactorNonCPU" value="4"/>
    
    <!-- Minimum port to use for fax service.  -1 means don't consider this value -->
    <add key="MinFaxPort" value="-1"/>

    <!-- Maximum port to use for fax service.  -1 means don't consider this value -->
    <add key="MaxFaxPort" value="-1"/>
    
    <!-- This key controls whether watsons are submitted when we handle corrupted WIs. 
    it is turned OFF so that customers not necessarily would see watsons for pipelineCleanup	-->
    <add key="GenerateWatsonsForPipelineCleanup" value="false"/>
    
    <!-- Enable remote gateway automation -->
    <add key="EnableRemoteGatewayAutomation" value="false" />

    <!-- The level of tracing to use when generating gal grammars.  Accepted values are None, Low, High.  A value of High will generate large log files. -->
    <add key="GGGTraceLevel" value="Low" />
    
    <!-- How often the submission pipeline should check for orphaned resources -->
    <add key="PipelineStallCheckInterval" value="00:15:00.00" />
    
    <!-- How long until a pipeline resource is considered orphaned -->
    <add key="PipelineStallThreshold" value="00:30:00.00" />
        
    <!-- 
        Recycler Settings
    
        For monitoring and heartbeat settings, a value of 0 means that is disabled
				This is only true for the things marked optional. For example HeartBeatInterval of 0
				means heartbeats are disabled-->
    
    <!-- The worker process SIP ports. This given port and the one after it would be used -->
    <add key="WorkerSIPPort" value="5065"/>

    <!-- Max Memory pressure percentage at which to recycle(optional) - for example when 80 % of physical memory reached -->
    <add key="MaxPrivateBytesPercent" value="80"/>

    <!-- Max Temp Dir size(in MB) at which to recycle(optional) -->
    <add key="MaxTempDirSize" value="0"/>

    <!-- Max Uptime (secs) after which to recycle(optional) -->
    <add key="RecycleInterval" value="604800"/>

    <!-- Interval (secs) after which to poll for heartbeats(optional) -->
    <add key="HeartBeatInterval" value="90"/>

    <!-- Maximum number of consecutive Heartbeat failures after which to recycle(required is sending heartbeats) -->
    <add key="MaxHeartBeatFailures" value="1"/>

    <!-- Interval (secs) after which to monitor resource consumption(optional) -->
    <add key="ResourceMonitorInterval" value="600"/>

    <!-- Number of consecutive thrashes(crashes) allowed before service stopped(required) -->
    <add key="ThrashCountMaximum" value="5"/>

    <!-- Max time (secs) allowed before the worker process should be up and signal the semaphore(required) -->
    <add key="StartupTime" value="120"/>

    <!-- Max number of calls allowed - before recycling the worker process !(optional) -->
    <add key="MaxCallsBeforeRecycle" value="50000"/>

    <!-- Max Interval (secs) by which to receive response for heartbeats(required is sending heartbeats) -->
    <add key="HeartBeatResponseTime" value="60"/>

    <!-- Interval in secs after which to poll SIP Peers for health check. '0' means no ping. (optional)  -->
    <add key="PingInterval" value="120"/>

    <!-- Interval in secs after which to log an event when the UMStartupMode is changed. '0' means no alerts.   -->
    <add key="AlertIntervalAfterStartupModeChanged" value="600"/>

    <!-- If UM Service is to run in secured mode - this denotes the number of days before certificate expiry
			admin wants to be warned of certificate expiry.   -->
    <add key="DaysBeforeCertExpiryForAlert" value="30"/>

    <!-- If UM Service is to run in secured mode - this denotes in number of days the subsequent interval after 
			the first warning when the admin wants to be informed of near certificate expiry  -->
    <add key="SubsequentAlertIntervalAfterFirstAlertForCert" value="1"/>

    <!-- Name of the file into which to export the certificate chosen by the umservice.  -->
    <add key="CertFileName" value="UnifiedMessaging\UMServiceCertificate.cer"/>

  </appSettings>
</configuration>
