api/go/telnyx-voice-go/SKILL.md
Make and receive calls, transfer, bridge, and manage call lifecycle with Call Control. Includes application management and call events. This skill provides Go SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-voice-goInstall 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.
go get github.com/team-telnyx/telnyx-go
import (
"context"
"fmt"
"os"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
client := telnyx.NewClient(
option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)
All examples below assume client is already initialized as shown above.
Answer an incoming call.
POST /calls/{call_control_id}/actions/answer
response, err := client.Calls.Actions.Answer(
context.TODO(),
"call_control_id",
telnyx.CallActionAnswerParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Bridge two call control calls.
POST /calls/{call_control_id}/actions/bridge — Required: call_control_id
response, err := client.Calls.Actions.Bridge(
context.TODO(),
"call_control_id",
telnyx.CallActionBridgeParams{
CallControlIDToBridgeWith: "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Dial a number or SIP URI from a given connection.
POST /calls — Required: connection_id, to, from
response, err := client.Calls.Dial(context.TODO(), telnyx.CallDialParams{
ConnectionID: "7267xxxxxxxxxxxxxx",
From: "+18005550101",
To: telnyx.CallDialParamsToUnion{
OfString: telnyx.String("+18005550100"),
},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Hang up the call.
POST /calls/{call_control_id}/actions/hangup
response, err := client.Calls.Actions.Hangup(
context.TODO(),
"call_control_id",
telnyx.CallActionHangupParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Transfer a call to a new destination.
POST /calls/{call_control_id}/actions/transfer — Required: to
response, err := client.Calls.Actions.Transfer(
context.TODO(),
"call_control_id",
telnyx.CallActionTransferParams{
To: "+18005550100",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Lists all active calls for given connection.
GET /connections/{connection_id}/active_calls
page, err := client.Connections.ListActiveCalls(
context.TODO(),
"1293384261075731461",
telnyx.ConnectionListActiveCallsParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Return a list of call control applications.
GET /call_control_applications
page, err := client.CallControlApplications.List(context.TODO(), telnyx.CallControlApplicationListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Create a call control application.
POST /call_control_applications — Required: application_name, webhook_event_url
callControlApplication, err := client.CallControlApplications.New(context.TODO(), telnyx.CallControlApplicationNewParams{
ApplicationName: "call-router",
WebhookEventURL: "https://example.com",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", callControlApplication.Data)
Retrieves the details of an existing call control application.
GET /call_control_applications/{id}
callControlApplication, err := client.CallControlApplications.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", callControlApplication.Data)
Updates settings of an existing call control application.
PATCH /call_control_applications/{id} — Required: application_name, webhook_event_url
callControlApplication, err := client.CallControlApplications.Update(
context.TODO(),
"id",
telnyx.CallControlApplicationUpdateParams{
ApplicationName: "call-router",
WebhookEventURL: "https://example.com",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", callControlApplication.Data)
Deletes a call control application.
DELETE /call_control_applications/{id}
callControlApplication, err := client.CallControlApplications.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", callControlApplication.Data)
Filters call events by given filter parameters.
GET /call_events
page, err := client.CallEvents.List(context.TODO(), telnyx.CallEventListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
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 |
|-------|-------------|
| callAnswered | Call Answered |
| callStreamingStarted | Call Streaming Started |
| callStreamingStopped | Call Streaming Stopped |
| callStreamingFailed | Call Streaming Failed |
| callBridged | Call Bridged |
| callInitiated | Call Initiated |
| callHangup | Call Hangup |
| callRecordingSaved | Call Recording Saved |
| callMachineDetectionEnded | Call Machine Detection Ended |
| callMachineGreetingEnded | Call Machine Greeting Ended |
| callMachinePremiumDetectionEnded | Call Machine Premium Detection Ended |
| callMachinePremiumGreetingEnded | Call Machine Premium Greeting Ended |
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.