← Back to Blog
NEWS

Setting Up Real-Time Call Quality Monitoring with Homer and dSIPRouter

Setting Up Real-Time Call Quality Monitoring with Homer and dSIPRouter

Call quality issues are the silent killers of VoIP deployments. Users complain about choppy audio, one-way audio, or dropped calls—but by the time you hear about it, the evidence is gone. Real-time SIP capture and analysis changes everything.

In this guide, we'll set up Homer SIP Capture alongside dSIPRouter for comprehensive call quality monitoring.


Why Homer?

Homer is the de facto open-source standard for SIP capture and analysis. It provides:

  • Real-time SIP message capture across your entire infrastructure
  • Call flow visualization showing the complete SIP ladder diagram
  • RTP quality metrics including MOS, jitter, and packet loss
  • Powerful search across millions of call records
  • Alerting on quality thresholds

Combined with dSIPRouter, you get end-to-end visibility into every call traversing your platform.


Architecture Overview

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Endpoints │────▶│ dSIPRouter  │────▶│   Carriers  │
└─────────────┘     └──────┬──────┘     └─────────────┘
                           │
                           │ HEP (UDP/TCP)
                           ▼
                    ┌─────────────┐
                    │   Homer     │
                    │  (heplify)  │
                    └──────┬──────┘
                           │
                           ▼
                    ┌─────────────┐
                    │ PostgreSQL  │
                    │ + Web UI    │
                    └─────────────┘

Key components:
- HEP (Homer Encapsulation Protocol): Lightweight protocol for shipping SIP packets
- heplify-server: Receives HEP packets and stores them
- Homer Web UI: Search, visualize, and analyze


Step 1: Install Homer

The easiest path is Docker Compose. On your monitoring server:

git clone https://github.com/sipcapture/homer-docker.git
cd homer-docker/heplify-server

# Edit docker-compose.yml for your environment
# Key settings: database credentials, retention period

docker-compose up -d

Verify Homer is running:

curl http://localhost:9080/api/v3/status

Step 2: Configure dSIPRouter for HEP

dSIPRouter uses Kamailio under the hood, which has native HEP support via the siptrace module.

Add to your Kamailio configuration:

# Load the siptrace module
loadmodule "siptrace.so"

# HEP settings
modparam("siptrace", "duplicate_uri", "sip:HOMER_IP:9060")
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "hep_capture_id", 100)
modparam("siptrace", "trace_on", 1)

# In your request_route, add:
if (!is_method("REGISTER")) {
    sip_trace();
}

Replace HOMER_IP with your Homer server's address.

During dSIPRouter install method: Specify the -homer option, which allows you to specify the hostname and port of your Homer server during the installation process:

-homer <homerip>[:heplifyport]

This is great option when automating the installation of dSIPRouter


Step 3: Capture RTCP for Quality Metrics

SIP capture alone shows you signaling—but for actual call quality, you need RTCP data. Options:

Option A: RTPEngine Integration

If you're using RTPEngine for media proxying:

# Add to rtpengine startup options
--homer=HOMER_IP:9060 --homer-protocol=udp --homer-id=101

Option B: Endpoint-Side Capture

For endpoints that support it, configure RTCP-XR reports to Homer directly. Many IP phones support this in their provisioning templates.


Step 4: Create Quality Dashboards

Once data is flowing, build dashboards in Homer UI:

  1. Call Volume: Calls per hour/day by response code
  2. Quality Distribution: MOS score histogram
  3. Problem Calls: Filter for MOS < 3.5
  4. Carrier Performance: Quality metrics by trunk
  5. Registration Health: Failed registrations over time

Sample Search Queries

# Find all calls with poor quality
mos < 3.5 AND method = INVITE

# Find 503 responses from a specific carrier
response = 503 AND to_domain = carrier.example.com

# Find calls for a specific user
from_user = +15551234567 OR to_user = +15551234567

Step 5: Set Up Alerting

Homer supports webhook-based alerting. Configure alerts for:

  • MOS drops below threshold (e.g., average MOS < 3.8 over 5 minutes)
  • High 4xx/5xx response rates (e.g., >5% failures)
  • Registration storms (sudden spike in REGISTER requests)
  • Carrier outages (all calls to a trunk failing)

Integrate with PagerDuty, Slack, or your monitoring stack:

{
  "alert_name": "Low MOS Alert",
  "condition": "avg(mos) < 3.8",
  "window": "5m",
  "webhook": "https://hooks.slack.com/services/xxx"
}

Troubleshooting Common Issues

No Data in Homer

  1. Check HEP connectivity: tcpdump -i any port 9060
  2. Verify Kamailio module loaded: kamcmd mi siptrace.status
  3. Check Homer logs: docker logs heplify-server

Missing RTP Quality Data

  1. Ensure RTCP is not blocked by firewalls
  2. Verify RTPEngine Homer integration is enabled
  3. Check that calls are actually using RTPEngine (not direct media)

High Storage Usage

  1. Reduce retention period in Homer settings
  2. Exclude high-volume low-value messages (like OPTIONS keepalives)
  3. Consider sampling for very high-volume deployments

What's Next

With Homer capturing your SIP traffic, you now have the visibility needed to:

  • Debug complex call flow issues
  • Identify quality problems before users complain
  • Hold carriers accountable with hard data
  • Capacity plan based on actual usage patterns

Tomorrow: We'll explore Kamailio's dispatcher module and compare load balancing algorithms for optimal carrier distribution.


Need help with your Homer deployment? Contact us for implementation assistance.