Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ai_agents/agents/examples/voice-assistant-sip-telnyx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,17 @@ docker run --rm -it --env-file .env -p 9000:9000 -p 3000:3000 voice-assistant-si

### RESTful API Endpoints

- `POST /api/calls` - Create new outbound call
- `POST /api/call` - Create new outbound call
- `GET /api/calls` - List all active calls
- `GET /api/calls/{call_id}` - Get call information
- `DELETE /api/calls/{call_id}` - Stop and delete call
- `GET /api/call/{call_id}` - Get call information
- `DELETE /api/call/{call_id}` - Stop and delete call
- `POST /webhook/status` - Telnyx status callback
- `GET /health` - Health check

### Starting a Call

```bash
curl -X POST http://localhost:9000/api/calls \
curl -X POST http://localhost:9000/api/call \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+1234567890",
Expand All @@ -248,7 +248,7 @@ curl -X POST http://localhost:9000/api/calls \
### Getting Call Information

```bash
curl http://localhost:9000/api/calls/CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
curl http://localhost:9000/api/call/v3:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

### Listing All Calls
Expand All @@ -260,15 +260,15 @@ curl http://localhost:9000/api/calls
### Stopping a Call

```bash
curl -X DELETE http://localhost:9000/api/calls/CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
curl -X DELETE http://localhost:9000/api/call/v3:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

## Learn More

- [Telnyx Programmable Voice Documentation](https://developers.telnyx.com/api/v2)
- [Telnyx Media Streams Documentation](https://developers.telnyx.com/api/v2/calls/voice)
- [Telnyx Python SDK](https://github.com/team-telnyx/telnyx-python)
- [Telnyx Call Control API](https://developers.telnyx.com/api-reference/call-commands/dial)
- [Deepgram API Documentation](https://developers.deepgram.com/)
- [OpenAI API Documentation](https://platform.openai.com/docs)
- [ElevenLabs API Documentation](https://docs.elevenlabs.io/)
- [TEN Framework Documentation](https://doc.theten.ai)
- [TEN Framework Documentation](https://doc.theten.ai)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
fastapi>=0.100.0
uvicorn>=0.23.0
pydantic>=2.0.0
telnyx>=1.0.0
python-multipart>=0.0.6
python-multipart>=0.0.6
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,8 @@ async def send_audio_to_telnyx(self, audio_data: bytes, call_id: str):
# Encode μ-law audio data to base64
audio_base64 = base64.b64encode(mulaw_data).decode("utf-8")

stream_id = self.server_instance.active_call_sessions[call_id].get(
"stream_id"
)

message = {
"event": "media",
"streamSid": stream_id,
"media": {"payload": audio_base64},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ pydantic>=2.0.0
aiohttp>=3.9.0
fastapi>=0.100.0
uvicorn>=0.23.0
telnyx>=1.0.0
python-multipart>=0.0.6
python-multipart>=0.0.6
Loading
Loading