api/java/telnyx-voice-gather-java/SKILL.md
Collect DTMF input and speech from callers using standard gather or AI-powered gather. Build interactive voice menus and AI voice assistants. This skill provides Java SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-voice-gather-javaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// See https://github.com/team-telnyx/telnyx-java for Maven/Gradle 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.
Add messages to the conversation started by an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_add_messages
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesParams;
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesResponse;
ActionAddAiAssistantMessagesResponse response = client.calls().actions().addAiAssistantMessages("call_control_id");
Start an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_start
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantResponse;
ActionStartAiAssistantResponse response = client.calls().actions().startAiAssistant("call_control_id");
Stop an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_stop
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantResponse;
ActionStopAiAssistantResponse response = client.calls().actions().stopAiAssistant("call_control_id");
Stop current gather.
POST /calls/{call_control_id}/actions/gather_stop
import com.telnyx.sdk.models.calls.actions.ActionStopGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionStopGatherResponse;
ActionStopGatherResponse response = client.calls().actions().stopGather("call_control_id");
Gather parameters defined in the request payload using a voice assistant.
POST /calls/{call_control_id}/actions/gather_using_ai — Required: parameters
import com.telnyx.sdk.core.JsonValue;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiResponse;
ActionGatherUsingAiParams params = ActionGatherUsingAiParams.builder()
.callControlId("call_control_id")
.parameters(ActionGatherUsingAiParams.Parameters.builder()
.putAdditionalProperty("properties", JsonValue.from("bar"))
.putAdditionalProperty("required", JsonValue.from("bar"))
.putAdditionalProperty("type", JsonValue.from("bar"))
.build())
.build();
ActionGatherUsingAiResponse response = client.calls().actions().gatherUsingAi(params);
Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.
POST /calls/{call_control_id}/actions/gather_using_audio
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioResponse;
ActionGatherUsingAudioResponse response = client.calls().actions().gatherUsingAudio("call_control_id");
Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.
POST /calls/{call_control_id}/actions/gather_using_speak — Required: voice, payload
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakResponse;
ActionGatherUsingSpeakParams params = ActionGatherUsingSpeakParams.builder()
.callControlId("call_control_id")
.payload("say this on call")
.voice("male")
.build();
ActionGatherUsingSpeakResponse response = client.calls().actions().gatherUsingSpeak(params);
Gather DTMF signals to build interactive menus.
POST /calls/{call_control_id}/actions/gather
import com.telnyx.sdk.models.calls.actions.ActionGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherResponse;
ActionGatherResponse response = client.calls().actions().gather("call_control_id");
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).
| Event | Description |
|-------|-------------|
| callGatherEnded | Call Gather Ended |
| CallAIGatherEnded | Call AI Gather Ended |
| CallAIGatherMessageHistoryUpdated | Call AI Gather Message History Updated |
| CallAIGatherPartialResults | Call AI Gather Partial Results |
| CallConversationEnded | Call Conversation Ended |
| callPlaybackStarted | Call Playback Started |
| callPlaybackEnded | Call Playback Ended |
| callDtmfReceived | Call Dtmf Received |
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.