/telnyx-voice-advanced-curl
Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides REST API (curl) examples.
$ npx -y skills add team-telnyx/ai --skill telnyx-voice-advanced-curl --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/telnyx-voice-advanced-curl
Context preview
The summary Claude sees to decide when to auto-load this skill.
Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides REST API (curl) examples.
SKILL.md
telnyx-voice-advanced-curl.SKILL.mdname: telnyx-voice-advanced-curl
description: >-
Advanced call control features including DTMF sending, SIPREC recording, noise
suppression, client state, and supervisor controls. This skill provides REST
API (curl) examples.
metadata:
author: telnyx
product: voice-advanced
language: curl
generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Voice Advanced - curl
Installation
# curl is pre-installed on macOS, Linux, and Windows 10+
Setup
export TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use `$TELNYX_API_KEY` for authentication.
Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
# Check HTTP status code in response
response=$(curl -s -w "\n%{http_code}" \
-X POST "https://api.telnyx.com/v2/messages" \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+13125550001", "from": "+13125550002", "text": "Hello"}')
http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | sed '$d')
case $http_code in
2*) echo "Success: $body" ;;
422) echo "Validation error — check required fields and formats" ;;
429) echo "Rate limited — retry after delay"; sleep 1 ;;
401) echo "Authentication failed — check TELNYX_API_KEY" ;;
*) echo "Error $http_code: $body" ;;
esacCommon error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Join AI Assistant Conversation
Add a participant to an existing AI assistant conversation. Use this command to bring an additional call leg into a running AI conversation.
`POST /calls/{call_control_id}/actions/ai_assistant_join` — Required: `conversation_id`, `participant`
Optional: `client_state` (string), `command_id` (string)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "v3:abc123",
"participant": {}
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/ai_assistant_join"Returns: `conversation_id` (uuid), `result` (string)
Update client state
Updates client state
`PUT /calls/{call_control_id}/actions/client_state_update` — Required: `client_state`
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d"
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/client_state_update"Returns: `result` (string)
Start Conversation Relay
Start a Conversation Relay session on an active call. Conversation Relay connects the call audio to your WebSocket so your application can exchange realtime messages with the caller while Telnyx handles speech recognition and text-to-speech. Only one AI Assistant or Conversation Relay session can be active on a call at a time.
`POST /calls/{call_control_id}/actions/conversation_relay_start`
Optional: `assistant` (object), `client_state` (string), `command_id` (string), `conversation_relay_dtmf_detection` (boolean), `conversation_relay_settings` (object), `conversation_relay_url` (string), `custom_parameters` (object), `dtmf_detection` (boolean), `greeting` (string), `interruptible` (enum: none, any, speech, dtmf), `interruptible_greeting` (enum: none, any, speech, dtmf), `interruption_settings` (object), `language` (string), `languages` (array[object]), `provider` (string), `structured_provider` (object), `transcription` (object), `transcription_engine` (enum: Google, Telnyx, Deepgram, Azure, xAI, AssemblyAI, Speechmatics, Soniox, A, B), `transcription_engine_config` (object), `tts_provider` (string), `url` (string), `voice` (string), `voice_settings` (object)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/conversation_relay_start"
Returns: `conversation_relay_id` (string), `result` (string)
Stop Conversation Relay
Stop the active Conversation Relay session on a call.
`POST /calls/{call_control_id}/actions/conversation_relay_stop`
Optional: `client_state` (string), `command_id` (string)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/conversation_relay_stop"
Returns: `result` (string)
Send DTMF
Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call. **Expected Webhooks:**
There are no webhooks associated with this command.
`POST /calls/{call_control_id}/actions/send_dtmf` — Required: `digits`
Optional: `client_state` (string), `command_id` (string), `duration_millis` (int32)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"digits": "1www2WABCDw9"
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/send_dtmf"Returns: `result` (string)
SIPREC start
Start siprec session to configured in SIPREC connector SRS.
**Expected Webhooks:**
- `siprec.started`
- `siprec.stopped`
- `siprec.failed`
`POST /calls/{call_control_id}/actions/siprec_start`
Optional: `client_state` (string), `connector_name` (string), `include_metadata_custom_headers` (boolean), `secure` (boolean), `session_timeout_secs` (integer), `sip_transport` (enum: udp, tcp, tls), `siprec_track` (enum: inbound_track, outbound_track, both_tracks)
curl \
-X POST \
-H "Authorization: Bearer $
Read more
name: telnyx-voice-advanced-curl description: >- Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides REST API (curl) examples. metadata: author: telnyx product: voice-advanced language: curl generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Voice Advanced - curl
Installation
# curl is pre-installed on macOS, Linux, and Windows 10+
Setup
export TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use `$TELNYX_API_KEY` for authentication.
Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
# Check HTTP status code in response
response=$(curl -s -w "\n%{http_code}" \
-X POST "https://api.telnyx.com/v2/messages" \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+13125550001", "from": "+13125550002", "text": "Hello"}')
http_code=$(echo "$response" | tail -1)
body=$(echo "$response" | sed '$d')
case $http_code in
2*) echo "Success: $body" ;;
422) echo "Validation error — check required fields and formats" ;;
429) echo "Rate limited — retry after delay"; sleep 1 ;;
401) echo "Authentication failed — check TELNYX_API_KEY" ;;
*) echo "Error $http_code: $body" ;;
esacCommon error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Join AI Assistant Conversation
Add a participant to an existing AI assistant conversation. Use this command to bring an additional call leg into a running AI conversation.
`POST /calls/{call_control_id}/actions/ai_assistant_join` — Required: `conversation_id`, `participant`
Optional: `client_state` (string), `command_id` (string)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "v3:abc123",
"participant": {}
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/ai_assistant_join"Returns: `conversation_id` (uuid), `result` (string)
Update client state
Updates client state
`PUT /calls/{call_control_id}/actions/client_state_update` — Required: `client_state`
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d"
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/client_state_update"Returns: `result` (string)
Start Conversation Relay
Start a Conversation Relay session on an active call. Conversation Relay connects the call audio to your WebSocket so your application can exchange realtime messages with the caller while Telnyx handles speech recognition and text-to-speech. Only one AI Assistant or Conversation Relay session can be active on a call at a time.
`POST /calls/{call_control_id}/actions/conversation_relay_start`
Optional: `assistant` (object), `client_state` (string), `command_id` (string), `conversation_relay_dtmf_detection` (boolean), `conversation_relay_settings` (object), `conversation_relay_url` (string), `custom_parameters` (object), `dtmf_detection` (boolean), `greeting` (string), `interruptible` (enum: none, any, speech, dtmf), `interruptible_greeting` (enum: none, any, speech, dtmf), `interruption_settings` (object), `language` (string), `languages` (array[object]), `provider` (string), `structured_provider` (object), `transcription` (object), `transcription_engine` (enum: Google, Telnyx, Deepgram, Azure, xAI, AssemblyAI, Speechmatics, Soniox, A, B), `transcription_engine_config` (object), `tts_provider` (string), `url` (string), `voice` (string), `voice_settings` (object)
curl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/conversation_relay_start"
Returns: `conversation_relay_id` (string), `result` (string)
Stop Conversation Relay
Stop the active Conversation Relay session on a call.
`POST /calls/{call_control_id}/actions/conversation_relay_stop`
Optional: `client_state` (string), `command_id` (string)
curl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/conversation_relay_stop"
Returns: `result` (string)
Send DTMF
Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call. **Expected Webhooks:**
There are no webhooks associated with this command.
`POST /calls/{call_control_id}/actions/send_dtmf` — Required: `digits`
Optional: `client_state` (string), `command_id` (string), `duration_millis` (int32)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"digits": "1www2WABCDw9"
}' \
"https://api.telnyx.com/v2/calls/v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ/actions/send_dtmf"Returns: `result` (string)
SIPREC start
Start siprec session to configured in SIPREC connector SRS.
**Expected Webhooks:**
- `siprec.started`
- `siprec.stopped`
- `siprec.failed`
`POST /calls/{call_control_id}/actions/siprec_start`
Optional: `client_state` (string), `connector_name` (string), `include_metadata_custom_headers` (boolean), `secure` (boolean), `session_timeout_secs` (integer), `sip_transport` (enum: udp, tcp, tls), `siprec_track` (enum: inbound_track, outbound_track, both_tracks)
curl \ -X POST \ -H "Authorization: Bearer $
This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
Repo: team-telnyx/ai
Other skills on team-telnyx-ai.
- /telnyx-ai-assistants-curl
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-go
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-java
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-javascript
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-python
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-ruby
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill

