telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides Java SDK examples.
Claude Code
$ npx -y skills add team-telnyx/ai --skill telnyx-voice-advanced-java --agent claude-code
Codex
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a codex -y
Cursor
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a cursor -y
Gemini CLI
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a gemini-cli -y
GitHub Copilot
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a github-copilot -y
OpenCode
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a opencode -y
Windsurf
$ npx skills add team-telnyx/ai --skill telnyx-voice-advanced-java -a windsurf -y
name: telnyx-voice-advanced-java description: >- Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides Java SDK examples. metadata: author: telnyx product: voice-advanced language: java generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.95.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.95.0")import com.telnyx.sdk.client.TelnyxClient; import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient; // fromEnv() reads TELNYX_API_KEY and TELNYX_PUBLIC_KEY (the public key is required for // client.webhooks().unwrap() — webhook verification) TelnyxClient client = TelnyxOkHttpClient.fromEnv();
All examples below assume `client` is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
import com.telnyx.sdk.errors.TelnyxServiceException;
try {
var result = client.messages().send(params);
} catch (TelnyxServiceException e) {
System.err.println("API error " + e.statusCode() + ": " + e.getMessage());
if (e.statusCode() == 422) {
System.err.println("Validation error — check required fields and formats");
} else if (e.statusCode() == 429) {
// Rate limited — wait, then retry the request (bounded exponential backoff)
Thread.sleep(1000);
// ...retry the call here (give up after a few attempts)
}
throw e; // Re-throw: a failed request must never look like success to the caller
}Common 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).
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)
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantResponse;
ActionJoinAiAssistantParams params = ActionJoinAiAssistantParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.conversationId("v3:abc123")
.participant(ActionJoinAiAssistantParams.Participant.builder()
.id("v3:abc123def456")
.role(ActionJoinAiAssistantParams.Participant.Role.USER)
.build())
.build();
ActionJoinAiAssistantResponse response = client.calls().actions().joinAiAssistant(params);Returns: `conversation_id` (uuid), `result` (string)
Updates the client state associated with the call. Client state is an opaque value echoed back in subsequent webhooks for the call, letting you correlate events with your application's state.
`PUT /calls/{call_control_id}/actions/client_state_update` — Required: `client_state`
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateParams;
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateResponse;
ActionUpdateClientStateParams params = ActionUpdateClientStateParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.clientState("aGF2ZSBhIG5pY2UgZGF5ID1d")
.build();
ActionUpdateClientStateResponse response = client.calls().actions().updateClientState(params);Returns: `result` (string)
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)
import com.telnyx.sdk.models.calls.actions.ActionStartConversationRelayParams;
import com.telnyx.sdk.models.calls.actions.ActionStartConversationRelayResponse;
ActionStartConversationRelayResponse response = client.calls().actions().startConversationRelay("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");Returns: `conversation_relay_id` (string), `result` (string)
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)
import com.telnyx.sdk.models.calls.actions.ActionStopConversationRelayParams; import com.telnyx.sdk.models.calls.actions.ActionStopConversationRelayResponse; ActionStopConversationRelayResponse response = client.calls().actions().stopConversationRel
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.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.