Silence detection: Difference between revisions

From VoIPmonitor.org
(Convert pre tags to syntaxhighlight)
(Rewrite: consolidated structure, added parameter table, See Also section, improved formatting)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
[[Category:GUI manual]]
[[Category:GUI manual]]


'''This guide explains how to enable and use VoIPmonitor's advanced audio analysis features for G.711 codecs, including silence detection and audio clipping detection. These tools are invaluable for diagnosing audio quality issues that are not caused by network packet loss, such as one-way audio, muted microphones, or faulty endpoint hardware.'''
'''This guide explains VoIPmonitor's audio analysis features for G.711 codecs, including silence and clipping detection. These tools diagnose audio quality issues not caused by network problems, such as one-way audio, muted microphones, or faulty hardware.'''


== Overview & Use Cases ==
== Overview ==
Standard network metrics like packet loss and jitter can only identify problems that occur during network transport. However, many audio quality issues originate at the endpoint itself. The Silence & Clipping Detection engine analyzes the decoded G.711 (a-law/u-law) audio stream to identify these problems.


Enable this feature to diagnose issues like:
Standard network metrics (packet loss, jitter) only identify transport-layer problems. Many audio issues originate at endpoints. The Silence & Clipping Detection engine analyzes decoded G.711 audio to identify these problems.
* A user complaining about "dead air" when the network statistics look perfect.
* One-way audio scenarios where one party is not transmitting any sound.
* Identifying calls with audio clipping, which is often perceived as clicks or distortion.
* More accurately assessing call quality by penalizing MOS scores for periods of absolute silence.


== Prerequisites ==
<kroki lang="plantuml">
Before enabling this feature, please ensure the following requirements are met:
@startuml
skinparam shadowing false
skinparam defaultFontName Arial
 
rectangle "RTP Stream\n(G.711 audio)" as RTP
rectangle "Audio Decoder" as Decoder
rectangle "Silence Detection\n(threshold check)" as Silence
rectangle "Clipping Detection\n(max amplitude)" as Clipping
database "CDR Database\n(metrics stored)" as DB
rectangle "MOS Adjustment\n(silence = loss)" as MOS
 
RTP --> Decoder : decode a-law/u-law
Decoder --> Silence : audio samples
Decoder --> Clipping : audio samples
Silence --> DB : silence %, silence_end
Clipping --> DB : clipping count
Silence --> MOS : silence frames
MOS --> DB : adjusted MOS scores
@enduml
</kroki>


;1. Codec Limitation:
'''Use cases:'''
:This feature currently only supports calls using the '''G.711 a-law/u-law''' codec. Audio streams from other codecs will not be analyzed.
* "Dead air" complaints when network statistics look perfect
* One-way audio (one party not transmitting)
* Audio clipping (clicks or distortion)
* Accurate [[Glossary|MOS]] calculation by penalizing silence periods
* Detecting calls in noisy environments (see [[#Detecting Calls with Background Noise|below]])


;2. CPU Resources:
== Prerequisites ==
:Decoding and analyzing audio streams is a CPU-intensive process. Enabling these features will increase the overall CPU load on the sensor. Monitor your system's performance after enabling them.


;3. Database Schema:
{| class="wikitable"
:All modern VoIPmonitor installations (approximately since 2020) include the necessary database columns by default. If you are running a current version, '''you do not need to perform any database modifications'''. The sensor will log an error on startup if any required columns are missing, which should only happen on very old legacy systems.
|-
! Requirement !! Details
|-
| '''Codec''' || G.711 a-law/u-law only. Other codecs are not analyzed.
|-
| '''CPU''' || Audio decoding is CPU-intensive. Monitor system load after enabling.
|-
| '''Database''' || Modern installations (2020+) have required columns. Legacy systems may need schema updates (see below).
|}


== Configuration ==
== Configuration ==


=== Step 1: Enable in voipmonitor.conf ===
=== Parameters ===
To activate the features, add or uncomment the following lines in `/etc/voipmonitor.conf`:


<syntaxhighlight lang="bash">
{| class="wikitable"
# Enables both silence and clipping detection logic
|-
silencedetect    = yes
! Parameter !! Default !! Description
|-
| <code>silencedetect</code> || no || Enable silence detection and MOS adjustment
|-
| <code>clippingdetect</code> || no || Enable audio clipping detection
|-
| <code>silencethreshold</code> || 512 || Audio level threshold for silence. Lower = stricter detection.
|}
 
=== Enable in voipmonitor.conf ===


# Enables the specific feature that detects clipped audio frames
<syntaxhighlight lang="ini">
# /etc/voipmonitor.conf
silencedetect = yes
clippingdetect = yes
clippingdetect = yes
# Defines the audio level threshold for silence. The default of 512 is
# tolerant to low-level background noise. Lower values are stricter.
silencethreshold = 512
silencethreshold = 512
</syntaxhighlight>
</syntaxhighlight>


=== Step 2: For Legacy Upgrades - Adding Database Columns ===
<syntaxhighlight lang="bash">
'''Note:''' This step is only required if you are upgrading from a very old VoIPmonitor installation and the sensor logs errors about missing columns on startup. For all recent installations, these columns already exist.
systemctl restart voipmonitor
 
</syntaxhighlight>
If required, you can add the columns to your `cdr` table with the following SQL command. Only add the columns that are reported as missing.


<syntaxhighlight lang="bash">
{{Note|1=For legacy installations (pre-2020) that report missing columns on startup, add them via SQL:
<syntaxhighlight lang="sql">
ALTER TABLE cdr
ALTER TABLE cdr
ADD COLUMN caller_silence tinyint unsigned default NULL,
  ADD COLUMN caller_silence tinyint unsigned default NULL,
ADD COLUMN called_silence tinyint unsigned default NULL,
  ADD COLUMN called_silence tinyint unsigned default NULL,
ADD COLUMN caller_silence_end smallint default NULL,
  ADD COLUMN caller_silence_end smallint default NULL,
ADD COLUMN called_silence_end smallint default NULL,
  ADD COLUMN called_silence_end smallint default NULL,
ADD COLUMN caller_clipping_div3 smallint unsigned default NULL,
  ADD COLUMN caller_clipping_div3 smallint unsigned default NULL,
ADD COLUMN called_clipping_div3 smallint unsigned default NULL,
  ADD COLUMN called_clipping_div3 smallint unsigned default NULL,
ADD COLUMN a_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN a_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
ADD COLUMN b_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN b_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
ADD COLUMN a_mos_silence_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN a_mos_silence_mult10 tinyint unsigned DEFAULT NULL,
ADD COLUMN b_mos_silence_mult10 tinyint unsigned DEFAULT NULL;
  ADD COLUMN b_mos_silence_mult10 tinyint unsigned DEFAULT NULL;
</syntaxhighlight>
</syntaxhighlight>
}}


== Features & Metrics ==
== Features & Metrics ==
Once enabled, you will have access to several new metrics and visualizations throughout the GUI.


=== 1. Silence as Packet Loss & MOS Adjustment ===
=== Silence as Packet Loss (MOS Adjustment) ===
The system identifies frames of absolute silence (e.g., from a muted mic) and treats them as a form of packet loss. This allows VoIPmonitor to correctly calculate a low MOS score for calls that were silent, even if no actual packets were lost on the network.


This is visualized in the CDR Graph Detail, where a new MOS score labeled '''"Sil"''' (Silence MOS) will appear.
Silence frames (e.g., muted mic) are treated as packet loss, allowing accurate [[Glossary|MOS]] calculation for silent calls. In CDR Graph Detail, a new '''"Sil"''' (Silence MOS) score appears.


[[File:cdr_spectral_silence_example.png]]
[[File:cdr_spectral_silence_example.png]]
[[File:cdr_graph_silence_lowmos_example.png]]
=== Overall Silence Percentage ===


[[File:cdr_graph_silence_lowmos_example.png]]
CDR Detail shows total silence percentage for caller and callee streams.


=== 2. Overall Silence Percentage ===
{{Tip|1=>95% silence in one direction strongly indicates one-way audio.}}
The CDR Detail view will show the total percentage of silence for both the caller and callee audio streams. A call with over 95% silence in one direction is a strong indicator of a one-way audio problem.


[[File:cdr_detail_silence_table.png]]
[[File:cdr_detail_silence_table.png]]


=== 3. Silence at the End of a Call ===
=== Silence at End of Call ===
This metric measures the duration of silence leading up to the end of the call. A high value may indicate that a user hung up out of frustration because they couldn't hear the other party. This value is shown directly in the main CDR listing.
 
Measures silence duration before hangup. High values may indicate user frustration (couldn't hear other party). Shown in main CDR listing.


[[File:cdr_summary_silence_example.png]]
[[File:cdr_summary_silence_example.png]]


=== 4. Audio Clipping Detection ===
=== Audio Clipping Detection ===
The system counts the number of "clipped" audio frames, which occur when the audio signal is too loud and hits the maximum amplitude, causing distortion. This metric is shown in the CDR detail and can be used for filtering and creating charts to find problematic endpoints.
 
Counts clipped frames (signal too loud, hits max amplitude = distortion). Shown in CDR detail; usable for filtering and charts to find problematic endpoints.


[[File:charts_silence_values.png]]
[[File:charts_silence_values.png]]


=== 5. MOS Scores During Silence Periods ===
=== MOS During Silence Periods ===
When silence detection is enabled, VoIPmonitor calculates additional MOS values that appear after the standard MOS scores in the CDR table. These values represent the voice quality specifically during periods of silence in the call.


'''Additional MOS Columns:'''
{| class="wikitable"
* <code>a_mos_silence_mult10</code> / <code>b_mos_silence_mult10</code> – The '''average''' MOS score calculated during periods of silence in the call (for caller/callee streams)
|-
* <code>a_mos_silence_min_mult10</code> / <code>b_mos_silence_min_mult10</code> – The '''minimum''' MOS score recorded during the silent portions of the call (for caller/callee streams)
! Column !! Description
|-
| <code>a_mos_silence_mult10</code> / <code>b_mos_silence_mult10</code> || Average MOS during silence (caller/callee)
|-
| <code>a_mos_silence_min_mult10</code> / <code>b_mos_silence_min_mult10</code> || Minimum MOS during silence (caller/callee)
|}


'''Important Notes:'''
{{Note|These metrics only populate when <code>silencedetect=yes</code>. Otherwise, regular MOS is shown.}}
* These metrics are '''only active when the silence detection feature is enabled''' (<code>silencedetect = yes</code>)
 
* If silence detection is disabled, the system shows the full/regular MOS score instead of these silence-specific average and minimum values
== Detecting Calls with Background Noise ==
* These values help identify issues like calls where audio quality deteriorates during silent periods, which may indicate endpoint problems
 
Calls with background noise show '''low silence percentage''' because continuous audio prevents silence detection.
 
{| class="wikitable"
|-
! Environment !! Silence % Range
|-
| Clean/quiet office || 40-70%
|-
| Environmental noise (A/C, distant voices) || 10-39%
|-
| High noise (factory, crowded call center) || 0-9%
|}
 
'''Workflow:'''
# Enable <code>silencedetect=yes</code> with appropriate <code>silencethreshold</code>
# Filter CDR for <code>Caller Silence < 20%</code> OR <code>Called Silence < 20%</code>
# Review flagged calls' audio recordings to confirm noise
# Create saved filters or [[Alerts|alerts]] for ongoing monitoring
 
{{Tip|Use spectral analysis in CDR Graph Detail to distinguish white/brown noise (continuous spectrum) from sporadic noise (intermittent) and genuine speech (natural patterns with pauses).}}
 
== See Also ==
 
* [[Glossary]] - MOS, jitter, packet loss definitions
* [[Comprehensive_Guide_to_VoIP_Voice_Quality]] - Voice quality factors
* [[Call_Detail_Record_-_CDR]] - CDR view and filtering
* [[Charts]] - Creating charts from silence/clipping data
* [[Alerts]] - Setting up alerts for quality thresholds


== AI Summary for RAG ==
== AI Summary for RAG ==
'''Summary:''' This document describes the configuration and benefits of VoIPmonitor's Silence and Clipping Detection features. It explains that this functionality is specific to the G.711 (a-law/u-law) codec and is CPU-intensive. The guide details the required `voipmonitor.conf` settings (`silencedetect`, `clippingdetect`). It clarifies that while the feature requires specific database columns, these are included by default in all modern installations, and provides the `ALTER TABLE` command only for users upgrading from very old legacy systems. The key benefits are then explained: 1) Treating absolute silence as packet loss to produce a more accurate MOS score. 2) Calculating the overall percentage of silence to identify one-way audio. 3) Measuring silence at the end of a call to find frustration-based hangups. 4) Counting clipped audio frames to detect distortion. 5) Recording additional MOS score columns (`a_mos_silence_mult10`, `b_mos_silence_mult10`, `a_mos_silence_min_mult10`, `b_mos_silence_min_mult10`) that show the average and minimum MOS scores calculated during periods of silence. These silence-specific MOS values only appear when silence detection is enabled; otherwise, the system shows the full/regular MOS score.
 
'''Keywords:''' silence detection, clipping, one-way audio, no audio, dead air, MOS, G.711, alaw, ulaw, `silencedetect`, `clippingdetect`, `silencethreshold`, database schema, alter table, legacy upgrade, audio quality, audio analysis, `mos_silence`, `mos_silence_min`, average MOS during silence, minimum MOS during silence
'''Summary:''' VoIPmonitor's Silence and Clipping Detection analyzes G.711 (a-law/u-law) audio to diagnose issues invisible to network metrics. Key features: treats silence as packet loss for accurate MOS calculation, calculates silence percentage (>95% indicates one-way audio), measures end-of-call silence (user frustration indicator), counts clipped frames (distortion), and detects calls with background noise (low silence %). Configuration requires <code>silencedetect=yes</code> and <code>clippingdetect=yes</code> in voipmonitor.conf. Modern installations have required database columns by default.
 
'''Keywords:''' silence detection, clipping, one-way audio, dead air, MOS, G.711, silencedetect, clippingdetect, silencethreshold, mos_silence, background noise, noisy environments, audio analysis, endpoint issues
 
'''Key Questions:'''
'''Key Questions:'''
* How can I diagnose one-way audio problems?
* How can I diagnose one-way audio problems?
* Why is a call's MOS score high even though the user reported hearing nothing?
* Why is a call's MOS score high even though the user reported hearing nothing?
* How does VoIPmonitor detect silence in a call?
* How does VoIPmonitor detect silence in a call?
* What does the "Silence MOS" or "Sil" score mean in the CDR graph?
* What does the "Sil" (Silence MOS) score mean in the CDR graph?
* Do I need to alter my database table to use silence detection?
* How can I find calls with audio clipping?
* How can I find all calls that have audio clipping?
* How can I filter calls based on background noise?
* What configuration is needed to enable silence detection?
* What silence percentage indicates a noisy environment?
* What do the additional MOS values (average and minimum) that appear in the CDR mean?
* What are the `mos_silence` and `mos_silence_min` database columns for?
* Why do my CDR records show silence-specific MOS values when silence detection is enabled?

Latest revision as of 16:47, 8 January 2026


This guide explains VoIPmonitor's audio analysis features for G.711 codecs, including silence and clipping detection. These tools diagnose audio quality issues not caused by network problems, such as one-way audio, muted microphones, or faulty hardware.

Overview

Standard network metrics (packet loss, jitter) only identify transport-layer problems. Many audio issues originate at endpoints. The Silence & Clipping Detection engine analyzes decoded G.711 audio to identify these problems.

Use cases:

  • "Dead air" complaints when network statistics look perfect
  • One-way audio (one party not transmitting)
  • Audio clipping (clicks or distortion)
  • Accurate MOS calculation by penalizing silence periods
  • Detecting calls in noisy environments (see below)

Prerequisites

Requirement Details
Codec G.711 a-law/u-law only. Other codecs are not analyzed.
CPU Audio decoding is CPU-intensive. Monitor system load after enabling.
Database Modern installations (2020+) have required columns. Legacy systems may need schema updates (see below).

Configuration

Parameters

Parameter Default Description
silencedetect no Enable silence detection and MOS adjustment
clippingdetect no Enable audio clipping detection
silencethreshold 512 Audio level threshold for silence. Lower = stricter detection.

Enable in voipmonitor.conf

# /etc/voipmonitor.conf
silencedetect = yes
clippingdetect = yes
silencethreshold = 512
systemctl restart voipmonitor

ℹ️ Note: For legacy installations (pre-2020) that report missing columns on startup, add them via SQL:

ALTER TABLE cdr
  ADD COLUMN caller_silence tinyint unsigned default NULL,
  ADD COLUMN called_silence tinyint unsigned default NULL,
  ADD COLUMN caller_silence_end smallint default NULL,
  ADD COLUMN called_silence_end smallint default NULL,
  ADD COLUMN caller_clipping_div3 smallint unsigned default NULL,
  ADD COLUMN called_clipping_div3 smallint unsigned default NULL,
  ADD COLUMN a_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN b_mos_silence_min_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN a_mos_silence_mult10 tinyint unsigned DEFAULT NULL,
  ADD COLUMN b_mos_silence_mult10 tinyint unsigned DEFAULT NULL;

Features & Metrics

Silence as Packet Loss (MOS Adjustment)

Silence frames (e.g., muted mic) are treated as packet loss, allowing accurate MOS calculation for silent calls. In CDR Graph Detail, a new "Sil" (Silence MOS) score appears.

Overall Silence Percentage

CDR Detail shows total silence percentage for caller and callee streams.

💡 Tip: >95% silence in one direction strongly indicates one-way audio.

Silence at End of Call

Measures silence duration before hangup. High values may indicate user frustration (couldn't hear other party). Shown in main CDR listing.

Audio Clipping Detection

Counts clipped frames (signal too loud, hits max amplitude = distortion). Shown in CDR detail; usable for filtering and charts to find problematic endpoints.

MOS During Silence Periods

Column Description
a_mos_silence_mult10 / b_mos_silence_mult10 Average MOS during silence (caller/callee)
a_mos_silence_min_mult10 / b_mos_silence_min_mult10 Minimum MOS during silence (caller/callee)

ℹ️ Note:

Detecting Calls with Background Noise

Calls with background noise show low silence percentage because continuous audio prevents silence detection.

Environment Silence % Range
Clean/quiet office 40-70%
Environmental noise (A/C, distant voices) 10-39%
High noise (factory, crowded call center) 0-9%

Workflow:

  1. Enable silencedetect=yes with appropriate silencethreshold
  2. Filter CDR for Caller Silence < 20% OR Called Silence < 20%
  3. Review flagged calls' audio recordings to confirm noise
  4. Create saved filters or alerts for ongoing monitoring

💡 Tip: Use spectral analysis in CDR Graph Detail to distinguish white/brown noise (continuous spectrum) from sporadic noise (intermittent) and genuine speech (natural patterns with pauses).

See Also

AI Summary for RAG

Summary: VoIPmonitor's Silence and Clipping Detection analyzes G.711 (a-law/u-law) audio to diagnose issues invisible to network metrics. Key features: treats silence as packet loss for accurate MOS calculation, calculates silence percentage (>95% indicates one-way audio), measures end-of-call silence (user frustration indicator), counts clipped frames (distortion), and detects calls with background noise (low silence %). Configuration requires silencedetect=yes and clippingdetect=yes in voipmonitor.conf. Modern installations have required database columns by default.

Keywords: silence detection, clipping, one-way audio, dead air, MOS, G.711, silencedetect, clippingdetect, silencethreshold, mos_silence, background noise, noisy environments, audio analysis, endpoint issues

Key Questions:

  • How can I diagnose one-way audio problems?
  • Why is a call's MOS score high even though the user reported hearing nothing?
  • How does VoIPmonitor detect silence in a call?
  • What does the "Sil" (Silence MOS) score mean in the CDR graph?
  • How can I find calls with audio clipping?
  • How can I filter calls based on background noise?
  • What silence percentage indicates a noisy environment?