Skip to content
Development
Skill

/telnyx-voice-advanced-java

Advanced call control features including DTMF sending, SIPREC recording, noise suppression, client state, and supervisor controls. This skill provides Java SDK examples.

From plugin
team-telnyx-ai
207200 skills3 agents
Install
$ npx -y skills add team-telnyx/ai --skill telnyx-voice-advanced-java --agent claude-code

How 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-java

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 Java SDK examples.

SKILL.md

telnyx-voice-advanced-java.SKILL.md
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. -->

Telnyx Voice Advanced - Java

Installation

<!-- Maven -->
<dependency>
    <groupId>com.telnyx.sdk</groupId>
    <artifactId>telnyx</artifactId>
    <version>6.84.0</version>
</dependency>

// Gradle
implementation("com.telnyx.sdk:telnyx:6.84.0")

Setup

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

TelnyxClient client = TelnyxOkHttpClient.fromEnv();

All examples below assume `client` is already initialized as shown above.

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:

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 and retry with exponential backoff
        Thread.sleep(1000);
    }
}

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).

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)

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)

Update client state

Updates client 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 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)

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 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)

import com.telnyx.sdk.models.calls.actions.ActionStopConversationRelayParams;
import com.telnyx.sdk.models.calls.actions.ActionStopConversationRelayResponse;

ActionStopConversationRelayResponse response = client.calls().actions().stopConversationRelay("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");

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)

import com.telnyx.sdk.models.calls.actions.Action
Read more
Ships withteam-telnyx-ai

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.

Get the whole plugin