<?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 due to transcription per core (see TranscriptionMaximumBacklogPerCore). These are non cdr messages -->
    <!-- The queue starts building under peak load or when the topology is bad. -->
    <add key="MaxMessagesPerCore" value="100"/>

    <!-- 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="PipelineScaleFactorNetworkBound" value="8"/>

    <!-- Maximum number of threads we will do RPC per back end server in pipeline.-->
    <add key="MaxRPCThreadsPerServer" value="10"/>

    <!-- Maximum number of messages we will queue in the pipeline per mbx server-->
    <add key="MaxMessagesPerMailboxServer" 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"/>

    <!-- 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"/>
    
    <!-- Whether the display name from the From Header of a SIP header should be used for CallerID resolution -->
    <add key="EnableCallerIdDisplayNameResolution" value="true"/>

    <!-- 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"/>

    <!-- 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" />

    <!-- Indicates how quickly a healthy submission pipeline should process dummy messages.  0 disables checking.  Note, apart from 0, this should not be set lower than 5 minutes. -->
    <add key="PipelineStallCheckThreshold" value="00:30:00.00" />
    
    <!-- Whether to offer g.723 or not -->
    <add key="EnableG723" value="true" />
        
    <!-- Whether to offer RTAudio or not -->
    <add key="EnableRTAudio" value="true" />
    
    <!-- Minimum number of hits in the mailbox before a word is added to the TopN grammar -->
    <add key="TopNGrammarThreshold" value="20"/>
    
    <!-- The min/max ports to use for RTP media.  If the values are invalid, or max < min, the default will be used -->
    <add key="MinimumRtpPort" value="1025" />
    <add key="MaximumRtpPort" value="65535" />

    <!-- 
        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="240"/>

    <!-- 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"/>

    <!-- If false then server will not submit any call data records for any tenant.  -->
    <add key="CDRLoggingEnabled" value="true"/>

    <!-- Max CDR messages in pipeline. After we reach this count UM server will stop logging CDRs.  -->
    <add key="MaxCDRMessagesInPipeline" value="100"/>

    <!-- Whether to use UCMA or MSS  -->
    <add key="Platform" value="UCMA"/>

    <!-- Whether to enable statistics logging -->
    <add key="StatisticsLoggingEnabled" value="true"/>

    <!-- Max directory size for statistics log files in GB -->
    <add key="StatisticsLoggingMaxDirectorySize" value="4"/>

    <!-- Max file size for statistics log files in MB -->
    <add key="StatisticsLoggingMaxFileSize" value="10"/>

    <!-- Is load balancing calls in the site enabled? -->
    <add key="IntraSiteLoadBalancingEnabled" value="true"/>

    <!-- Maximum number of concurrent mobile speech recognition requests per core -->
    <add key="MaxMobileSpeechRecoRequestsPerCore" value="10"/>

    <!-- Threshold at which messages for a particular mail server start to be throttled per recipient 
      (not allowing more messages to be added for a recipient if the the number for that recipient has 
      reached the number specified by RecipientThrottlingPercent). -->
    <add key="RecipientStartThrottlingThresholdPercent" value="50"/>

    <!-- Specifies how many messages a recipient can have in pipeline, as a percentage of the allowed 
       messages per mailbox server, once throttling is being applied.  -->
    <add key="RecipientThrottlingPercent" value="10"/>

    <!-- Specifies whether ActiveManager should be used for determining mailbox server
         from mailbox database guid (instead of default of MailboxServerLocator) -->
    <add key="UseDataCenterActiveManagerRouting" value="false"/>

  </appSettings>
</configuration>
