π Getting Started
Install and configure the SIP AI Assistant with step-by-step setup instructions
ROBO CODED β This documentation was made with AI and may not be 100% sane. But the code does work! π
π Getting Started
This guide walks you through setting up the SIP AI Assistant.
π Prerequisites
Before you begin, ensure you have:
| Requirement | Description |
|---|---|
| π³ Docker | Docker and Docker Compose installed |
| π SIP Server | FreePBX, Asterisk, 3CX, or any SIP-compatible PBX |
β‘ Quick Start
Step 1: Clone the Repository
git clone https://github.com/your-org/sip-agent.git
cd sip-agentExpected output:
Cloning into 'sip-agent'...
remote: Enumerating objects: 1234, done.
remote: Counting objects: 100% (1234/1234), done.
remote: Compressing objects: 100% (567/567), done.
Receiving objects: 100% (1234/1234), 2.5 MiB | 10.00 MiB/s, done.
Step 2: Configure Environment
cp .env.example .env
nano .env # or use your preferred editorMinimum configuration:
# π SIP Settings
SIP_USER=ai-assistant
SIP_PASSWORD=your-secure-password
SIP_DOMAIN=pbx.example.com
# π€ Speaches (STT + TTS)
SPEACHES_API_URL=http://speaches:8001
# π§ LLM Settings
LLM_BASE_URL=http://vllm:8000/v1
LLM_MODEL=openai-community/gpt2-xlGPU-Specific Model Recommendations:
| Your GPU | LLM Model | STT Model |
|---|---|---|
| H100 / A100 (80GB) | meta-llama/Llama-3.1-70B-Instruct | faster-whisper-large-v3 |
| DGX Spark (128GB) | meta-llama/Llama-3.1-70B-Instruct | faster-whisper-large-v3 |
| RTX 5090 (32GB) | Qwen/Qwen2.5-32B-Instruct | faster-whisper-large-v3 |
| RTX 4090 (24GB) | Qwen/Qwen2.5-14B-Instruct | faster-whisper-large-v3 |
| RTX 3090/4080 (16-24GB) | meta-llama/Llama-3.1-8B-Instruct | faster-whisper-medium |
| RTX 3080/4070 (10-12GB) | Qwen/Qwen2.5-7B-Instruct | faster-whisper-small |
Tip: See Configuration Reference for all available options and full model recommendations.
Step 3: Start the Services
docker compose up -dExpected output:
[+] Running 3/3
β Network sip-agent_default Created
β Container speaches Started
β Container sip-agent Started
Step 4: Verify Installation
Health Check:
curl http://localhost:8080/health | jqExpected output:
{
"status": "healthy",
"sip_registered": true,
"active_calls": 0
}SIP Registration:
curl http://localhost:8080/health | jq '.sip_registered'Expected output:
true
Available Tools:
curl http://localhost:8080/tools | jq '.[].name'Expected output:
"WEATHER"
"SET_TIMER"
"CALLBACK"
"HANGUP"
"STATUS"
"CANCEL"
"DATETIME"
"CALC"
"JOKE"
"SIMON_SAYS"
Step 5: Make a Test Call π
- Open your SIP phone or softphone
- Dial the extension assigned to the assistant
- Wait for the greeting
- Say "Hello!" or "What time is it?"
Example conversation:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π INCOMING CALL β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π€ "Hello! Welcome to the AI assistant. How can I help?" β
β π€ "What time is it?" β
β π€ "It's 3:45 PM on Saturday, November 30th, 2025." β
β π€ "Thanks!" β
β π€ "You're welcome! Anything else?" β
β π€ "No, goodbye" β
β π€ "Goodbye! Have a great day!" β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π³ Docker Networking Configuration
Note: The SIP agent usesnetwork_mode: hostfor proper SIP/RTP handling.
π PBX Configuration
FreePBX / Asterisk
- Navigate to Applications β Extensions
- Click Add Extension β Add New SIP Extension
- Configure:
- User Extension:
1000(or your choice) - Display Name:
AI Assistant - Secret: Your secure password
- User Extension:
- Click Submit and Apply Config
Update your .env:
SIP_USER=1000
SIP_PASSWORD=your-extension-secret
SIP_DOMAIN=192.168.1.100 # Your PBX IP3CX
- Go to Users β Add
- Select Extension Type: SIP
- Configure authentication credentials
- Note the extension number and password
π Viewing Logs
Docker Logs
docker logs -f sip-agentExample output:
{"ts": "2025-11-30 15:30:00", "level": "INFO", "event": "sip_registered", "msg": "SIP registration successful"}
{"ts": "2025-11-30 15:30:05", "level": "INFO", "event": "call_start", "msg": "Incoming call", "data": {"caller": "1001"}}
{"ts": "2025-11-30 15:30:06", "level": "INFO", "event": "stt_result", "msg": "What time is it"}
{"ts": "2025-11-30 15:30:07", "level": "INFO", "event": "llm_response", "msg": "It's 3:30 PM..."}Formatted Log Viewer
python tools/view-logs.py -fExample output:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π CALL #1 - From: 1001
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
15:30:05 π Call started
15:30:06 π€ "What time is it?"
15:30:07 π€ "It's 3:30 PM on Saturday, November 30th."
15:30:10 π€ "Set a timer for 5 minutes"
15:30:11 π§ [TOOL:SET_TIMER:duration=300]
15:30:11 π€ "Timer set for 5 minutes!"
15:30:15 π΄ Call ended (duration: 0:10)
π§ Troubleshooting
SIP Not Registering
# Check SIP logs
docker logs sip-agent 2>&1 | grep -i "sip\|register"Common causes:
- π Wrong credentials in
.env - π₯ Firewall blocking UDP 5060
- π Wrong
SIP_DOMAIN
No Audio
# Test Speaches health
curl http://localhost:8001/healthExpected:
{"status": "ok"}# Test TTS
curl -X POST http://localhost:8001/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"input": "Hello world", "voice": "af_heart"}' \
--output test.wav
# Play the audio
aplay test.wav # Linux
afplay test.wav # macOSLLM Not Responding
# Test LLM endpoint
curl http://your-llm-server:8000/v1/models | jqExpected:
{
"data": [
{"id": "openai-community/gpt2-xl", "object": "model"}
]
}β‘οΈ Next Steps
- Configuration β All environment variables and detailed configuration options
- API Reference β Complete REST API documentation and endpoints
- Built-in Tools β Explore all available AI assistant capabilities
- Creating Plugins β Learn how to add custom tools and functionality
Updated about 1 month ago
