h1. Termination control {{>toc}} *Termination control* is the process of tracking in real-time the quality of termination service by checking following parameters of an outgoing traffic: * [[ASR indicator|ASR]] * [[ACD indicator|ACD]] * FAS calls count If these parameters are getting worse - this is an indirect indication that the quality has deteriorated. For example, this could signalize that the quality of your Internet connection has dropped. Or the terminator is overloaded. Basic logic of work of controller is described in section [[Controllers]]. To configure this functionality, web-interface section [[Termination controllers]] is used. h2. Criteriа of quality deterioration. The primary task is to determine whether the quality has deteriorated or not. For this there are thresholds: * *count threshold* In case if the call count during 1 iteration (5 minutes by default) is less than configured _count threshold_ - the values are considered statistically negligible for calculation and blocking doesn't occur. * *answered count threshold* In case if the answered call count during 1 iteration (5 minutes by default) is less than configured _answered count threshold_ - the values are considered statistically negligible for ACD calculation and blocking by ACD doesn't occur. * *ASR threshold (%)* In case if [[ASR indicator|ASR]] value for 1 iteration is less than threshold value, it's considered that traffic quality has got worse. In case if _ASR threshold_ = 0, [[ASR indicator|ASR]] value is not taken into consideration. * *ACD threshold (min)* In case if [[ACD indicator|ACD]] value for 1 iteration is less than threshold, it's considered, that quality got worse. In case if _ACD threshold_ = 0, than [[ACD indicator|ACD]] value is not taken into consideration. * *FAS count threshold* In case if FAS call count during 1 iteration is greater or equal to threshold, it's considered that traffic quality got worse. In case if _FAS count threshold_ = 0, then FAS calls are not taken into consideration. You can configure these thresholds. h2. Sending notification e-mail. When sending a notification e-mail the system uses the configured [[Mail templates|Mail template]]. Th system passes to the template the following variables: *COMPANY* - the name of the company, on which system has detected quality violations. *PEER* - the name of the peer, on which system has detected quality violations. *DETAILS* - details regarding quality violations. Details are passed in the following format:
      ASR=${ASR}
      Last unsuccessful calls (10):
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      ...

      ACD=${ACD}
      Last unsuccessful calls (10):
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      ...

      FAS count=${FAS COUNT}
      Last unsuccessful calls (10):
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      start time;caller ID;callee ID;total duration(sec);answered_duration(sec);hangup cause
      ...
The e-mail is sent to address, configured in field *termination control e-mail* from [[Companies|Company]] settings. In case if this field is empty, field *e-mail* from [[Companies|Company's]] settings is used. In case if it's empty too, e-mail is not sent. In these fields you can use several addresses, delimited by comma. In case if there is FAS calls count threshold violation, first 10 MP3 call records are attached to e-mail. [[Контроль терминации|Русский перевод]]