Register: Difference between revisions

From VoIPmonitor.org
(Add explanation that Active tab error is expected behavior when sip-register is disabled - data comes from sniffer processes, not database)
(Add troubleshooting section for cases where traffic is present but registration data is missing)
Line 60: Line 60:


If you want to enable persistent storage of registration history, add sip-register = yes to /etc/voipmonitor.conf and restart the sniffer. This will create the database tables and eliminate the error message, but it is optional for basic registration monitoring.
If you want to enable persistent storage of registration history, add sip-register = yes to /etc/voipmonitor.conf and restart the sniffer. This will create the database tables and eliminate the error message, but it is optional for basic registration monitoring.
= Troubleshooting: Registration Data Missing Despite Traffic Being Present =
If SIP registration information is missing from the GUI even though traffic is confirmed present on your network mirror port, the issue is likely with packet capture rather than the sip-register configuration. Follow these troubleshooting steps:
;1. Verify packets are reaching the sensor host:
Run a packet capture directly on the sensor to verify REGISTER packets are arriving at the interface. Use <code>tcpdump</code> or <code>tshark</code> on the correct interface:
<syntaxhighlight lang="bash">
# Check for REGISTER packets on the sensor interface
tcpdump -i napa0 -s 0 -c 10 "port 5060 and udp"
# Or use tshark for more detailed analysis
tshark -i napa0 -Y "sip.Method == REGISTER" -c 10
</syntaxhighlight>
If no packets appear, the problem is with your network mirroring configuration (SPAN/TAP). See [[Sniffer_troubleshooting]] for detailed packet capture troubleshooting.
;2. Check for packet drops in the GUI:
Navigate to '''Settings → Sensors''' in the VoIPmonitor GUI. Expand the sensor details and check the '''# packet drops''' counter.
{| class="wikitable"
|-
! Packet Drops Value ! Meaning ! Action
|-
| 0 | Normal | No drop issues
|-
| Non-zero value | Sensor is dropping packets | See [[Sniffer_troubleshooting#Check_Sensor_Statistics_in_GUI|Sniffer Troubleshooting: Sensor Statistics]]
|}
;3. If using Napatech hardware:
Standard capture tools may show no packets if Napatech interfaces are in a DOWN state. This is a common issue with Napatech cards.
Check interface status:
<syntaxhighlight lang="bash">
ip link show napa0
</syntaxhighlight>
If the interface shows DOWN instead of UP, the solution is to use a custom <code>libpcap</code> library provided by Napatech. See [[Napatech#Troubleshooting:_Napatech_Interfaces_in_DOWN_State|Napatech Troubleshooting]] for detailed steps to:
* Check if Napatech drivers are loaded
* Verify voipmonitor is linked against Napatech libpcap
* Rebuild the sniffer with the correct library
The key command to verify:
<syntaxhighlight lang="bash">
# Check which libpcap voipmonitor is using
ldd /usr/local/sbin/voipmonitor | grep pcap
# Should show: /opt/napatech3/lib/libpcap.so.1
# NOT: /lib/x86_64-linux-gnu/libpcap.so.1
</syntaxhighlight>
;4. Additional troubleshooting resources:
* [[Sniffer_troubleshooting]] - Comprehensive guide for diagnosing packet capture issues
* [[Sniffer_troubleshooting#Is_Network_Traffic_Reaching_the_Server|Network traffic verification with tshark]]
* [[Sniffer_troubleshooting#Check_the_VoIPmonitor_Configuration]] - Verify interface, sipport, and filter settings

Revision as of 02:32, 5 January 2026

The SIP Register section shows three tables - Active registered SIP users, Failed registrations and State changes in SIP registrations. Those tables are filled once you enable sip-register = yes in /etc/voipmonitor.conf.

By default PCAP files are not saved for SIP register messages (it can easily overload file system). If you need to record SIP messages you can control this in capture rules main section and here in all three sections there are gray/red small circles which indicates if SIP messages are being recorded to pcap file so it can be retrieved by clicking on PCAP link. Clicking on the circle enables / disables recording. In the dialog window you can adjust values and set auto remove for the rule at specific date. Note: If you need to record all register packets by the sniffer instance without need to create capture rules in a GUI use sip-register-save-all=yes in its config (/etc/voipmonitor.conf)

Active table

The active table shows current registered users with this columns:

  • ID/sensor id shows internal unique ID and if enabled sensor id
  • datetime is time creation
  • User name / realm shows username and realm from REGISTER message
  • Source IP / Destination IP
  • From / To / Contact are values from SIP headers
  • Expires at shows date when the registration expires
  • User agent
  • Commands - download PCAP

On the picture below you can see a detail area where a sub-grid with state changes and failed registrations from the user name is located. This holds quick filters for a particular active user where you can quickly see his history. Once the SIP registration is expired the history is no longer in the Active table . Each expired registration is stored in the State table.

On the picture below you can see a detail area where a sub-grid with related CDR from the user name is located.

Failed table

The failed table shows failed SIP registrations. If some device fails to register continuously the counter column increases instead of creating a new row. If there is a one-hour gap between two failed registrations from the same user a new row will be created.

State table

The state table retains registration history where REGISTER, UNREGISTER and EXPIRE are saved. In each state row you can click on detail [+] to show all related SIP register messages to the selected user. If device registers in regular intervals it will not save state change in the state table (not true now, see bellow) but keeps the last registration status until the re-registration stops - then UNREGISTER will be the last register state change. If the device do not resend registration in time (register expires + 5 second) the last state will be EXPIRE (with red flag).

The same state is periodically saved due to e.g. graphing, etc. The default is 600 seconds. It can be changed by sip-register-state-timeout option in the sensor config.

How the Active tab retrieves data

The Active table in the GUI displays registration data in two different ways, depending on whether the sip-register feature is enabled:

  • When sip-register is disabled (default):* The GUI retrieves active registration data directly from the running sniffer processes in real-time. The sniffer maintains an in-memory list of currently registered SIP devices and provides this information to the GUI. In this configuration, the database tables (register, register_state, register_failed) are not created or used. The Active tab will still function correctly and show live registration data.
  • When sip-register = yes:* Registration data is stored in database tables (register, register_state, register_failed) for persistent storage and historical reporting. The GUI can then query these tables to display both current and historical registration information.

Error: Table 'voipmonitor.register' doesn't exist

If you see the error message "Table 'voipmonitor.register' doesn't exist" when viewing the Active tab, this is expected and correct behavior when the sip-register feature is disabled.

The error message typically appears if the GUI attempts to query the database table for historical information while the feature is disabled. However, the Active tab will still display live registration data retrieved directly from the sniffer processes.

No action is required to fix this error.' The system is functioning as intended. The error simply indicates that persistent database storage is not enabled for registration data.

If you want to enable persistent storage of registration history, add sip-register = yes to /etc/voipmonitor.conf and restart the sniffer. This will create the database tables and eliminate the error message, but it is optional for basic registration monitoring.

Troubleshooting: Registration Data Missing Despite Traffic Being Present

If SIP registration information is missing from the GUI even though traffic is confirmed present on your network mirror port, the issue is likely with packet capture rather than the sip-register configuration. Follow these troubleshooting steps:

1. Verify packets are reaching the sensor host

Run a packet capture directly on the sensor to verify REGISTER packets are arriving at the interface. Use tcpdump or tshark on the correct interface:

# Check for REGISTER packets on the sensor interface
tcpdump -i napa0 -s 0 -c 10 "port 5060 and udp"

# Or use tshark for more detailed analysis
tshark -i napa0 -Y "sip.Method == REGISTER" -c 10

If no packets appear, the problem is with your network mirroring configuration (SPAN/TAP). See Sniffer_troubleshooting for detailed packet capture troubleshooting.

2. Check for packet drops in the GUI

Navigate to Settings → Sensors in the VoIPmonitor GUI. Expand the sensor details and check the # packet drops counter.

Packet Drops Value ! Meaning ! Action
Normal | No drop issues
Sensor is dropping packets | See Sniffer Troubleshooting: Sensor Statistics
3. If using Napatech hardware

Standard capture tools may show no packets if Napatech interfaces are in a DOWN state. This is a common issue with Napatech cards.

Check interface status:

ip link show napa0

If the interface shows DOWN instead of UP, the solution is to use a custom libpcap library provided by Napatech. See Napatech Troubleshooting for detailed steps to:

  • Check if Napatech drivers are loaded
  • Verify voipmonitor is linked against Napatech libpcap
  • Rebuild the sniffer with the correct library

The key command to verify:

# Check which libpcap voipmonitor is using
ldd /usr/local/sbin/voipmonitor | grep pcap

# Should show: /opt/napatech3/lib/libpcap.so.1
# NOT: /lib/x86_64-linux-gnu/libpcap.so.1
4. Additional troubleshooting resources