Usage
Options
Server host to bind toShort form:
-hDefault: Loaded from config.yaml (server.host), typically 0.0.0.0Example:Server port to listen onShort form:
-pDefault: Loaded from config.yaml (server.port), typically 8080Example:Path to configuration fileShort form:
-cGlobal option - Applies to all commandsExample:What It Does
The server command:- Loads configuration from
config.yamland.env - Starts a FastAPI application with:
- Twilio webhook endpoints (
/twilio/voice,/twilio/stream) - Health check endpoint (
/health) - Call API endpoint (
/api/call)
- Twilio webhook endpoints (
- Initializes the CallManager for handling phone calls
- Sets up WebSocket connections for Twilio Media Streams
- Runs indefinitely until stopped (Ctrl+C)
Endpoints
When the server starts, the following endpoints are available:Voice Webhook
Media Stream WebSocket
Call API
agenticai trigger).
Health Check
200 OK if server is running.
Examples
Basic Usage
Start the server with default settings:Custom Port
Run on a different port:Localhost Only
Bind to localhost for development:Custom Configuration
Use a different config file:Development Workflow
Typical development setup:Production Notes
Daemon Mode
For running the server with the scheduler enabled:Daemon Options
Public webhook base URL for Twilio callbacksShort form:
-wExample:Logs
The server logs all events using structlog:- Request handling
- WebSocket connections
- Call lifecycle events
- Audio stream status
- Gateway messages
Configuration
The server uses these config values:Troubleshooting
Server won’t start
Error:Address already in use
Solution: Port 8080 is already in use. Either stop the other process or use a different port:
Configuration not found
Error:Configuration file not found. Create config.yaml first.
Solution: Create config.yaml or run the setup wizard:
Twilio webhooks failing
Checklist:- Server is running and accessible
- ngrok/tunnel is active
- Twilio webhook URL is set to
https://your-url.ngrok.io/twilio/voice - Firewall allows incoming connections on port 8080
See Also
- Trigger Command - Quick call testing
- Service Commands - Run as background service
- Daemon Mode - Server with scheduler
- Status Command - Check server status