Sniffing modes: Difference between revisions

From VoIPmonitor.org
(Add cloud packet mirroring guide (GCP, AWS, Azure) with critical ingress/egress capture requirement and VM sizing best practices)
(Rewrite: consolidated structure, removed redundancy, improved tables, kept all essential info)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:VoIPmonitor Deployment & Topology Guide}}
{{DISPLAYTITLE:VoIPmonitor Deployment & Topology Guide}}


'''This guide provides a comprehensive overview of VoIPmonitor's deployment models. It covers the fundamental choice between on-host and dedicated sensors, methods for capturing traffic, and detailed configurations for scalable, multi-site architectures.'''
This guide covers VoIPmonitor deployment options: where to install the sensor, how to forward traffic, and distributed architectures for multi-site monitoring.


== Core Concept: Where to Capture Traffic ==
<kroki lang="mermaid">
The first decision in any deployment is where the VoIPmonitor sensor (sniffer) will run.
%%{init: {'flowchart': {'nodeSpacing': 15, 'rankSpacing': 30}}}%%
flowchart TB
    START[Where to deploy sensor?] --> Q1{PBX runs on Linux?}
    Q1 -->|Yes| Q2{Spare resources?}
    Q1 -->|No - Windows| DED[Dedicated Sensor]
    Q2 -->|Yes| ONHOST[On-Host Capture]
    Q2 -->|No| DED


=== 1. On-Host Capture (on the PBX/SBC) ===
    DED --> Q3{Traffic forwarding method?}
The sensor can be installed directly on the same Linux server that runs your PBX or SBC.
    Q3 --> SPAN[SPAN/RSPAN]
* '''Pros:''' Requires no extra hardware, network changes, or port mirroring. It is the simplest setup.
    Q3 --> TUNNEL[Software Tunnel]
* '''Cons:''' Adds CPU, memory, and disk I/O load to your production voice server. If these resources are critical, a dedicated sensor is the recommended approach.
    Q3 --> CLOUD[Cloud Mirroring]


=== 2. Dedicated Sensor ===
    TUNNEL --> T1[GRE/ERSPAN]
A dedicated Linux server runs only the VoIPmonitor sensor. This is the recommended approach for production environments as it isolates monitoring resources from your voice platform. To use a dedicated sensor, you must forward a copy of the network traffic to it using one of the methods below.
    TUNNEL --> T2[TZSP/VXLAN]
    TUNNEL --> T3[HEP/AudioCodes]
</kroki>


== Methods for Forwarding Traffic to a Dedicated Sensor ==
= Sensor Deployment Options =


=== A. Hardware Port Mirroring (SPAN/RSPAN) ===
== On-Host Capture ==
This is the most common and reliable method. You configure your physical network switch to copy all traffic from the switch ports connected to your PBX/SBC to the switch port connected to the VoIPmonitor sensor. This feature is commonly called '''Port Mirroring''', '''SPAN''', or '''RSPAN'''. Consult your switch's documentation for configuration details.


The VoIPmonitor sensor interface will be put into promiscuous mode automatically. To capture from multiple interfaces, set <code>interface = any</code> in <code>voipmonitor.conf</code> and enable promiscuous mode manually on each NIC (e.g., <code>ip link set dev eth1 promisc on</code>).
Install the sensor directly on the same Linux server as your PBX/SBC.


=== B. Software-based Tunnelling ===
{| class="wikitable"
When hardware mirroring is not an option, many network devices and PBXs can encapsulate VoIP packets and send them to the sensor's IP address using a tunnel. VoIPmonitor natively supports a wide range of protocols.
! Pros !! Cons
* '''Built-in Support:''' IP-in-IP, GRE, ERSPAN
|-
* '''UDP-based Tunnels:''' Configure the corresponding port in <code>voipmonitor.conf</code>:
| No extra hardware, network changes, or port mirroring required || Adds CPU, memory, and disk I/O load to production voice server
** <code>udp_port_tzsp = 37008</code> (for MikroTik's TZSP)
|-
** <code>udp_port_l2tp = 1701</code>
| Simplest setup || Not suitable if resources are critical
** <code>udp_port_vxlan = 4789</code> (common in cloud environments)
|}
* '''Proprietary & Other Protocols:'''
** [[audiocodes tunneling|AudioCodes Tunneling]] (uses <code>udp_port_audiocodes</code> or <code>tcp_port_audiocodes</code>)
** HEP (Homer Encapsulation Protocol)
** IPFIX (for Oracle SBCs) (enable <code>ipfix*</code> options)


==== HEP (Homer Encapsulation Protocol) ====
{{Note|1=VoIPmonitor sensor runs '''exclusively on Linux'''. For Windows-based PBXs (e.g., 3CX Windows edition), you must use a dedicated Linux sensor with traffic mirroring.}}


HEP is a lightweight protocol for capturing and mirroring VoIP packets. Many SBCs and sip proxies (such as Kamailio, OpenSIPS, FreeSWITCH) support HEP to send a copy of traffic to a monitoring server.
== Dedicated Sensor ==


'''Configuration in voipmonitor.conf:'''
A separate Linux server runs only VoIPmonitor. '''Recommended for production environments''' as it isolates monitoring from voice platform resources.


<pre>
'''When Required:'''
# Enable HEP support
* Windows-based PBXs
hep = yes
* Limited CPU/RAM/disk I/O on PBX server
* Zero monitoring impact needed
* Centralized capture from multiple sites


# Port to listen for HEP packets (default: 9060)
= Traffic Forwarding Methods =
hep_bind_port = 9060


# Optional: Bind to specific IP address
When using a dedicated sensor, you must forward traffic to it using one of these methods.
# hep_bind_ip = 0.0.0.0
</pre>


When <code>hep = yes</code>, VoIPmonitor listens for HEPv3 (and compatible HEPv2) packets and extracts the original VoIP traffic from the encapsulation.
== Hardware Port Mirroring (SPAN/RSPAN) ==


'''Use Cases:'''
Physical or virtual switches copy traffic from source port(s) to a monitoring port.
* Remote SBCs or PBXs export traffic to a centralized VoIPmonitor server
* Kamailio/FreeSWITCH <code>siptrace</code> module integration
* Environments where standard tunnels (GRE/ERSPAN) are not available


'''Note:''' There is also <code>hep_kamailio_protocol_id_fix = yes</code> for Kamailio-specific protocol ID issues.
=== Physical Switch ===


'''Known Limitations:'''
Configure your switch to mirror traffic from PBX/SBC ports to the sensor's port. Consult your switch documentation for specific commands.


HEP3 packets include a timestamp field that represents when the packet was captured at the source. VoIPmonitor uses this HEP timestamp for the call record. If the source HEP server has an unreliable or unsynchronized time source, this can cause incorrect timestamps in the captured calls.
<syntaxhighlight lang="ini">
# /etc/voipmonitor.conf
interface = eth0
sipport = 5060
savertp = yes
</syntaxhighlight>


Currently, there is no built-in configuration option to ignore the HEP timestamp and instead use the time when VoIPmonitor receives the packet. If you need this functionality, please:
{{Tip|To capture from multiple interfaces, set <code>interface = any</code> and enable promiscuous mode on each NIC: <code>ip link set dev eth1 promisc on</code>}}


* Request the feature on the product roadmap (no guaranteed ETA)
=== VMware/ESXi Virtual Switch ===
* Consider a custom development project for a fee


==== Cloud Packet Mirroring (GCP, AWS, Azure) ===
For virtualized environments, VMware provides port mirroring at the virtual switch level.


Cloud providers offer native packet mirroring services that can forward traffic to a dedicated VoIPmonitor sensor. These services typically use '''VXLAN''' or '''GRE''' encapsulation.
'''Standard vSwitch:'''
# In vSphere Client, navigate to ESXi host
# Select virtual switch → Properties/Edit Settings → Enable Port Mirroring
# Set source (SBC VM) and destination (VoIPmonitor VM) ports


'''Supported Cloud Services:'''
'''Distributed vSwitch:'''
# In vSphere Web Client → Networking → Select distributed switch
# Configure tab → Port Mirroring → Create mirroring session
# Specify source/destination ports and enable


* Google Cloud Platform (GCP): Packet Mirroring
{{Note|1=Distributed switch mirroring can span multiple ESXi hosts within a cluster.}}
* Amazon Web Services (AWS): Traffic Mirroring
* Microsoft Azure: Virtual Network TAP


'''Configuration Steps:'''
=== Multiple VoIP Platforms ===


1. **Create a Dedicated Sensor VM:** Deploy a VoIPmonitor sensor instance in your cloud environment. This VM should be sized appropriately for your expected traffic volume.
Monitor multiple platforms (e.g., Mitel + FreeSWITCH) with a single sensor by mirroring multiple source ports to one destination port.


2. **Configure Cloud Mirroring Policy:** In your cloud provider's console, create a mirroring policy:
'''GUI differentiation:'''
  * Select source VMs or subnets where your VoIP traffic (PBX/SBC) originates.
* Filter by IP address ranges
  * Set the destination to the internal IP of your VoIPmonitor sensor VM.
* Filter by number prefixes
  * Ensure the encapsulation protocol is compatible with VoIPmonitor (VXLAN is recommended and most common).
* Use separate sensors with unique <code>id_sensor</code> values


3. **Critical: Bidirectional Capture:** Configure the mirroring policy to capture traffic '''in BOTH directions''':
{{Warning|1='''Critical:''' When sniffing from multiple mirrored sources, packets may arrive as duplicates. Add <code>auto_enable_use_blocks = yes</code> to voipmonitor.conf to enable automatic deduplication. See [[Sniffer_configuration#auto_enable_use_blocks|Sniffer_configuration]] for details.}}
  * <code>INGRESS</code> (incoming traffic to sources)
  * <code>EGRESS</code> (outgoing traffic from sources)
  * <code>BOTH</code> or <code>EITHER</code> is recommended


  <code>WARNING: Capturing only ingress or only egress will result in incomplete call data and broken CDRs.</code>
== Software-based Tunneling ==


4. **Configure VoIPmonitor Sensor:**
When hardware mirroring is unavailable, use software tunneling to encapsulate and forward packets.


  <pre>
{| class="wikitable"
  # Enable VXLAN support for cloud packet mirroring
! Protocol !! Configuration Parameter !! Notes
  udp_port_vxlan = 4789
|-
| IP-in-IP, GRE, ERSPAN || Built-in (auto-detected) || No additional config needed
|-
| TZSP (MikroTik) || <code>udp_port_tzsp = 37008</code> ||
|-
| L2TP || <code>udp_port_l2tp = 1701</code> ||
|-
| VXLAN || <code>udp_port_vxlan = 4789</code> || Common in cloud environments
|-
| AudioCodes || <code>udp_port_audiocodes = 925</code> || See [[Audiocodes_tunneling|AudioCodes Tunneling]]
|-
| IPFIX (Oracle SBCs) || <code>ipfix*</code> options || Enable ipfix options in config
|}


  # Interface configuration
=== HEP (Homer Encapsulation Protocol) ===
  interface = eth0


  # SIP ports
Lightweight protocol for mirroring VoIP packets. Supported by Kamailio, OpenSIPS, FreeSWITCH, and many SBCs.
  sipport = 5060


  # Optional: Filter at source to save bandwidth
<syntaxhighlight lang="ini">
  # Configure cloud mirroring filters to forward only SIP/RTP traffic
# /etc/voipmonitor.conf
  </pre>
hep = yes
hep_bind_port = 9060
hep_bind_udp = yes
# Optional: hep_kamailio_protocol_id_fix = yes
</syntaxhighlight>


5. **VM Sizing for Cloud Sensor:** Properly size the sensor VM instance:
'''Known Limitations:'''
  * <code>vCPU:</code> Allow 1-2 cores per 100 concurrent calls (adjusted for codec complexity and packet rate).
  * <code>RAM:</code> 4GB minimum for production; more if using on-disk compression or high PCAP retention.
  * <code>Storage:</code> Use SSD or high-throughput block storage for the <code>spooldir</code>. VoIPmonitor is I/O intensive — persistent disk performance is critical to avoid packet loss.
  * <code>Network:</code> Ensure sufficient NIC bandwidth; mirroring multiple high-traffic sources can saturate the sensor's interface.


6. **NTP Synchronization:** Accurate timekeeping is critical. Ensure all VMs (sources, sensor, and related infrastructure) use the cloud provider's internal NTP servers or a reliable external NTP source.
{{Warning|1='''HEP Correlation ID Not Supported:''' VoIPmonitor does NOT use HEP correlation ID (captureNodeID) to correlate SIP and RTP packets. If SIP and RTP arrive from different HEP sources, they will NOT be correlated into a single CDR.


'''Best Practices for Cloud Mirroring:'''
VoIPmonitor correlates using standard SIP Call-ID, To/From tags, and RTP SSRC fields only. Feature request VS-1703 has been logged but there is no workaround currently.}}


* <code>Filter at the Source:</code> Use cloud mirroring filters to forward only SIP signaling and RTP audio ports. Sending all network traffic (HTTP, SSH, etc.) wastes CPU and bandwidth.
'''HEP Timestamp:''' VoIPmonitor uses the HEP timestamp field. If the source has an unsynchronized clock, call timestamps will be incorrect. There is no option to ignore HEP timestamps.
* <code>Monitor Network Limits:</code> Cloud NICs have bandwidth limits (e.g., 10 Gbps). Mirroring multiple high-traffic sources may saturate the sensor VM's interface.
* <code>MTU Considerations:</code> VXLAN adds ~50 bytes of overhead. If original packets are near 1500 bytes MTU, encapsulated packets may exceed it, causing fragmentation or drops. Ensure network path supports jumbo frames or proper fragmentation handling.
* <code>Test Load:</code> Start with filtered ports and a subset of traffic, monitor performance, then expand to full production volume.


'''Alternative: Client/Server Architecture with On-Host Sensors'''
'''HEP3 with Port 0:''' Not captured by default. Add port 0 to sipport:


Instead of cloud packet mirroring, consider installing VoIPmonitor sensors directly on each PBX/SBC VM using the [[Sniffer_distributed_architecture|Client/Server architecture]]:
<syntaxhighlight lang="ini">
* Install sensor on each Asterisk/SBC VM (on-host capture)
sipport = 0,5060
* Sensors process calls locally or forward packets via <code>packetbuffer_sender</code> to a central collector
</syntaxhighlight>
* Eliminates mirroring overhead and potential incomplete capture issues
* May have better performance for high-traffic environments


== Distributed Deployment Models ==
== Cloud Packet Mirroring ==
For monitoring multiple remote offices or a large infrastructure, a distributed model is essential. This involves a central GUI/Database server collecting data from multiple remote sensors.


=== Classic Mode: Standalone Remote Sensors ===
Cloud providers offer native mirroring services using VXLAN or GRE encapsulation.
In this traditional model, each remote sensor is a fully independent entity.
* '''How it works:''' The remote sensor processes packets and stores PCAPs locally. It connects directly to the central MySQL/MariaDB database to write CDRs. For PCAP retrieval, the GUI typically needs network access to each sensor's management port (default <code>TCP/5029</code>).
* '''Pros:''' Simple conceptual model.
* '''Cons:''' Requires opening firewall ports to each sensor and managing database credentials on every remote machine.


==== Alternative PCAP Access: NFS/SSHFS Mounting ====
{| class="wikitable"
 
! Provider !! Service Name
For environments where direct TCP/5029 access to remote sensors is impractical (e.g., firewalls, VPN limitations), you can mount remote spool directories on the central GUI server using NFS or SSHFS.
|-
 
| Google Cloud || Packet Mirroring
'''Use Cases:'''
|-
* Firewall policies block TCP/5029 but allow SSH or NFS traffic
| AWS || Traffic Mirroring
* Remote sensors have local databases that need to be queried separately
|-
* You want the GUI to access PCAPs directly from mounted filesystems instead of proxying through TCP/5029
| Azure || Virtual Network TAP
|}


'''Configuration Steps:'''
'''Configuration Steps:'''


1. **Mount remote spools on GUI server:**
# Create a VoIPmonitor sensor VM in your cloud environment
 
# Create mirroring policy: select source VMs/subnets, set destination to sensor VM
  Using NFS:
# '''Critical:''' Capture traffic in '''BOTH directions''' (INGRESS and EGRESS)
  <pre>
# Configure sensor:
  # On GUI server, mount remote spool directory
  sudo mount -t nfs 10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1
  sudo mount -t nfs 10.224.0.102:/var/spool/voipmonitor /mnt/voipmonitor/sensor2
 
  # Add to /etc/fstab for persistent mounts
  10.224.0.101:/var/spool/voipmonitor  /mnt/voipmonitor/sensor1  nfs  defaults  0  0
  10.224.0.102:/var/spool/voipmonitor  /mnt/voipmonitor/sensor2  nfs  defaults  0  0
  </pre>
 
  Using SSHFS:
  <pre>
  # On GUI server, mount remote spool via SSHFS
  sshfs voipmonitor@10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1
  sshfs voipmonitor@10.224.0.102:/var/spool/voipmonitor /mnt/voipmonitor/sensor2
 
  # Add to /etc/fstab for persistent mounts (with key-based auth)
  voipmonitor@10.224.0.101:/var/spool/voipmonitor  /mnt/voipmonitor/sensor1  fuse.sshfs  defaults,IdentityFile=/home/voipmonitor/.ssh/id_rsa  0  0
  </pre>
 
2. **Configure PCAP spooldir path in GUI:**


  In the GUI, go to '''Settings > System Configuration > Sniffer data path''' and set it to search multiple spool directories. Each directory is separated by a colon (<code>:</code>).
<syntaxhighlight lang="ini">
udp_port_vxlan = 4789
interface = eth0
sipport = 5060
</syntaxhighlight>


  <pre>
{{Warning|1=Capturing only ingress or only egress results in incomplete CDRs and broken call data.}}
  Sniffer data path: /var/spool/voipmonitor:/mnt/voipmonitor/sensor1:/mnt/voipmonitor/sensor2
  </pre>


  The GUI will search these paths in order when looking for PCAP files.
'''Best Practices:'''
* Filter at source to forward only SIP/RTP ports
* Monitor NIC bandwidth limits
* Account for VXLAN overhead (~50 bytes) - may need jumbo frames
* Ensure NTP sync across all VMs


3. **Register remote sensors in GUI:**
'''Alternative:''' Consider [[Sniffer_distributed_architecture|Client/Server architecture]] with on-host sensors instead of cloud mirroring for better performance.


  Go to '''Settings > Sensors''' and register each remote sensor:
== Pre-Deployment Verification ==
  * '''Sensor ID:''' Must match <code>id_sensor</code> in each remote's <code>voipmonitor.conf</code>
  * '''Name:''' Descriptive name (e.g., "Site 1 - London")
  * '''Manager IP, Port:''' Optional with NFS/SSHFS mount (leave empty if mounting spools directly)


'''Important Notes:'''
For complex setups (RSPAN, ERSPAN, proprietary SBCs), verify compatibility before production deployment:
* Each remote sensor must have a unique <code>id_sensor</code> configured in <code>voipmonitor.conf</code>
* Remote sensors write directly to their local MySQL database (or possibly to a central database)
* Filter calls by site using the <code>id_sensor</code> column in the CDR view
* Ensure mounted directories are writable by the GUI user for PCAP uploads
* For better performance, use NFS with async or SSHFS with caching options


'''Filtering and Site Identification:'''
# Configure test mirroring with a subset of traffic
* In the CDR view, use the '''Sensor''' dropdown filter to select specific sites
# Capture test calls with tcpdump: <code>sudo tcpdump -i eth0 -s0 port 5060 -w /tmp/test.pcap</code>
* Alternatively, filter by IP address ranges using CDR columns
# Verify pcap contains SIP and RTP: <code>tshark -r /tmp/test.pcap -Y "sip || rtp"</code>
* The <code>id_sensor</code> column in the database uniquely identifies which sensor captured each call
# Submit pcap to VoIPmonitor support with hardware/configuration details
* Sensor names can be customized in '''Settings > Sensors''' for easier identification


'''Comparison: TCP/5029 vs NFS/SSHFS'''
= Distributed Architectures =
{| class="wikitable"
! Approach
! Network Traffic
! Firewall Requirements
! Performance
! Use Case
|-
| TCP/5029 Proxy (Standard)
| On-demand fetch per request
| TCP/5029 outbound from GUI to sensors
| Better (no continuous mount overhead)
| Most deployments
|-
| NFS Mount
| Continuous (filesystem access)
| NFS ports (usually 2049) bidirectional
| Excellent (local filesystem speed)
| Local networks, high-throughput
|-
| SSHFS Mount
| Continuous (encrypted filesystem)
| SSH (TCP/22) outbound from GUI
| Good (some encryption overhead)
| Remote sites, cloud/VPN
|}


=== Modern Mode: Client/Server Architecture (v20+) — Recommended ===
For multi-site monitoring, sensors can be deployed in various configurations.
This model uses a secure, encrypted TCP channel between remote sensors (clients) and a central sensor instance (server). The GUI communicates with the central server only, which significantly simplifies networking and security.


This architecture supports two primary modes:
== Classic Mode: Standalone Sensors ==
# '''Local Processing:''' Remote sensors process packets locally and send only lightweight CDR data over the encrypted channel. PCAPs remain on the remote sensor. On-demand PCAP fetch is proxied via the central server (to the sensor's <code>TCP/5029</code>).
# '''Packet Mirroring:''' Remote sensors forward the entire raw packet stream to the central server, which performs all processing and storage. Ideal for low-resource remote sites.


==== Architecture Diagrams (PlantUML) ====
Each sensor operates independently:
* Processes packets and stores PCAPs locally
* Connects directly to central MySQL to write CDRs
* GUI needs network access to each sensor's <code>TCP/5029</code> for PCAP retrieval


<kroki lang="plantuml">
'''Alternative: NFS/SSHFS Mounting'''
  @startuml
  skinparam shadowing false
  skinparam defaultFontName Arial
  skinparam rectangle {
    BorderColor #4A90E2
    BackgroundColor #FFFFFF
    stereotypeFontColor #333333
  }
  skinparam packageBorderColor #B0BEC5
  skinparam packageBackgroundColor #F7F9FC


  title Client/Server Architecture — Local Processing Mode
If TCP/5029 access is blocked, mount remote spool directories on the GUI server:


  package "Remote Site" {
<syntaxhighlight lang="bash">
    [Remote Probe/Sensor] as Remote
# NFS mount
    database "Local Storage (PCAP)" as RemotePCAP
sudo mount -t nfs 10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1
  }


  package "Central Site" {
# SSHFS mount
    [Central VoIPmonitor Server] as Central
sshfs voipmonitor@10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1
    database "Central MySQL/MariaDB" as CentralDB
</syntaxhighlight>
    [Web GUI] as GUI
  }


  Remote -[#2F6CB0]-> Central : Encrypted TCP/60024\nCDRs only
Configure GUI: '''Settings > System Configuration > Sniffer data path:'''
  Remote --> RemotePCAP : Stores PCAP locally
<code>/var/spool/voipmonitor:/mnt/voipmonitor/sensor1:/mnt/voipmonitor/sensor2</code>
  Central --> CentralDB : Writes CDRs
  GUI -[#2F6CB0]-> Central : Queries data & requests PCAPs
  Central -[#2F6CB0]-> RemotePCAP : Fetches PCAPs on demand (TCP/5029)
  @enduml
  </kroki>


<kroki lang="plantuml">
{{Tip|For NFS, use <code>hard,nofail,tcp</code> mount options for reliability.}}
  @startuml
  skinparam shadowing false
  skinparam defaultFontName Arial
  skinparam rectangle {
    BorderColor #4A90E2
    BackgroundColor #FFFFFF
    stereotypeFontColor #333333
  }
  skinparam packageBorderColor #B0BEC5
  skinparam packageBackgroundColor #F7F9FC


  title Client/Server Architecture Packet Mirroring Mode
== Modern Mode: Client/Server (v20+) Recommended ==


  package "Remote Site" {
Secure encrypted TCP channel between remote sensors and central server. GUI communicates only with central server.
    [Remote Probe/Sensor\n(Low Resource)] as Remote
  }


  package "Central Site" {
<kroki lang="mermaid">
     [Central VoIPmonitor Server] as Central
%%{init: {'flowchart': {'nodeSpacing': 10, 'rankSpacing': 25}}}%%
    database "Central MySQL/MariaDB" as CentralDB
flowchart LR
    database "Central Storage (PCAP)" as CentralPCAP
     subgraph "Local Processing"
     [Web GUI] as GUI
        R1[Remote Sensor] -->|CDRs only| C1[Central Server]
  }
        R1 -.->|PCAP on demand| C1
     end


  Remote -[#2F6CB0]-> Central : Encrypted TCP/60024\nRaw packet stream
    subgraph "Packet Mirroring"
  Central --> CentralDB : Writes CDRs
        R2[Remote Sensor] -->|Raw packets| C2[Central Server]
  Central --> CentralPCAP : Processes & stores PCAPs
    end
  GUI -[#2F6CB0]-> Central : Queries data & downloads PCAPs
</kroki>
  @enduml
  </kroki>


==== Step-by-Step Configuration Guide ====
{| class="wikitable"
! Mode !! Processing !! PCAP Storage !! WAN Traffic !! Best For
|-
| '''Local Processing''' (<code>packetbuffer_sender=no</code>) || Remote || Remote || Low (CDRs only) || Limited WAN bandwidth
|-
| '''Packet Mirroring''' (<code>packetbuffer_sender=yes</code>) || Central || Central || High (full packets) || Low-resource remote sites
|}


; Prerequisites
For detailed configuration, see [[Sniffer_distributed_architecture|Distributed Architecture: Client-Server Mode]].
* VoIPmonitor v20+ on all sensors.
* Central database reachable from the central server instance.
* Unique <code>id_sensor</code> per sensor (< 65536).
* NTP running everywhere (see '''Time Synchronization''' below).


; Scenario A — Local Processing (default, low WAN usage)
'''Quick Start - Remote Sensor (Local Processing):'''
<pre>
# /etc/voipmonitor.conf on the REMOTE sensor (LOCAL PROCESSING)


id_sensor              = 2         # unique per sensor (< 65536)
<syntaxhighlight lang="ini">
id_sensor              = 2
server_destination      = 10.224.0.250
server_destination      = 10.224.0.250
server_destination_port = 60024
server_destination_port = 60024
server_password        = your_strong_password
server_password        = your_strong_password
packetbuffer_sender    = no
interface              = eth0
sipport                = 5060
# No MySQL credentials needed - central server writes to DB
</syntaxhighlight>


packetbuffer_sender    = no        # local analysis; sends only CDRs
'''Quick Start - Central Server:'''
interface              = eth0      # or: interface = any
sipport                = 5060      # example; add your usual sniffer options
 
# No MySQL credentials here — remote sensor does NOT write to DB directly.
</pre>
 
<pre>
# /etc/voipmonitor.conf on the CENTRAL server (LOCAL PROCESSING network)


<syntaxhighlight lang="ini">
server_bind            = 0.0.0.0
server_bind            = 0.0.0.0
server_bind_port        = 60024
server_bind_port        = 60024
server_password        = your_strong_password
server_password        = your_strong_password
mysqlhost              = 10.224.0.201
mysqlhost              = 10.224.0.201
mysqldb                = voipmonitor
mysqldb                = voipmonitor
mysqluser              = voipmonitor
mysqluser              = voipmonitor
mysqlpassword          = db_password
mysqlpassword          = db_password
cdr_partition          = yes
interface              =  # Leave empty - don't sniff locally
</syntaxhighlight>


cdr_partition          = yes        # partitions for CDR tables
== Firewall Requirements ==
mysqlloadconfig        = yes        # allows DB-driven config if used


interface              =           # leave empty to avoid local sniffing
{| class="wikitable"
# The central server will proxy on-demand PCAP fetches to sensors (TCP/5029).
! Deployment !! Port !! Direction !! Purpose
</pre>
|-
| Client/Server || TCP/60024 || Remote → Central || Encrypted CDR/packet channel
|-
| Client/Server || TCP/5029 || Central → Remote || On-demand PCAP fetch (Local Processing mode)
|-
| GUI Access || TCP/5029 || GUI → Central || Management/API
|-
| Cloud Mode || TCP/60023 || Sensor → cloud.voipmonitor.org || Cloud service connection
|}


; Scenario B — Packet Mirroring (centralized processing/storage)
= Configuration Notes =
<pre>
# /etc/voipmonitor.conf on the REMOTE sensor (PACKET MIRRORING)


id_sensor              = 3
== Critical Parameters ==
server_destination      = 10.224.0.250
server_destination_port = 60024
server_password        = your_strong_password


packetbuffer_sender    = yes        # send RAW packet stream to central
{| class="wikitable"
interface              = eth0      # capture source; no DB settings needed
! Parameter !! Description !! Notes
</pre>
|-
 
| <code>id_sensor</code> || Unique sensor identifier (1-65535) || '''Mandatory''' in distributed deployments
<pre>
|-
# /etc/voipmonitor.conf on the CENTRAL server (PACKET MIRRORING)
| <code>cdr_partition</code> || Enable daily CDR table partitions || Enable on server writing to DB
|-
| <code>mysqlloadconfig</code> || Load config from database || Enable on central server only
|-
| <code>interface</code> || Capture interface || Use specific NIC or <code>any</code>
|}


server_bind            = 0.0.0.0
== Time Synchronization ==
server_bind_port        = 60024
server_password        = your_strong_password


mysqlhost              = 10.224.0.201
{{Warning|1=Accurate NTP sync is '''critical''' for correlating call legs across sensors. All servers (GUI, DB, sensors) must run NTP client (chrony or ntpd).}}
mysqldb                = voipmonitor
mysqluser              = voipmonitor
mysqlpassword          = db_password


cdr_partition          = yes
== First Startup ==
mysqlloadconfig        = yes


# As this server does all analysis, configure as if sniffing locally:
On first start against empty database:
sipport                = 5060
# Start service: <code>systemctl start voipmonitor</code>
# ... add your usual sniffer/storage options (pcap directories, limits, etc.)
# Monitor logs: <code>journalctl -u voipmonitor -f</code>
</pre>
# Wait for schema/partition creation to complete


==== Firewall Checklist (Quick Reference) ====
If you see <code>Table 'cdr_next_1' doesn't exist</code> errors, check DB connectivity and privileges.
* '''Modern Client/Server (v20+):'''
** '''Central Server:''' Allow inbound <code>TCP/60024</code> from remote sensors. Allow inbound <code>TCP/5029</code> from GUI (management/API to central sensor).
** '''Remote Sensors (Local Processing only):''' Allow inbound <code>TCP/5029</code> from the central server (for on-demand PCAP fetch via proxy). Outbound <code>TCP/60024</code> to the central server.
* '''Cloud Mode:'''
** '''Remote Sensors:''' Allow outbound <code>TCP/60023</code> to <code>cloud.voipmonitor.org</code>.


== Configuration & Checklists ==
= Deployment Comparison =


=== Parameter Notes (clarifications) ===
{| class="wikitable"
* '''<code>id_sensor</code>''' — Mandatory in any distributed deployment (Classic or Client/Server). Must be unique per sensor (< 65536). The value is written to the database and used by the GUI to identify where a call was captured.
! Model !! Processing !! PCAP Storage !! WAN Traffic !! GUI Connectivity
* '''<code>cdr_partition</code>''' — In Client/Server, enable on the central server instance that writes to the database. It can be disabled on remote "client" sensors that only mirror packets.
|-
* '''<code>mysqlloadconfig</code>''' — When enabled, the sensor can load additional parameters dynamically from the <code>sensor_config</code> table in the database. Typically enabled on the central server sensor that writes to DB; keep disabled on remote clients which do not access DB directly.
| Classic Standalone || Remote || Remote || Minimal (MySQL CDRs) || GUI ↔ each Sensor
* '''<code>interface</code>''' — Use a specific NIC (e.g., <code>eth0</code>) or <code>any</code> to capture from multiple NICs. For <code>any</code> ensure promiscuous mode on each NIC.
|-
| '''Client/Server (Local Processing)''' || Remote || Remote || Minimal (encrypted CDRs) || '''GUI ↔ Central only'''
|-
| '''Client/Server (Packet Mirroring)''' || Central || Central || High (encrypted packets) || '''GUI ↔ Central only'''
|}


=== Initial Service Start & Database Initialization ===
= Troubleshooting =
After installation, the '''first startup''' against a new/empty database is critical.
# Start the service: <code>systemctl start voipmonitor</code>
# Follow logs to ensure schema/partition creation completes:
#* <code>journalctl -u voipmonitor -f</code>
#* or <code>tail -f /var/log/syslog | grep voipmonitor</code>


You should see creation of functions and partitions shortly after start. If you see errors like <code>Table 'cdr_next_1' doesn't exist</code>, the sensor is failing to initialize the schema — usually due to insufficient DB privileges or connectivity. Fix DB access and restart the sensor so it can finish initialization.
== NFS/SSHFS Connectivity ==


=== Time Synchronization ===
Missing data for specific time periods usually indicates storage server connectivity issues.
Accurate and synchronized time is '''critical''' for correlating call legs from different sensors. All servers (GUI, DB, and all Sensors) must run an NTP client (e.g., <code>chrony</code> or <code>ntpdate</code>) to keep clocks in sync.


== Comparison of Remote Deployment Modes ==
{| class="wikitable"
{| class="wikitable"
! Deployment Model
! Symptom !! Likely Cause !! Solution
! Packet Processing Location
|-
! PCAP Storage Location
| Data gap in time period || NFS/SSHFS server unreachable || Check logs for "not responding, timed out"
! Network Traffic to Central Server
! GUI Connectivity
|-
|-
| Classic Standalone
| Stale file handle || Server rebooted or export changed || Remount NFS share
| Remote
| Remote
| Minimal (MySQL CDRs)
| GUI ↔ each Sensor (management port)
|-
|-
| '''Modern Client/Server (Local Processing)'''
| Connection resets || Network interruption || Check network stability
| Remote
| Remote
| Minimal (Encrypted CDRs)
| '''GUI ↔ Central Server only''' (central proxies PCAP fetch)
|-
|-
| '''Modern Client/Server (Packet Mirroring)'''
| GUI shows "File not found" || Mount point dismounted || Verify mount with <code>mount | grep nfs</code>
| '''Central'''
| '''Central'''
| High (Encrypted full packets)
| '''GUI ↔ Central Server only'''
|}
|}


== FAQ & Common Pitfalls ==
<syntaxhighlight lang="bash">
* '''Do remote sensors need DB credentials in Client/Server?''' No. Only the central server instance writes to DB.
# Check for NFS errors
* '''Why is <code>id_sensor</code> required everywhere?''' The GUI uses it to tag and filter calls by capture source.
grep "nfs: server.*not responding" /var/log/syslog
* '''Local Processing still fetches PCAPs from remote — who connects to whom?''' The GUI requests via the central server; the central server then connects to the remote sensor's <code>TCP/5029</code> to retrieve the PCAP.
grep "nfs.*timed out" /var/log/syslog
== AI Summary for RAG ==
 
'''Summary:''' This guide covers the deployment topologies for VoIPmonitor. It contrasts running the sensor on the same host as a PBX versus on a dedicated server. For dedicated sensors, it details methods for forwarding traffic, including hardware-based port mirroring (SPAN) and various software-based tunneling protocols (IP-in-IP, GRE, TZSP, VXLAN, HEP, AudioCodes, IPFIX). The article covers cloud service packet mirroring options (GCP Packet Mirroring, AWS Traffic Mirroring, Azure Virtual Network TAP) with critical requirements: bidirectional capture (ingress and egress) and proper VM sizing (vCPU, RAM, storage I/O). The core of the article explains distributed architectures for multi-site monitoring, comparing the "classic" standalone remote sensor model with the modern, recommended "client/server" model. It details the two operational modes of the client/server architecture: local processing (sending only CDRs, PCAPs remain remote with central-proxied fetch) and packet mirroring (sending full, raw packets for central processing), which is ideal for low-resource endpoints. The article also explains an alternative approach for classic remote sensors: mounting PCAP spools via NFS or SSHFS when TCP/5029 access to sensors is blocked by firewalls. The guide concludes with step-by-step configuration, firewall rules, critical parameter notes, and the importance of NTP plus first-start DB initialization.
# Verify mount status
mount | grep nfs
stat /mnt/voipmonitor/sensor1
</syntaxhighlight>
 
= See Also =
 
* [[Sniffer_distributed_architecture|Distributed Architecture: Client-Server Mode]] - Detailed client/server configuration
* [[Sniffer_troubleshooting|Sniffer Troubleshooting]] - Diagnostic procedures
* [[Audiocodes_tunneling|AudioCodes Tunneling]] - AudioCodes SBC integration
* [[Tls|TLS/SRTP Decryption]] - Encrypted traffic monitoring
* [[Cloud|Cloud Service Configuration]] - Cloud deployment specifics
* [[Scaling|Scaling and Performance Tuning]] - Performance optimization
 
= AI Summary for RAG =
 
'''Summary:''' VoIPmonitor deployment guide covering sensor placement (on-host vs dedicated), traffic forwarding methods (SPAN/RSPAN, software tunneling, cloud mirroring), and distributed architectures. Key traffic forwarding options: hardware port mirroring (physical/VMware switches), software tunnels (GRE, ERSPAN, TZSP, VXLAN, HEP, AudioCodes, IPFIX), and cloud provider services (GCP Packet Mirroring, AWS Traffic Mirroring, Azure Virtual Network TAP). CRITICAL HEP LIMITATION: VoIPmonitor does NOT use HEP correlation ID (captureNodeID) - SIP and RTP from different HEP sources will NOT be correlated (feature request VS-1703, no workaround). HEP3 packets with port 0 require adding port 0 to sipport directive. Cloud mirroring requires BIDIRECTIONAL capture (ingress+egress) or CDRs will be incomplete. Distributed architectures: Classic standalone (each sensor writes to central DB, GUI connects to each sensor) vs Modern Client/Server (recommended, encrypted TCP/60024 channel, GUI connects only to central server). Client/Server modes: Local Processing (packetbuffer_sender=no, CDRs only, PCAPs remain remote) vs Packet Mirroring (packetbuffer_sender=yes, full packets sent to central). Alternative for blocked TCP/5029: mount remote spools via NFS/SSHFS, configure multiple paths in GUI Sniffer data path setting. NFS troubleshooting: check for "not responding, timed out" in logs, verify mount status, use hard,nofail,tcp mount options. Critical requirement: NTP sync across all servers.


'''Keywords:''' deployment, architecture, topology, on-host, dedicated sensor, port mirroring, SPAN, RSPAN, traffic mirroring, tunneling, GRE, TZSP, VXLAN, HEP, AudioCodes, IPFIX, cloud mirroring, GCP, AWS, Azure, Packet Mirroring, Traffic Mirroring, Virtual Network TAP, ingress, egress, bidirectional, VM sizing, remote sensor, multi-site, client server mode, packet mirroring, local processing, firewall rules, NTP, time synchronization, cloud mode, NFS, SSHFS, spooldir mounting
'''Keywords:''' deployment, topology, on-host, dedicated sensor, SPAN, RSPAN, port mirroring, VMware, vSwitch, dvSwitch, tunneling, GRE, ERSPAN, TZSP, VXLAN, HEP, HEP correlation ID, captureNodeID, VS-1703, HEP port 0, sipport, AudioCodes, IPFIX, cloud mirroring, GCP, AWS, Azure, Packet Mirroring, Traffic Mirroring, ingress, egress, bidirectional, client server, packetbuffer_sender, local processing, packet mirroring, TCP 60024, TCP 5029, NFS, SSHFS, sniffer data path, NTP, time synchronization, id_sensor, cdr_partition


'''Key Questions:'''
'''Key Questions:'''
* Can I use cloud packet mirroring (GCP/AWS/Azure) with VoIPmonitor?
* Should I install VoIPmonitor on my PBX or use a dedicated sensor?
* How should I configure cloud packet mirroring for ingress and egress traffic?
* How do I configure port mirroring (SPAN) for VoIPmonitor?
* What is the difference between the classic remote sensor and the modern client/server mode?
* How do I configure VMware/ESXi virtual switch mirroring?
* When should I use packet mirroring (<code>packetbuffer_sender</code>) instead of local processing?
* What software tunneling protocols does VoIPmonitor support?
* What are the firewall requirements for the client/server deployment model?
* How do I configure HEP (Homer Encapsulation Protocol)?
* How can I access PCAP files from remote sensors if TCP/5029 is blocked?
* Does VoIPmonitor use HEP correlation ID to correlate SIP and RTP?
* How do I configure NFS or SSHFS to mount remote PCAP spools?
* Why are SIP and RTP from different HEP sources not correlated?
* How do I configure the GUI sniffer data path for multiple mounted spools?
* How do I capture HEP3 packets with port 0?
* Can I run the sensor on the same machine as my Asterisk/FreeSWITCH server?
* How do I configure cloud packet mirroring (GCP/AWS/Azure)?
* What is a SPAN port and how is it used with VoIPmonitor?
* Why do I get incomplete CDRs with cloud mirroring?
* Why is NTP important for a distributed VoIPmonitor setup?
* What is the difference between classic and client/server deployment?
* What is HEP and how do I configure VoIPmonitor to receive HEP packets?
* What is the difference between local processing and packet mirroring mode?
* How do I configure GRE, ERSPAN, and VXLAN tunneling for VoIPmonitor?
* How do I access PCAPs if TCP/5029 is blocked?
* How do I configure NFS/SSHFS for remote spool access?
* How do I troubleshoot missing data with NFS mounts?
* What firewall ports are required for client/server mode?
* Why is NTP important for distributed VoIPmonitor?

Latest revision as of 16:49, 8 January 2026


This guide covers VoIPmonitor deployment options: where to install the sensor, how to forward traffic, and distributed architectures for multi-site monitoring.

Sensor Deployment Options

On-Host Capture

Install the sensor directly on the same Linux server as your PBX/SBC.

Pros Cons
No extra hardware, network changes, or port mirroring required Adds CPU, memory, and disk I/O load to production voice server
Simplest setup Not suitable if resources are critical

ℹ️ Note: VoIPmonitor sensor runs exclusively on Linux. For Windows-based PBXs (e.g., 3CX Windows edition), you must use a dedicated Linux sensor with traffic mirroring.

Dedicated Sensor

A separate Linux server runs only VoIPmonitor. Recommended for production environments as it isolates monitoring from voice platform resources.

When Required:

  • Windows-based PBXs
  • Limited CPU/RAM/disk I/O on PBX server
  • Zero monitoring impact needed
  • Centralized capture from multiple sites

Traffic Forwarding Methods

When using a dedicated sensor, you must forward traffic to it using one of these methods.

Hardware Port Mirroring (SPAN/RSPAN)

Physical or virtual switches copy traffic from source port(s) to a monitoring port.

Physical Switch

Configure your switch to mirror traffic from PBX/SBC ports to the sensor's port. Consult your switch documentation for specific commands.

# /etc/voipmonitor.conf
interface = eth0
sipport = 5060
savertp = yes

💡 Tip:

VMware/ESXi Virtual Switch

For virtualized environments, VMware provides port mirroring at the virtual switch level.

Standard vSwitch:

  1. In vSphere Client, navigate to ESXi host
  2. Select virtual switch → Properties/Edit Settings → Enable Port Mirroring
  3. Set source (SBC VM) and destination (VoIPmonitor VM) ports

Distributed vSwitch:

  1. In vSphere Web Client → Networking → Select distributed switch
  2. Configure tab → Port Mirroring → Create mirroring session
  3. Specify source/destination ports and enable

ℹ️ Note: Distributed switch mirroring can span multiple ESXi hosts within a cluster.

Multiple VoIP Platforms

Monitor multiple platforms (e.g., Mitel + FreeSWITCH) with a single sensor by mirroring multiple source ports to one destination port.

GUI differentiation:

  • Filter by IP address ranges
  • Filter by number prefixes
  • Use separate sensors with unique id_sensor values

⚠️ Warning: Critical: When sniffing from multiple mirrored sources, packets may arrive as duplicates. Add auto_enable_use_blocks = yes to voipmonitor.conf to enable automatic deduplication. See Sniffer_configuration for details.

Software-based Tunneling

When hardware mirroring is unavailable, use software tunneling to encapsulate and forward packets.

Protocol Configuration Parameter Notes
IP-in-IP, GRE, ERSPAN Built-in (auto-detected) No additional config needed
TZSP (MikroTik) udp_port_tzsp = 37008
L2TP udp_port_l2tp = 1701
VXLAN udp_port_vxlan = 4789 Common in cloud environments
AudioCodes udp_port_audiocodes = 925 See AudioCodes Tunneling
IPFIX (Oracle SBCs) ipfix* options Enable ipfix options in config

HEP (Homer Encapsulation Protocol)

Lightweight protocol for mirroring VoIP packets. Supported by Kamailio, OpenSIPS, FreeSWITCH, and many SBCs.

# /etc/voipmonitor.conf
hep = yes
hep_bind_port = 9060
hep_bind_udp = yes
# Optional: hep_kamailio_protocol_id_fix = yes

Known Limitations:

⚠️ Warning: HEP Correlation ID Not Supported: VoIPmonitor does NOT use HEP correlation ID (captureNodeID) to correlate SIP and RTP packets. If SIP and RTP arrive from different HEP sources, they will NOT be correlated into a single CDR.

VoIPmonitor correlates using standard SIP Call-ID, To/From tags, and RTP SSRC fields only. Feature request VS-1703 has been logged but there is no workaround currently.

HEP Timestamp: VoIPmonitor uses the HEP timestamp field. If the source has an unsynchronized clock, call timestamps will be incorrect. There is no option to ignore HEP timestamps.

HEP3 with Port 0: Not captured by default. Add port 0 to sipport:

sipport = 0,5060

Cloud Packet Mirroring

Cloud providers offer native mirroring services using VXLAN or GRE encapsulation.

Provider Service Name
Google Cloud Packet Mirroring
AWS Traffic Mirroring
Azure Virtual Network TAP

Configuration Steps:

  1. Create a VoIPmonitor sensor VM in your cloud environment
  2. Create mirroring policy: select source VMs/subnets, set destination to sensor VM
  3. Critical: Capture traffic in BOTH directions (INGRESS and EGRESS)
  4. Configure sensor:
udp_port_vxlan = 4789
interface = eth0
sipport = 5060

⚠️ Warning: Capturing only ingress or only egress results in incomplete CDRs and broken call data.

Best Practices:

  • Filter at source to forward only SIP/RTP ports
  • Monitor NIC bandwidth limits
  • Account for VXLAN overhead (~50 bytes) - may need jumbo frames
  • Ensure NTP sync across all VMs

Alternative: Consider Client/Server architecture with on-host sensors instead of cloud mirroring for better performance.

Pre-Deployment Verification

For complex setups (RSPAN, ERSPAN, proprietary SBCs), verify compatibility before production deployment:

  1. Configure test mirroring with a subset of traffic
  2. Capture test calls with tcpdump: sudo tcpdump -i eth0 -s0 port 5060 -w /tmp/test.pcap
  3. Verify pcap contains SIP and RTP: tshark -r /tmp/test.pcap -Y "sip || rtp"
  4. Submit pcap to VoIPmonitor support with hardware/configuration details

Distributed Architectures

For multi-site monitoring, sensors can be deployed in various configurations.

Classic Mode: Standalone Sensors

Each sensor operates independently:

  • Processes packets and stores PCAPs locally
  • Connects directly to central MySQL to write CDRs
  • GUI needs network access to each sensor's TCP/5029 for PCAP retrieval

Alternative: NFS/SSHFS Mounting

If TCP/5029 access is blocked, mount remote spool directories on the GUI server:

# NFS mount
sudo mount -t nfs 10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1

# SSHFS mount
sshfs voipmonitor@10.224.0.101:/var/spool/voipmonitor /mnt/voipmonitor/sensor1

Configure GUI: Settings > System Configuration > Sniffer data path: /var/spool/voipmonitor:/mnt/voipmonitor/sensor1:/mnt/voipmonitor/sensor2

💡 Tip: For NFS, use hard,nofail,tcp mount options for reliability.

Modern Mode: Client/Server (v20+) — Recommended

Secure encrypted TCP channel between remote sensors and central server. GUI communicates only with central server.

Mode Processing PCAP Storage WAN Traffic Best For
Local Processing (packetbuffer_sender=no) Remote Remote Low (CDRs only) Limited WAN bandwidth
Packet Mirroring (packetbuffer_sender=yes) Central Central High (full packets) Low-resource remote sites

For detailed configuration, see Distributed Architecture: Client-Server Mode.

Quick Start - Remote Sensor (Local Processing):

id_sensor               = 2
server_destination      = 10.224.0.250
server_destination_port = 60024
server_password         = your_strong_password
packetbuffer_sender     = no
interface               = eth0
sipport                 = 5060
# No MySQL credentials needed - central server writes to DB

Quick Start - Central Server:

server_bind             = 0.0.0.0
server_bind_port        = 60024
server_password         = your_strong_password
mysqlhost               = 10.224.0.201
mysqldb                 = voipmonitor
mysqluser               = voipmonitor
mysqlpassword           = db_password
cdr_partition           = yes
interface               =   # Leave empty - don't sniff locally

Firewall Requirements

Deployment Port Direction Purpose
Client/Server TCP/60024 Remote → Central Encrypted CDR/packet channel
Client/Server TCP/5029 Central → Remote On-demand PCAP fetch (Local Processing mode)
GUI Access TCP/5029 GUI → Central Management/API
Cloud Mode TCP/60023 Sensor → cloud.voipmonitor.org Cloud service connection

Configuration Notes

Critical Parameters

Parameter Description Notes
id_sensor Unique sensor identifier (1-65535) Mandatory in distributed deployments
cdr_partition Enable daily CDR table partitions Enable on server writing to DB
mysqlloadconfig Load config from database Enable on central server only
interface Capture interface Use specific NIC or any

Time Synchronization

⚠️ Warning: Accurate NTP sync is critical for correlating call legs across sensors. All servers (GUI, DB, sensors) must run NTP client (chrony or ntpd).

First Startup

On first start against empty database:

  1. Start service: systemctl start voipmonitor
  2. Monitor logs: journalctl -u voipmonitor -f
  3. Wait for schema/partition creation to complete

If you see Table 'cdr_next_1' doesn't exist errors, check DB connectivity and privileges.

Deployment Comparison

Model Processing PCAP Storage WAN Traffic GUI Connectivity
Classic Standalone Remote Remote Minimal (MySQL CDRs) GUI ↔ each Sensor
Client/Server (Local Processing) Remote Remote Minimal (encrypted CDRs) GUI ↔ Central only
Client/Server (Packet Mirroring) Central Central High (encrypted packets) GUI ↔ Central only

Troubleshooting

NFS/SSHFS Connectivity

Missing data for specific time periods usually indicates storage server connectivity issues.

Symptom Likely Cause Solution
Data gap in time period NFS/SSHFS server unreachable Check logs for "not responding, timed out"
Stale file handle Server rebooted or export changed Remount NFS share
Connection resets Network interruption Check network stability
GUI shows "File not found" Mount point dismounted grep nfs
# Check for NFS errors
grep "nfs: server.*not responding" /var/log/syslog
grep "nfs.*timed out" /var/log/syslog

# Verify mount status
mount | grep nfs
stat /mnt/voipmonitor/sensor1

See Also

AI Summary for RAG

Summary: VoIPmonitor deployment guide covering sensor placement (on-host vs dedicated), traffic forwarding methods (SPAN/RSPAN, software tunneling, cloud mirroring), and distributed architectures. Key traffic forwarding options: hardware port mirroring (physical/VMware switches), software tunnels (GRE, ERSPAN, TZSP, VXLAN, HEP, AudioCodes, IPFIX), and cloud provider services (GCP Packet Mirroring, AWS Traffic Mirroring, Azure Virtual Network TAP). CRITICAL HEP LIMITATION: VoIPmonitor does NOT use HEP correlation ID (captureNodeID) - SIP and RTP from different HEP sources will NOT be correlated (feature request VS-1703, no workaround). HEP3 packets with port 0 require adding port 0 to sipport directive. Cloud mirroring requires BIDIRECTIONAL capture (ingress+egress) or CDRs will be incomplete. Distributed architectures: Classic standalone (each sensor writes to central DB, GUI connects to each sensor) vs Modern Client/Server (recommended, encrypted TCP/60024 channel, GUI connects only to central server). Client/Server modes: Local Processing (packetbuffer_sender=no, CDRs only, PCAPs remain remote) vs Packet Mirroring (packetbuffer_sender=yes, full packets sent to central). Alternative for blocked TCP/5029: mount remote spools via NFS/SSHFS, configure multiple paths in GUI Sniffer data path setting. NFS troubleshooting: check for "not responding, timed out" in logs, verify mount status, use hard,nofail,tcp mount options. Critical requirement: NTP sync across all servers.

Keywords: deployment, topology, on-host, dedicated sensor, SPAN, RSPAN, port mirroring, VMware, vSwitch, dvSwitch, tunneling, GRE, ERSPAN, TZSP, VXLAN, HEP, HEP correlation ID, captureNodeID, VS-1703, HEP port 0, sipport, AudioCodes, IPFIX, cloud mirroring, GCP, AWS, Azure, Packet Mirroring, Traffic Mirroring, ingress, egress, bidirectional, client server, packetbuffer_sender, local processing, packet mirroring, TCP 60024, TCP 5029, NFS, SSHFS, sniffer data path, NTP, time synchronization, id_sensor, cdr_partition

Key Questions:

  • Should I install VoIPmonitor on my PBX or use a dedicated sensor?
  • How do I configure port mirroring (SPAN) for VoIPmonitor?
  • How do I configure VMware/ESXi virtual switch mirroring?
  • What software tunneling protocols does VoIPmonitor support?
  • How do I configure HEP (Homer Encapsulation Protocol)?
  • Does VoIPmonitor use HEP correlation ID to correlate SIP and RTP?
  • Why are SIP and RTP from different HEP sources not correlated?
  • How do I capture HEP3 packets with port 0?
  • How do I configure cloud packet mirroring (GCP/AWS/Azure)?
  • Why do I get incomplete CDRs with cloud mirroring?
  • What is the difference between classic and client/server deployment?
  • What is the difference between local processing and packet mirroring mode?
  • How do I access PCAPs if TCP/5029 is blocked?
  • How do I configure NFS/SSHFS for remote spool access?
  • How do I troubleshoot missing data with NFS mounts?
  • What firewall ports are required for client/server mode?
  • Why is NTP important for distributed VoIPmonitor?