This guide will help you get Karl running in under 5 minutes.
- Go 1.26 or higher (for building from source)
- Docker (optional, for container deployment)
- A SIP proxy (OpenSIPS or Kamailio) for production use
# Clone the repository
git clone https://github.com/loreste/karl.git
cd karl
# Build
go build -o karl
# Run with default settings
./karlKarl is now running with default configuration:
- NG Protocol: UDP port 22222
- RTP Ports: 30000-40000
- REST API: TCP port 8080
- Health Check: TCP port 8086
- Metrics: TCP port 9091
# Run with host networking (recommended for media servers)
docker run -d \
--name karl \
--network host \
loreste/karl:latestOr with explicit port mapping:
docker run -d \
--name karl \
-p 22222:22222/udp \
-p 30000-30100:30000-30100/udp \
-p 8080:8080 \
-p 8086:8086 \
-p 9091:9091 \
loreste/karl:latest# Send a ping command
echo -n "d7:command4:pinge" | nc -u localhost 22222Expected response contains pong.
curl http://localhost:8086/healthExpected response:
{"status":"UP"}curl http://localhost:9091/metrics | head -20Add to your opensips.cfg:
loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:22222")
Add to your kamailio.cfg:
loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:22222")
- Register two SIP phones with your SIP proxy
- Make a call between them
- Verify media flows through Karl:
# Check active sessions
curl http://localhost:8080/api/v1/sessions- Configuration Reference - Customize Karl for your environment
- Kubernetes Deployment - Deploy to Kubernetes
- Set Up Monitoring - Add Prometheus and Grafana
- Enable Recording - Record calls
Karl isn't running or is bound to a different interface. Check:
# Is Karl running?
ps aux | grep karl
# What port is it listening on?
ss -ulnp | grep 22222- Check that RTP ports (30000-40000) are accessible
- Verify firewall rules allow UDP traffic
- Check Karl logs for errors:
# If running as service
journalctl -u karl -f
# If running in Docker
docker logs -f karlSee the Troubleshooting Guide for more help.