Sniffer configuration: Difference between revisions
No edit summary |
|||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
'''This document provides a comprehensive reference for all parameters in the `voipmonitor.conf` configuration file. It is designed to help administrators understand and tune the VoIPmonitor sensor for their specific environment.''' | |||
The main configuration file is located at `/etc/voipmonitor.conf`. Additional configuration snippets can be placed in files within the `/etc/voipmonitor/conf.d/` directory (these should not contain the `[general]` section header). | |||
== General & Core Settings == | |||
=== Time and Sensor Identification === | |||
;<code>id_sensor = 1</code> | |||
:(Default: unset) A unique numeric identifier (1-65535) for this sensor. This is '''essential''' in multi-sensor deployments to distinguish which sensor captured a call. The value is stored in the `cdr.id_sensor` column. | |||
= | ;<code>utc = yes</code> | ||
:(Default: no) When set to `yes`, all timestamps for CDRs and PCAP files are stored in UTC. This is '''highly recommended''' for deployments with sensors in different timezones to ensure consistency. | |||
;<code>timezone = /usr/share/zoneinfo/UTC</code> | |||
:(Default: system timezone) Overrides the system's default timezone by specifying a path to a valid zoneinfo file. Use this only if you need the sensor to operate in a timezone different from the server it's running on. | |||
= | === Process Management === | ||
;<code>watchdog = yes</code> | |||
:(Default: no) If enabled, a watchdog process is created that automatically restarts the voipmonitor sensor if it crashes or is terminated unexpectedly. | |||
;<code>watchdog_run_command = systemctl restart voipmonitor</code> | |||
:(Default: unset) If specified, the watchdog will execute this command to restart the service instead of just re-running the binary. This is useful for proper service management with `systemd`. | |||
= | == Database Configuration == | ||
=== Connection Settings === | |||
;<code>mysqlhost = localhost</code> | |||
:IP address or hostname of the MySQL/MariaDB server. | |||
;<code>mysqlsocket = /var/run/mysqld/mysqld.sock</code> | |||
:Path to the MySQL socket file for local connections (often faster than TCP). | |||
;<code>mysqlport = 3306</code> | |||
:TCP port of the database server. | |||
;<code>mysqlusername = root</code> | |||
:Username for the database connection. | |||
;<code>mysqlpassword =</code> | |||
:Password for the database connection. | |||
;<code>mysqldb = voipmonitor</code> | |||
:The name of the database to use. It will be created automatically if it doesn't exist. | |||
;<code>mysql_connect_timeout = 60</code> | |||
:(Default: 60) Timeout in seconds for establishing a connection to the database. | |||
;<code>mysql_client_compress = no</code> | |||
:(Default: no) Enables compression for the MySQL connection. Only use this if the database is on a remote, slow network link. | |||
;<code>mysql_reconnect = yes</code> | |||
:(Default: no) Enables automatic reconnection to the database if the connection is lost. | |||
=== Database SSL/TLS === | |||
;<code>mysqlsslkey = /etc/ssl/client-key.pem</code> | |||
:Path to the client's SSL private key file. | |||
;<code>mysqlsslcert = /etc/ssl/client-cert.pem</code> | |||
:Path to the client's SSL certificate file. | |||
;<code>mysqlsslcacert = /etc/ssl/ca-cert.pem</code> | |||
:Path to the Certificate Authority (CA) certificate file. | |||
=== Performance & Schema === | |||
;<code>query_cache = yes</code> | |||
:(Default: yes) This is a '''critical''' feature. When enabled, all SQL queries are first saved to a disk-based queue before being sent to the database. This prevents data loss if the database is temporarily unavailable and prevents the sensor from running out of memory. | |||
;<code>quick_save_cdr = no</code> | |||
:(Default: no) Speeds up the visibility of calls in the GUI at the cost of higher system load. Options are `no` (10s delay, recommended), `yes` (3s delay), or `quick` (1s delay). Only change this if near-real-time CDR visibility is absolutely required. | |||
;<code>cdr_partition = yes</code> | |||
:(Default: yes) Enables partitioning for large tables (like `cdr`) by day. This is '''essential for performance and data management''' on any production system. | |||
;<code>cdr_partition_by_hours = no</code> | |||
:(Default: no) For extreme high-traffic environments (>= 15,000 CPS), this creates partitions per hour instead of per day to further improve performance. | |||
;<code>disable_dbupgradecheck = yes</code> | |||
:(Default: no) If set to `yes`, the sniffer will not check for and apply database schema updates on startup. | |||
;<code>mysqlloadconfig = yes</code> | |||
:(Default: yes) Allows loading additional configuration parameters dynamically from the `sensor_conf` database table. | |||
;<code>mysqlcompress_type = ...</code> | |||
:(Default: auto-detected) You do not normally need to set this. The sniffer automatically chooses the best table compression method (LZ4 page compression) based on your MySQL/MariaDB version. Only change this for legacy systems. | |||
;<code>mysql_enable_set_id = yes</code> | |||
:(Default: no) In very high-traffic client/server deployments, this allows the central server to generate CDR IDs, which can improve batch insert performance. | |||
;<code>cdr_force_primary_index_in_all_tables = no</code> | |||
:(Default: no) Creates primary indexes on all tables. This is only required for specific database clustering technologies like MySQL/Galera Cluster and should not be enabled otherwise. | |||
;<code>disable_cdr_fields_rtp = no</code> | |||
:(Default: no) Disables all RTP-related statistics columns in the CDR table to save space. | |||
=== SQL Queue Tuning === | |||
;<code>mysqlstore_concat_limit = 400</code> | |||
:(Default: 400) Sets the global number of SQL statements to batch together before sending to the database. | |||
;<code>mysqlstore_max_threads_cdr = 2</code> | |||
:(Default: 2) The maximum number of parallel threads (and database connections) for writing CDRs. The sniffer will automatically scale up to this number if the queue grows. | |||
;''Note: Separate `_concat_limit_*` and `_max_threads_*` options exist for `message`, `register`, `http`, etc.'' | |||
= | === Database Cleaning === | ||
;<code>cleandatabase = 0</code> | |||
:(Default: 0, disabled) The master setting for database cleaning. Defines the retention period in days for CDRs and several other tables. Requires partitioning to be enabled. | |||
;<code>cleandatabase_cdr = 0</code> | |||
:(Default: 0, disabled) Specific retention period for `cdr` and `message` tables. | |||
;<code>cleandatabase_rtp_stat = 2</code> | |||
:(Default: 2) Retention period in days for detailed RTP statistics. | |||
;''Note: Many other `cleandatabase_*` options exist for specific tables like `register_failed`, `sip_msg`, `ss7`, etc.'' | |||
;<code>partition_operations_enable_fromto = 1-5</code> | |||
:(Default: 1-5) Restricts partition-dropping operations to a specific time window (e.g., 1 AM to 5 AM) to avoid impacting performance during peak hours. | |||
;<code>cleandatabase_size = 500000</code> | |||
:(Default: unset) An alternative cleaning method that removes old data to stay below a total database size limit (in MB). | |||
=== SQL Error Logging === | |||
;<code>sql_log_all_errors = no</code> | |||
:(Default: no) Logs all SQL errors to syslog. | |||
;<code>sql_errors_log_file = /path/to/log</code> | |||
:(Default: unset) Redirects SQL error logging to a specific file. | |||
;<code>sql_errors_skip = 1054,1136</code> | |||
:(Default: unset) A comma-separated list of SQL error codes to ignore and not log. | |||
== Network Interface & Sniffing == | |||
This section configures how the sensor captures packets. | |||
=== Interface Selection === | |||
;<code>interface = eth0</code> | |||
:Specifies the network interface(s) to listen on. Use a comma-separated list for multiple interfaces (e.g., `eth0,eth1`). Using `any` will listen on all interfaces but will not enable promiscuous mode. | |||
;<code>promisc = yes</code> | |||
:(Default: yes) Puts the specified interface(s) into promiscuous mode to capture all traffic, not just traffic addressed to the server. Does not work with `interface = any`. | |||
;<code>interfaces_optimize = yes</code> | |||
:(Default: yes) Allows voipmonitor to automatically tune NIC settings like ring buffers and coalescing using `ethtool`. | |||
;<code>filter = udp or (vlan and udp)</code> | |||
:(Default: unset) Applies a BPF filter (like in `tcpdump`) to the captured traffic. '''Warning:''' Using filters can be complex and may accidentally exclude important traffic like VLAN-tagged or tunneled packets. Use with caution. | |||
;<code>interface_ip_filter = 192.168.0.0/24</code> | |||
:(Default: unset) A more efficient way to filter traffic by IP address or subnet compared to the main `filter` option. Multiple lines can be used. | |||
=== High-Traffic & Advanced Packet Capture === | |||
;<code>interface_libpcap_filter = eth0 : port 5060</code> | |||
:(Default: unset) Allows splitting traffic from a single physical interface into multiple parallel processing threads within voipmonitor, each with its own BPF filter. This is an advanced technique to overcome per-core CPU limits in very high packet-rate scenarios. | |||
;<code>dpdk_nb_rxq = 2</code> | |||
:(Default: 2) For users of the [[DPDK|DPDK framework]], this sets the number of receive queues to use, enabling multi-core packet processing at the hardware/driver level. | |||
;<code>scanpcapdir = /dev/shm/voipmonitor</code> | |||
:(Default: unset) A special mode where the sensor does not capture live traffic but instead processes PCAP files from a directory as they are created by another tool, like `tcpdump`. | |||
;<code>sip_send = 192.168.0.2:1555</code> | |||
:(Default: unset) Forwards a copy of all captured SIP packets to a specified third-party destination over TCP or UDP. This is not for mirroring between sensors. | |||
=== Tunneling Protocol Support === | |||
VoIPmonitor can decode various tunneling protocols. To enable listening, uncomment and configure the relevant port. | |||
;<code>udp_port_tzsp = 37008</code> (Mikrotik TZSP) | |||
;<code>udp_port_l2tp = 1701</code> (L2TP) | |||
;<code>udp_port_vxlan = 4789</code> (VXLAN, common in AWS) | |||
;<code>udp_port_hperm = 7932</code> (HP ERM) | |||
;<code>audiocodes = yes</code> (Enables AudioCodes proprietary tunnel) | |||
;<code>ipfix = yes</code> (Enables IPFIX, used by Oracle SBCs) | |||
;<code>hep = yes</code> (Enables Homer Encapsulation Protocol) | |||
;<code>kamailio_port = 5888</code> (Enables mirroring from Kamailio's `siptrace` module) | |||
;<code>ribbonsbc_port = 9514</code> (Enables mirroring from Ribbon SBCs) | |||
= | == Performance & Threading == | ||
= | === Core Threading Model === | ||
;<code>threading_expanded = yes</code> | |||
:(Default: yes) Enables the modern, multi-threaded processing engine. The sniffer automatically spawns and manages threads based on traffic load and CPU capacity. It is recommended to leave this enabled. Set to `high_traffic` for environments exceeding 5 Gbit/s. | |||
;<code>preprocess_rtp_threads = 2</code> | |||
:(Default: 2) The initial number of threads for RTP preprocessing. The system will auto-scale from here. | |||
;<code>destroy_calls_in_storing_cdr = yes</code> | |||
:(Default: no) Offloads the process of freeing call memory to a separate thread. Useful in very high-traffic scenarios (> 50,000 concurrent calls). | |||
=== Thread Scheduling & Priority === | |||
;<code>sched_pol_auto = prio -20</code> | |||
:(Default: `prio -20`) Automatically elevates the priority (lowers the `nice` value) of critical threads if the system comes under load. This helps ensure that packet capture is prioritized over other system tasks. | |||
=== NUMA & Memory === | |||
;<code>numa_balancing_set = autodisable</code> | |||
:(Default: autodisable) Manages the Linux kernel's NUMA balancing feature. The default setting will automatically disable NUMA balancing if it detects high overhead. | |||
;<code>hugepages_max = 80000</code> | |||
:(Default: 0, disabled) Enables the use of huge pages for memory allocation, which can improve performance on some systems by reducing TLB misses. | |||
= | == Distributed Operation: Client/Server & Mirroring == | ||
=== Modern Client/Server Model (Recommended) === | |||
;<code>server_bind = 0.0.0.0</code> | |||
:The IP address the central sensor will listen on for connections from remote clients. | |||
;<code>server_destination = 10.0.0.1</code> | |||
:The IP address of the central server a remote sensor should connect to. | |||
;<code>server_password =</code> | |||
:A shared password to authenticate clients and servers. | |||
;<code>packetbuffer_sender = no</code> | |||
:(Default: no) The operational mode. `no` for local processing (low network usage), `yes` for packet mirroring (low remote CPU usage). | |||
;<code>server_type_compress = zstd</code> | |||
:(Default: zstd) Compression algorithm for the client/server channel. | |||
=== Legacy Mirroring Model === | |||
;<code>mirror_bind_ip = 0.0.0.0</code> | |||
:The IP the receiver sensor listens on for the unencrypted, legacy mirroring protocol. | |||
;<code>mirror_destination_ip = 10.0.0.1</code> | |||
:The IP of the receiver sensor that the sender should stream packets to. | |||
= | == Storage & File Management (Spooldir) == | ||
=== Location and Permissions === | |||
;<code>spooldir = /var/spool/voipmonitor</code> | |||
:The primary directory for storing all captured data (PCAP, GRAPH, AUDIO files). | |||
;<code>spooldir_file_permission = 0666</code> | |||
;<code>spooldir_dir_permission = 0777</code> | |||
:Allows setting specific filesystem permissions for newly created files and directories. | |||
;<code>spooldir_by_sensor = no</code> | |||
:(Default: no) If enabled, creates subdirectories within the spooldir for each `id_sensor`. | |||
=== PCAP/TAR Storage Strategy === | |||
;<code>tar = yes</code> | |||
:(Default: yes) This is a key performance feature. Instead of writing thousands of small PCAP files, voipmonitor groups them into minute-based `.tar` archives, which drastically reduces disk I/O load. | |||
;<code>savesip = yes</code> | |||
:Enables saving of SIP packets. | |||
;<code>savertp = yes</code> | |||
:Enables saving of RTP packets. Set to `header` to save only RTP headers, not the audio payload. | |||
;<code>savertcp = yes</code> | |||
:Enables saving of RTCP (RTP Control Protocol) packets. | |||
;<code>savegraph = yes</code> | |||
:Enables saving of call graph data. | |||
=== Spool Cleaning === | |||
;<code>cleanspool = yes</code> | |||
:(Default: yes) Enables the automatic cleaning process for the spool directory. | |||
;<code>maxpoolsize = 102400</code> | |||
:(Default: 100 GB) The primary retention setting. Deletes the oldest data to stay under this total size limit (in MB). | |||
;<code>maxpooldays = 30</code> | |||
:(Default: unset) An alternative policy that deletes all data older than the specified number of days. | |||
;''Note: Separate `maxpoolsip*`, `maxpoolrtp*`, etc., options exist for granular policies.'' | |||
;<code>autocleanspoolminpercent = 1</code> and `autocleanmingb = 5` | |||
:(Defaults: 1% and 5 GB) Emergency cleaning triggers to prevent the disk from filling up completely. | |||
=== Audio File Generation === | |||
;<code>saveaudio = wav</code> | |||
:(Default: no) If enabled, voipmonitor will generate an audio file (`.wav`, `.ogg`, or `.mp3`) for each call in addition to the PCAP file. '''Note:''' This is generally not necessary and adds significant CPU/I/O load. | |||
;<code>mp3_quality = 5</code>, `ogg_quality = 0.4` | |||
:Quality settings for the respective audio formats. | |||
== Call Processing & Protocol Logic == | |||
=== Call Identification & Merging === | |||
;<code>remoteparty_caller = calling</code>, `passertedidentity = no`, etc. | |||
:A group of options that control which SIP headers (`Remote-Party-ID`, `P-Asserted-Identity`, etc.) are used to determine the definitive caller/callee information. | |||
;<code>sipoverlap = yes</code> | |||
:(Default: yes) Allows the destination number to be updated from subsequent INVITEs within the same dialog, necessary for overlap dialing. | |||
;<code>matchheader = in-reply-to</code> | |||
:Uses the specified SIP header to link different call legs into a single related call in the GUI. | |||
;<code>callidmerge_header = Parent-Call-ID</code> | |||
:A more advanced method to merge call legs based on a shared identifier in a custom header. | |||
= | === Call Timeouts & Termination === | ||
;<code>absolute_timeout = 14400</code> | |||
:(Default: 4 hours) Forcefully ends any call that lasts longer than this value to prevent runaway processes. | |||
;<code>rtptimeout = 300</code> | |||
:(Default: 5 minutes) Closes a call if no RTP or RTCP packets have been received for this duration. | |||
;<code>sipwithoutrtptimeout = 3600</code> | |||
:(Default: 1 hour) Closes a SIP call that has no associated RTP stream after this duration. | |||
;<code>ignore_rtp_after_response = 408;480;486;487;481;600;503</code> | |||
:A list of SIP final response codes after which the sniffer should stop looking for RTP for that call. | |||
=== RTP & SRTP (Encrypted Media) === | |||
;<code>jitterbuffer_f1 = yes</code>, `jitterbuffer_f2 = yes`, `jitterbuffer_adapt = yes</code> | |||
:(Default: all yes) Enables the three jitter buffer simulators used to calculate parametric MOS scores. These are CPU-intensive; you can disable one or more on resource-constrained systems. | |||
;<code>srtp_rtp = no</code> | |||
:(Default: no) To save decrypted SRTP (audio) streams into the PCAP file, you must set this to `yes`. This requires a valid decryption key. | |||
;<code>ssl_dtls_boost = no</code> | |||
:(Default: no) A meta-parameter that enables a set of aggressive options for improving DTLS handshake and SRTP decryption success rates. | |||
=== NAT Handling === | |||
;<code>natalias = 1.1.1.1 10.0.0.3</code> | |||
:Creates a mapping between a public IP and a private IP, helping the sniffer correctly associate call legs behind a NAT device. Multiple lines can be used. | |||
= | === SIP, REGISTER, and Other Messages === | ||
;<code>sip-register = no</code> | |||
:(Default: no) Enables the processing and storage of SIP `REGISTER` messages. | |||
;<code>sip-options = no</code> | |||
:(Default: no) Enables the processing and storage of SIP `OPTIONS` messages. | |||
;<code>sip-subscribe = no</code> | |||
;<code>sip-notify = no</code> | |||
:Enable processing for `SUBSCRIBE` and `NOTIFY` messages. | |||
;<code>sip-message = yes</code> | |||
:(Default: yes) Enables processing for SIP `MESSAGE` requests. | |||
=== Call Recording Control === | |||
;<code>pauserecordingdtmf = *9</code> | |||
:(Default: unset) If set, RTP recording will be paused when this DTMF sequence is detected in a call. | |||
;<code>pauserecordingheader = MyCustomPauseHeader</code> | |||
:(Default: unset) Pauses/unpauses recording based on the presence of a specific SIP header and its value (e.g., `pause` or `unpause`). | |||
;<code>norecord-header = yes</code> | |||
:(Default: no) If any SIP packet in a call contains the `X-VoipMonitor-norecord` header, the entire call record (PCAP and CDR) will be discarded. | |||
=== Other Protocols === | |||
;<code>skinny = yes</code> | |||
:(Default: no) Enables parsing for Cisco Skinny Call Control Protocol (SCCP). | |||
;<code>mgcp = yes</code> | |||
:(Default: no) Enables parsing for MGCP. | |||
;<code>ss7 = yes</code> | |||
:(Default: no) Enables parsing for SS7-over-IP (SIGTRAN). | |||
;<code>diameter = no</code> | |||
:(Default: no) Enables parsing for the Diameter protocol. | |||
= | == Expert & Debugging Options == | ||
'''Warning:''' These options should only be changed if you are an expert or instructed to do so by the support team. | |||
;<code>database_backup_from_date = 2023-01-01</code> | |||
:A family of options that puts the sniffer into a special database backup/migration mode, copying data from another database. | |||
;<code>deduplicate = yes</code> | |||
:(Default: no) Enables packet deduplication based on an MD5 checksum. Useful if you are receiving the same traffic stream from multiple sources. | |||
;<code>coredump_filter = 0x7F</code> | |||
:Controls what memory segments are included in a coredump file if the application crashes. | |||
;<code>abort_if_heap_full = no</code> | |||
:A set of options that control whether the sniffer should intentionally crash under certain high-load error conditions to generate a coredump for debugging. | |||
== AI Summary for RAG == | |||
'''Summary:''' This document is a comprehensive reference guide for the `voipmonitor.conf` sniffer configuration file. It is logically structured into sections covering General Settings (sensor ID, timezone), Database Connection and Performance (MySQL settings, partitioning, queue tuning, cleaning), Network Interface and Sniffing (interface selection, BPF filters, tunneling protocols like TZSP/VXLAN, and kernel-bypass methods like DPDK), Performance and Threading (NUMA, scheduling), Distributed Architectures (the modern client/server model vs. legacy mirroring), and Storage Management (spooldir, TAR file usage, pcap saving, and automated cleaning rules). It also details protocol-specific configurations for SIP, RTP, SRTP, Skinny, MGCP, and others, including call timeout logic, DTMF detection, and call identity headers. A final section covers expert and debugging options like database backup mode and deduplication. | |||
'''Keywords:''' voipmonitor.conf, configuration, sniffer config, sensor, database, mysql, mariadb, cdr_partition, cleandatabase, interface, sniffing, promisc, bpf, filter, tunneling, DPDK, performance, threading, t0CPU, client/server, distributed, remote sensor, spooldir, storage, pcap, tar, maxpoolsize, saveaudio, SIP, RTP, SRTP, DTLS, skinny, MGCP, SS7, diameter, NAT, natalias, call recording, watchdog, `sched_pol_auto` | |||
'''Key Questions:''' | |||
* What are the most important settings in voipmonitor.conf for a new installation? | |||
* How do I configure the database connection for the sniffer? | |||
* How do I set up a distributed client/server architecture? | |||
* What is the difference between `packetbuffer_sender = yes` and `no`? | |||
* How do I tune the database for high performance using `innodb_buffer_pool_size` and other parameters? | |||
* How do I configure the sniffer to listen on multiple SIP ports? | |||
* What are the `maxpoolsize` and `cleandatabase` options and how do they work? | |||
* How do I enable SRTP decryption? | |||
* How do I configure VoIPmonitor to handle tunneled traffic from a Mikrotik router or AWS? | |||
* How do I selectively pause or stop call recording? | |||
Latest revision as of 10:45, 30 June 2025
This document provides a comprehensive reference for all parameters in the `voipmonitor.conf` configuration file. It is designed to help administrators understand and tune the VoIPmonitor sensor for their specific environment.
The main configuration file is located at `/etc/voipmonitor.conf`. Additional configuration snippets can be placed in files within the `/etc/voipmonitor/conf.d/` directory (these should not contain the `[general]` section header).
General & Core Settings
Time and Sensor Identification
id_sensor = 1
- (Default: unset) A unique numeric identifier (1-65535) for this sensor. This is essential in multi-sensor deployments to distinguish which sensor captured a call. The value is stored in the `cdr.id_sensor` column.
utc = yes
- (Default: no) When set to `yes`, all timestamps for CDRs and PCAP files are stored in UTC. This is highly recommended for deployments with sensors in different timezones to ensure consistency.
timezone = /usr/share/zoneinfo/UTC
- (Default: system timezone) Overrides the system's default timezone by specifying a path to a valid zoneinfo file. Use this only if you need the sensor to operate in a timezone different from the server it's running on.
Process Management
watchdog = yes
- (Default: no) If enabled, a watchdog process is created that automatically restarts the voipmonitor sensor if it crashes or is terminated unexpectedly.
watchdog_run_command = systemctl restart voipmonitor
- (Default: unset) If specified, the watchdog will execute this command to restart the service instead of just re-running the binary. This is useful for proper service management with `systemd`.
Database Configuration
Connection Settings
mysqlhost = localhost
- IP address or hostname of the MySQL/MariaDB server.
mysqlsocket = /var/run/mysqld/mysqld.sock
- Path to the MySQL socket file for local connections (often faster than TCP).
mysqlport = 3306
- TCP port of the database server.
mysqlusername = root
- Username for the database connection.
mysqlpassword =
- Password for the database connection.
mysqldb = voipmonitor
- The name of the database to use. It will be created automatically if it doesn't exist.
mysql_connect_timeout = 60
- (Default: 60) Timeout in seconds for establishing a connection to the database.
mysql_client_compress = no
- (Default: no) Enables compression for the MySQL connection. Only use this if the database is on a remote, slow network link.
mysql_reconnect = yes
- (Default: no) Enables automatic reconnection to the database if the connection is lost.
Database SSL/TLS
mysqlsslkey = /etc/ssl/client-key.pem
- Path to the client's SSL private key file.
mysqlsslcert = /etc/ssl/client-cert.pem
- Path to the client's SSL certificate file.
mysqlsslcacert = /etc/ssl/ca-cert.pem
- Path to the Certificate Authority (CA) certificate file.
Performance & Schema
query_cache = yes
- (Default: yes) This is a critical feature. When enabled, all SQL queries are first saved to a disk-based queue before being sent to the database. This prevents data loss if the database is temporarily unavailable and prevents the sensor from running out of memory.
quick_save_cdr = no
- (Default: no) Speeds up the visibility of calls in the GUI at the cost of higher system load. Options are `no` (10s delay, recommended), `yes` (3s delay), or `quick` (1s delay). Only change this if near-real-time CDR visibility is absolutely required.
cdr_partition = yes
- (Default: yes) Enables partitioning for large tables (like `cdr`) by day. This is essential for performance and data management on any production system.
cdr_partition_by_hours = no
- (Default: no) For extreme high-traffic environments (>= 15,000 CPS), this creates partitions per hour instead of per day to further improve performance.
disable_dbupgradecheck = yes
- (Default: no) If set to `yes`, the sniffer will not check for and apply database schema updates on startup.
mysqlloadconfig = yes
- (Default: yes) Allows loading additional configuration parameters dynamically from the `sensor_conf` database table.
mysqlcompress_type = ...
- (Default: auto-detected) You do not normally need to set this. The sniffer automatically chooses the best table compression method (LZ4 page compression) based on your MySQL/MariaDB version. Only change this for legacy systems.
mysql_enable_set_id = yes
- (Default: no) In very high-traffic client/server deployments, this allows the central server to generate CDR IDs, which can improve batch insert performance.
cdr_force_primary_index_in_all_tables = no
- (Default: no) Creates primary indexes on all tables. This is only required for specific database clustering technologies like MySQL/Galera Cluster and should not be enabled otherwise.
disable_cdr_fields_rtp = no
- (Default: no) Disables all RTP-related statistics columns in the CDR table to save space.
SQL Queue Tuning
mysqlstore_concat_limit = 400
- (Default: 400) Sets the global number of SQL statements to batch together before sending to the database.
mysqlstore_max_threads_cdr = 2
- (Default: 2) The maximum number of parallel threads (and database connections) for writing CDRs. The sniffer will automatically scale up to this number if the queue grows.
- Note: Separate `_concat_limit_*` and `_max_threads_*` options exist for `message`, `register`, `http`, etc.
Database Cleaning
cleandatabase = 0
- (Default: 0, disabled) The master setting for database cleaning. Defines the retention period in days for CDRs and several other tables. Requires partitioning to be enabled.
cleandatabase_cdr = 0
- (Default: 0, disabled) Specific retention period for `cdr` and `message` tables.
cleandatabase_rtp_stat = 2
- (Default: 2) Retention period in days for detailed RTP statistics.
- Note: Many other `cleandatabase_*` options exist for specific tables like `register_failed`, `sip_msg`, `ss7`, etc.
partition_operations_enable_fromto = 1-5
- (Default: 1-5) Restricts partition-dropping operations to a specific time window (e.g., 1 AM to 5 AM) to avoid impacting performance during peak hours.
cleandatabase_size = 500000
- (Default: unset) An alternative cleaning method that removes old data to stay below a total database size limit (in MB).
SQL Error Logging
sql_log_all_errors = no
- (Default: no) Logs all SQL errors to syslog.
sql_errors_log_file = /path/to/log
- (Default: unset) Redirects SQL error logging to a specific file.
sql_errors_skip = 1054,1136
- (Default: unset) A comma-separated list of SQL error codes to ignore and not log.
Network Interface & Sniffing
This section configures how the sensor captures packets.
Interface Selection
interface = eth0
- Specifies the network interface(s) to listen on. Use a comma-separated list for multiple interfaces (e.g., `eth0,eth1`). Using `any` will listen on all interfaces but will not enable promiscuous mode.
promisc = yes
- (Default: yes) Puts the specified interface(s) into promiscuous mode to capture all traffic, not just traffic addressed to the server. Does not work with `interface = any`.
interfaces_optimize = yes
- (Default: yes) Allows voipmonitor to automatically tune NIC settings like ring buffers and coalescing using `ethtool`.
filter = udp or (vlan and udp)
- (Default: unset) Applies a BPF filter (like in `tcpdump`) to the captured traffic. Warning: Using filters can be complex and may accidentally exclude important traffic like VLAN-tagged or tunneled packets. Use with caution.
interface_ip_filter = 192.168.0.0/24
- (Default: unset) A more efficient way to filter traffic by IP address or subnet compared to the main `filter` option. Multiple lines can be used.
High-Traffic & Advanced Packet Capture
interface_libpcap_filter = eth0 : port 5060
- (Default: unset) Allows splitting traffic from a single physical interface into multiple parallel processing threads within voipmonitor, each with its own BPF filter. This is an advanced technique to overcome per-core CPU limits in very high packet-rate scenarios.
dpdk_nb_rxq = 2
- (Default: 2) For users of the DPDK framework, this sets the number of receive queues to use, enabling multi-core packet processing at the hardware/driver level.
scanpcapdir = /dev/shm/voipmonitor
- (Default: unset) A special mode where the sensor does not capture live traffic but instead processes PCAP files from a directory as they are created by another tool, like `tcpdump`.
sip_send = 192.168.0.2:1555
- (Default: unset) Forwards a copy of all captured SIP packets to a specified third-party destination over TCP or UDP. This is not for mirroring between sensors.
Tunneling Protocol Support
VoIPmonitor can decode various tunneling protocols. To enable listening, uncomment and configure the relevant port.
udp_port_tzsp = 37008
(Mikrotik TZSP)udp_port_l2tp = 1701
(L2TP)udp_port_vxlan = 4789
(VXLAN, common in AWS)udp_port_hperm = 7932
(HP ERM)audiocodes = yes
(Enables AudioCodes proprietary tunnel)ipfix = yes
(Enables IPFIX, used by Oracle SBCs)hep = yes
(Enables Homer Encapsulation Protocol)kamailio_port = 5888
(Enables mirroring from Kamailio's `siptrace` module)ribbonsbc_port = 9514
(Enables mirroring from Ribbon SBCs)
Performance & Threading
Core Threading Model
threading_expanded = yes
- (Default: yes) Enables the modern, multi-threaded processing engine. The sniffer automatically spawns and manages threads based on traffic load and CPU capacity. It is recommended to leave this enabled. Set to `high_traffic` for environments exceeding 5 Gbit/s.
preprocess_rtp_threads = 2
- (Default: 2) The initial number of threads for RTP preprocessing. The system will auto-scale from here.
destroy_calls_in_storing_cdr = yes
- (Default: no) Offloads the process of freeing call memory to a separate thread. Useful in very high-traffic scenarios (> 50,000 concurrent calls).
Thread Scheduling & Priority
sched_pol_auto = prio -20
- (Default: `prio -20`) Automatically elevates the priority (lowers the `nice` value) of critical threads if the system comes under load. This helps ensure that packet capture is prioritized over other system tasks.
NUMA & Memory
numa_balancing_set = autodisable
- (Default: autodisable) Manages the Linux kernel's NUMA balancing feature. The default setting will automatically disable NUMA balancing if it detects high overhead.
hugepages_max = 80000
- (Default: 0, disabled) Enables the use of huge pages for memory allocation, which can improve performance on some systems by reducing TLB misses.
Distributed Operation: Client/Server & Mirroring
Modern Client/Server Model (Recommended)
server_bind = 0.0.0.0
- The IP address the central sensor will listen on for connections from remote clients.
server_destination = 10.0.0.1
- The IP address of the central server a remote sensor should connect to.
server_password =
- A shared password to authenticate clients and servers.
packetbuffer_sender = no
- (Default: no) The operational mode. `no` for local processing (low network usage), `yes` for packet mirroring (low remote CPU usage).
server_type_compress = zstd
- (Default: zstd) Compression algorithm for the client/server channel.
Legacy Mirroring Model
mirror_bind_ip = 0.0.0.0
- The IP the receiver sensor listens on for the unencrypted, legacy mirroring protocol.
mirror_destination_ip = 10.0.0.1
- The IP of the receiver sensor that the sender should stream packets to.
Storage & File Management (Spooldir)
Location and Permissions
spooldir = /var/spool/voipmonitor
- The primary directory for storing all captured data (PCAP, GRAPH, AUDIO files).
spooldir_file_permission = 0666
spooldir_dir_permission = 0777
- Allows setting specific filesystem permissions for newly created files and directories.
spooldir_by_sensor = no
- (Default: no) If enabled, creates subdirectories within the spooldir for each `id_sensor`.
PCAP/TAR Storage Strategy
tar = yes
- (Default: yes) This is a key performance feature. Instead of writing thousands of small PCAP files, voipmonitor groups them into minute-based `.tar` archives, which drastically reduces disk I/O load.
savesip = yes
- Enables saving of SIP packets.
savertp = yes
- Enables saving of RTP packets. Set to `header` to save only RTP headers, not the audio payload.
savertcp = yes
- Enables saving of RTCP (RTP Control Protocol) packets.
savegraph = yes
- Enables saving of call graph data.
Spool Cleaning
cleanspool = yes
- (Default: yes) Enables the automatic cleaning process for the spool directory.
maxpoolsize = 102400
- (Default: 100 GB) The primary retention setting. Deletes the oldest data to stay under this total size limit (in MB).
maxpooldays = 30
- (Default: unset) An alternative policy that deletes all data older than the specified number of days.
- Note: Separate `maxpoolsip*`, `maxpoolrtp*`, etc., options exist for granular policies.
autocleanspoolminpercent = 1
and `autocleanmingb = 5`- (Defaults: 1% and 5 GB) Emergency cleaning triggers to prevent the disk from filling up completely.
Audio File Generation
saveaudio = wav
- (Default: no) If enabled, voipmonitor will generate an audio file (`.wav`, `.ogg`, or `.mp3`) for each call in addition to the PCAP file. Note: This is generally not necessary and adds significant CPU/I/O load.
mp3_quality = 5
, `ogg_quality = 0.4`- Quality settings for the respective audio formats.
Call Processing & Protocol Logic
Call Identification & Merging
remoteparty_caller = calling
, `passertedidentity = no`, etc.- A group of options that control which SIP headers (`Remote-Party-ID`, `P-Asserted-Identity`, etc.) are used to determine the definitive caller/callee information.
sipoverlap = yes
- (Default: yes) Allows the destination number to be updated from subsequent INVITEs within the same dialog, necessary for overlap dialing.
matchheader = in-reply-to
- Uses the specified SIP header to link different call legs into a single related call in the GUI.
callidmerge_header = Parent-Call-ID
- A more advanced method to merge call legs based on a shared identifier in a custom header.
Call Timeouts & Termination
absolute_timeout = 14400
- (Default: 4 hours) Forcefully ends any call that lasts longer than this value to prevent runaway processes.
rtptimeout = 300
- (Default: 5 minutes) Closes a call if no RTP or RTCP packets have been received for this duration.
sipwithoutrtptimeout = 3600
- (Default: 1 hour) Closes a SIP call that has no associated RTP stream after this duration.
ignore_rtp_after_response = 408;480;486;487;481;600;503
- A list of SIP final response codes after which the sniffer should stop looking for RTP for that call.
RTP & SRTP (Encrypted Media)
jitterbuffer_f1 = yes
, `jitterbuffer_f2 = yes`, `jitterbuffer_adapt = yes- (Default: all yes) Enables the three jitter buffer simulators used to calculate parametric MOS scores. These are CPU-intensive; you can disable one or more on resource-constrained systems.
srtp_rtp = no
- (Default: no) To save decrypted SRTP (audio) streams into the PCAP file, you must set this to `yes`. This requires a valid decryption key.
ssl_dtls_boost = no
- (Default: no) A meta-parameter that enables a set of aggressive options for improving DTLS handshake and SRTP decryption success rates.
NAT Handling
natalias = 1.1.1.1 10.0.0.3
- Creates a mapping between a public IP and a private IP, helping the sniffer correctly associate call legs behind a NAT device. Multiple lines can be used.
SIP, REGISTER, and Other Messages
sip-register = no
- (Default: no) Enables the processing and storage of SIP `REGISTER` messages.
sip-options = no
- (Default: no) Enables the processing and storage of SIP `OPTIONS` messages.
sip-subscribe = no
sip-notify = no
- Enable processing for `SUBSCRIBE` and `NOTIFY` messages.
sip-message = yes
- (Default: yes) Enables processing for SIP `MESSAGE` requests.
Call Recording Control
pauserecordingdtmf = *9
- (Default: unset) If set, RTP recording will be paused when this DTMF sequence is detected in a call.
pauserecordingheader = MyCustomPauseHeader
- (Default: unset) Pauses/unpauses recording based on the presence of a specific SIP header and its value (e.g., `pause` or `unpause`).
norecord-header = yes
- (Default: no) If any SIP packet in a call contains the `X-VoipMonitor-norecord` header, the entire call record (PCAP and CDR) will be discarded.
Other Protocols
skinny = yes
- (Default: no) Enables parsing for Cisco Skinny Call Control Protocol (SCCP).
mgcp = yes
- (Default: no) Enables parsing for MGCP.
ss7 = yes
- (Default: no) Enables parsing for SS7-over-IP (SIGTRAN).
diameter = no
- (Default: no) Enables parsing for the Diameter protocol.
Expert & Debugging Options
Warning: These options should only be changed if you are an expert or instructed to do so by the support team.
database_backup_from_date = 2023-01-01
- A family of options that puts the sniffer into a special database backup/migration mode, copying data from another database.
deduplicate = yes
- (Default: no) Enables packet deduplication based on an MD5 checksum. Useful if you are receiving the same traffic stream from multiple sources.
coredump_filter = 0x7F
- Controls what memory segments are included in a coredump file if the application crashes.
abort_if_heap_full = no
- A set of options that control whether the sniffer should intentionally crash under certain high-load error conditions to generate a coredump for debugging.
AI Summary for RAG
Summary: This document is a comprehensive reference guide for the `voipmonitor.conf` sniffer configuration file. It is logically structured into sections covering General Settings (sensor ID, timezone), Database Connection and Performance (MySQL settings, partitioning, queue tuning, cleaning), Network Interface and Sniffing (interface selection, BPF filters, tunneling protocols like TZSP/VXLAN, and kernel-bypass methods like DPDK), Performance and Threading (NUMA, scheduling), Distributed Architectures (the modern client/server model vs. legacy mirroring), and Storage Management (spooldir, TAR file usage, pcap saving, and automated cleaning rules). It also details protocol-specific configurations for SIP, RTP, SRTP, Skinny, MGCP, and others, including call timeout logic, DTMF detection, and call identity headers. A final section covers expert and debugging options like database backup mode and deduplication. Keywords: voipmonitor.conf, configuration, sniffer config, sensor, database, mysql, mariadb, cdr_partition, cleandatabase, interface, sniffing, promisc, bpf, filter, tunneling, DPDK, performance, threading, t0CPU, client/server, distributed, remote sensor, spooldir, storage, pcap, tar, maxpoolsize, saveaudio, SIP, RTP, SRTP, DTLS, skinny, MGCP, SS7, diameter, NAT, natalias, call recording, watchdog, `sched_pol_auto` Key Questions:
- What are the most important settings in voipmonitor.conf for a new installation?
- How do I configure the database connection for the sniffer?
- How do I set up a distributed client/server architecture?
- What is the difference between `packetbuffer_sender = yes` and `no`?
- How do I tune the database for high performance using `innodb_buffer_pool_size` and other parameters?
- How do I configure the sniffer to listen on multiple SIP ports?
- What are the `maxpoolsize` and `cleandatabase` options and how do they work?
- How do I enable SRTP decryption?
- How do I configure VoIPmonitor to handle tunneled traffic from a Mikrotik router or AWS?
- How do I selectively pause or stop call recording?