1.7 KiB
1.7 KiB
Drachtio Server with Docker Compose
This setup provides a complete drachtio server deployment using Docker Compose.
Quick Start
-
Start the drachtio server:
docker-compose up -d -
Check the logs:
docker-compose logs -f drachtio -
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
adminsection) - 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 UDP5060/tcp: SIP TCP5061/tcp: SIP TLS9022/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
- Security: Change the default admin secret
- TLS: Configure TLS certificates for SIP over TLS
- Access Control: Restrict admin access to specific IPs
- CDRs: Configure CDR export to Homer or Splunk
- Monitoring: Enable Prometheus metrics for monitoring