Files
node-sbc/DOCKER.md
2025-10-09 16:37:27 +02:00

1.7 KiB

Drachtio Server with Docker Compose

This setup provides a complete drachtio server deployment using Docker Compose.

Quick Start

  1. Start the drachtio server:

    docker-compose up -d
    
  2. Check the logs:

    docker-compose logs -f drachtio
    
  3. Verify the server is running:

    docker-compose ps
    

Configuration

The main configuration file is located at config/drachtio.conf.xml. You can modify:

  • Admin port: Default is 9022 (configurable in admin section)
  • Admin secret: Default is "cymru" (change this for production!)
  • SIP ports: Default is 5060/5061 for UDP/TCP/TLS
  • Logging levels: Configure debug verbosity
  • CDR generation: Enable call detail records
  • Spam protection: Block known spammer User-Agents

Ports

The following ports are exposed:

  • 5060/udp: SIP UDP
  • 5060/tcp: SIP TCP
  • 5061/tcp: SIP TLS
  • 9022/tcp: Admin API

Connecting to Drachtio

Once running, you can connect to drachtio using Node.js:

const Srf = require('drachtio-srf');
const srf = new Srf();

srf.connect({
  host: 'localhost',
  port: 9022,
  secret: 'cymru'
});

Maintenance

  • View logs: docker-compose logs -f drachtio
  • Stop server: docker-compose down
  • Restart server: docker-compose restart
  • Update image: docker-compose pull && docker-compose up -d

Production Considerations

  1. Security: Change the default admin secret
  2. TLS: Configure TLS certificates for SIP over TLS
  3. Access Control: Restrict admin access to specific IPs
  4. CDRs: Configure CDR export to Homer or Splunk
  5. Monitoring: Enable Prometheus metrics for monitoring