// src/services/voiceDiag/checks/wan/wanMos.js // // Per-path Mean Opinion Score (MOS, 1.0-5.0). MOS is Prisma's // composite quality score derived from LQM latency+jitter+loss; // it's the number to correlate with user-reported "voice sounds // bad" tickets because it factors all the physical-layer signals // into one number. // // - >= 4.0 : good ("toll quality") // - 3.5-4.0: warn ("acceptable, users notice") // - < 3.5 : error ("degraded, users struggle") // // Unlike latency/jitter/loss, MOS is inverted: LOW is bad. The // shared evaluator honours the `lowIsBad: true` flag. import { maybeSkippedByKillSwitch, getLinks, getMosWarn, getMosError, evaluatePerLinkMetric, } from './_helpers.js'; export const WAN_MOS_STANDARDS = Object.freeze({ minWarn: 4.0, minError: 3.5, unit: '', reference: 'ITU-T P.800 MOS scale', }); export const wanMosCheck = { id: 'wanMos', label: 'SD-WAN MOS (per path)', requires: ['sdwanSite'], scope: null, standards: WAN_MOS_STANDARDS, async run(ctx) { const skip = maybeSkippedByKillSwitch(wanMosCheck); if (skip) return skip; const warnThresh = getMosWarn(); const errorThresh = getMosError(); return evaluatePerLinkMetric({ links: getLinks(ctx), metricKey: 'mos', label: 'MOS', unit: '', warnThresh, errorThresh, lowIsBad: true, standardLabel: `warn < ${warnThresh}, error < ${errorThresh}`, }); }, };