Agent skill

Telnyx AI Outbound Voice Python

by team-telnyx in team-telnyx/ai

End-to-end setup for making a Telnyx AI assistant call a phone number.

MITAuto-check passed

Install Telnyx AI Outbound Voice Python

skills CLI
$ npx skills add team-telnyx/ai --skill telnyx-ai-outbound-voice-python -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install team-telnyx/ai telnyx-ai-outbound-voice-python --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/team-telnyx/ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/telnyx-ai-outbound-voice-python .claude/skills/telnyx-ai-outbound-voice-python && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
telnyx-ai-outbound-voice-python
GitHub stars
220
Token cost
~2.3k tokens
SKILL.md length
479 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

End-to-end setup for making a Telnyx AI assistant call a phone number.

  • Works in 6 steps: Purchase a phone number → Create a TeXML application → Assign the phone number to the TeXML… → …
  • SKILL.md covers Installation, Setup, Prerequisites and Model availability, plus 8 more sections
  • Calls pip; reaches api.telnyx.com; needs TELNYX_API_KEY

What it does

Telnyx AI Outbound Voice Python is an agent skill from team-telnyx/ai. End-to-end setup for making a Telnyx AI assistant call a phone number. Covers provisioning a phone number, creating a TeXML application, assigning the number, configuring telephony settings, whitelisting destination countries, and triggering outbound calls via scheduled events. Use this skill (not telnyx-ai-assistants-python) when the task involves an AI assistant placing, making, or triggering an outbound phone call to a user.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Python. The repository describes itself as: Official one-stop shop for AI Agents and developers building with Telnyx. The licence is MIT.

Example prompts

  • “/telnyx-ai-outbound-voice-python”

Requirements

  • Python 3
  • A credential in TELNYX_API_KEY

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Purchase a phone number
  2. Create a TeXML application
  3. Assign the phone number to the TeXML application
  4. Whitelist destination countries
  5. Create the AI assistant with telephony settings
  6. Trigger an outbound call

What it can do on your machine

Read from SKILL.md and the folder at commit 4d2ace0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.telnyx.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TELNYX_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Telnyx AI Outbound Voice Python loads about 2.3k tokens when it runs. Until then it costs about 116 tokens; SKILL.md has 479 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~116
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from team-telnyx/ai at commit 4d2ace0, republished under its MIT licence (© team-telnyx). 479 words, ~2,331 tokens.

Download SKILL.mdSave it as .claude/skills/telnyx-ai-outbound-voice-python/SKILL.md (or your agent's skills folder).
name
telnyx-ai-outbound-voice-python
description
End-to-end setup for making a Telnyx AI assistant call a phone number. Covers provisioning a phone number, creating a TeXML application, assigning the number, configuring telephony settings, whitelisting destination countries, and triggering outbound calls via scheduled events. Use this skill (not telnyx-ai-assistants-python) when the task involves an AI assistant placing, making, or triggering an outbound phone call to a user.
metadata.author
telnyx
metadata.product
ai-assistants
metadata.language
python

Telnyx AI Outbound Voice Calls - Python

Make an AI assistant call any phone number. This skill covers the complete setup from purchasing a number to triggering the call.

Installation

bash
pip install telnyx requests

Setup

python
import os
from telnyx import Telnyx

client = Telnyx(api_key=os.environ.get("TELNYX_API_KEY"))

Prerequisites

Outbound voice calls require all of the following. Missing any one produces a specific error — see Troubleshooting.

  1. A purchased Telnyx phone number
  2. A TeXML application
  3. The phone number assigned to the TeXML application
  4. An outbound voice profile with destination countries whitelisted
  5. An AI assistant with telephony_settings.default_texml_app_id set to the TeXML app

Model availability

Model availability varies by account. If client.ai.assistants.create() returns 422 "not available for inference", discover working models from existing assistants:

python
for a in client.ai.assistants.list().data:
    print(a.model)

Commonly available: openai/gpt-4o, Qwen/Qwen3-235B-A22B.

Step 1: Purchase a phone number

python
import time

available = client.available_phone_numbers.list()
phone = available.data[0].phone_number

number_order = client.number_orders.create(
    phone_numbers=[{"phone_number": phone}],
)
time.sleep(3)

order = client.number_orders.retrieve(number_order.data.id)
assert order.data.status == "success"
print(f"Purchased: {phone}")

Step 2: Create a TeXML application

The voice_url is required by the API but is not used for outbound AI assistant calls. The TeXML app ID is also used as the connection_id when assigning phone numbers.

python
texml_app = client.texml_applications.create(
    friendly_name="My AI Assistant App",
    voice_url="https://example.com/placeholder",
)
app_id = texml_app.data.id  # This is also the connection_id for phone number assignment

Step 3: Assign the phone number to the TeXML application

A phone number cannot make calls until it is assigned to a connection.

python
import requests

requests.patch(
    f"https://api.telnyx.com/v2/phone_numbers/{phone}",
    headers={
        "Authorization": f"Bearer {os.environ['TELNYX_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={"connection_id": app_id},
)

Step 4: Whitelist destination countries

By default only US and CA are whitelisted. Calling any other country without whitelisting it first returns 403 error code D13.

python
import requests

headers = {
    "Authorization": f"Bearer {os.environ['TELNYX_API_KEY']}",
    "Content-Type": "application/json",
}

# Find the outbound voice profile
r = requests.get(
    "https://api.telnyx.com/v2/outbound_voice_profiles", headers=headers
)
ovp_id = r.json()["data"][0]["id"]

# Add destination countries (ISO 3166-1 alpha-2 codes)
requests.patch(
    f"https://api.telnyx.com/v2/outbound_voice_profiles/{ovp_id}",
    headers=headers,
    json={"whitelisted_destinations": ["US", "CA", "IE", "GB"]},
)

# Assign the profile to the TeXML app
requests.patch(
    f"https://api.telnyx.com/v2/texml_applications/{app_id}",
    headers=headers,
    json={
        "friendly_name": "My AI Assistant App",
        "voice_url": "https://example.com/placeholder",
        "outbound": {"outbound_voice_profile_id": ovp_id},
    },
)

Step 5: Create the AI assistant with telephony settings

telephony_settings with default_texml_app_id is required for outbound calls. Without it, scheduled_events.create() returns 400 "Assistant does not have telephony settings configured".

python
assistant = client.ai.assistants.create(
    name="My Voice Assistant",
    model="openai/gpt-4o",
    instructions=(
        "You are a helpful phone assistant. "
        "Keep your answers concise and conversational since this is a phone call."
    ),
    greeting="Hello! How can I help you today?",
    telephony_settings={"default_texml_app_id": app_id},
)

To add telephony to an existing assistant:

python
client.ai.assistants.update(
    assistant_id="your-assistant-id",
    telephony_settings={"default_texml_app_id": app_id},
)
Show full SKILL.md (240 more words)Show less

Step 6: Trigger an outbound call

Use scheduled_events.create() with a time a few seconds in the future for an immediate call.

python
from datetime import datetime, timezone, timedelta

event = client.ai.assistants.scheduled_events.create(
    assistant_id=assistant.id,
    telnyx_conversation_channel="phone_call",
    telnyx_end_user_target="+13125550001",  # Number to call (recipient)
    telnyx_agent_target=phone,               # Your Telnyx number (caller ID)
    scheduled_at_fixed_datetime=(
        datetime.now(timezone.utc) + timedelta(seconds=5)
    ).isoformat(),
)
print(f"Status: {event.status}")  # "pending"
ParameterTypeRequiredDescription
assistant_idstring (UUID)YesThe AI assistant that handles the call.
telnyx_conversation_channelstringYesMust be "phone_call".
telnyx_end_user_targetstring (E.164)YesPhone number to call (recipient).
telnyx_agent_targetstring (E.164)YesYour Telnyx number (caller ID). Must be assigned to the TeXML app.
scheduled_at_fixed_datetimestring (ISO 8601)YesWhen to place the call. ~5s in the future for immediate.
dynamic_variablesobjectNoVariables to pass to the assistant.
conversation_metadataobjectNoMetadata to attach to the conversation.

Complete minimal example

python
import os, time
from datetime import datetime, timezone, timedelta
from telnyx import Telnyx
import requests

api_key = os.environ["TELNYX_API_KEY"]
client = Telnyx(api_key=api_key)
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}

# 1. Buy a number
available = client.available_phone_numbers.list()
phone = available.data[0].phone_number
order = client.number_orders.create(phone_numbers=[{"phone_number": phone}])
time.sleep(3)

# 2. Create TeXML app
app = client.texml_applications.create(
    friendly_name="AI Outbound App",
    voice_url="https://example.com/placeholder",
)
app_id = app.data.id

# 3. Assign number
requests.patch(
    f"https://api.telnyx.com/v2/phone_numbers/{phone}",
    headers=headers,
    json={"connection_id": app_id},
)

# 4. Configure outbound profile
ovp = requests.get("https://api.telnyx.com/v2/outbound_voice_profiles", headers=headers).json()["data"][0]
requests.patch(
    f"https://api.telnyx.com/v2/outbound_voice_profiles/{ovp['id']}",
    headers=headers,
    json={"whitelisted_destinations": ["US", "CA"]},
)
requests.patch(
    f"https://api.telnyx.com/v2/texml_applications/{app_id}",
    headers=headers,
    json={
        "friendly_name": "AI Outbound App",
        "voice_url": "https://example.com/placeholder",
        "outbound": {"outbound_voice_profile_id": ovp["id"]},
    },
)

# 5. Create assistant with telephony
assistant = client.ai.assistants.create(
    name="Outbound Bot",
    model="openai/gpt-4o",
    instructions="You are a helpful phone assistant.",
    telephony_settings={"default_texml_app_id": app_id},
)

# 6. Trigger call
client.ai.assistants.scheduled_events.create(
    assistant_id=assistant.id,
    telnyx_conversation_channel="phone_call",
    telnyx_end_user_target="+13125550001",
    telnyx_agent_target=phone,
    scheduled_at_fixed_datetime=(datetime.now(timezone.utc) + timedelta(seconds=5)).isoformat(),
)

Troubleshooting

400: "Assistant does not have telephony settings configured"

The assistant is missing:

python
telephony_settings={"default_texml_app_id": app_id}

Fix by updating the assistant with default_texml_app_id.

400: "Cannot make outbound call with no outbound voice profile"

The TeXML application does not have an outbound voice profile assigned.

Fix Step 4 above: patch the TeXML app with:

python
"outbound": {"outbound_voice_profile_id": ovp_id}
403 with detail.code == "D13"

The destination country is not whitelisted on the outbound voice profile.

Fix Step 4 above: add the destination country ISO code to whitelisted_destinations.

Call never starts / remains pending

Check:

  1. scheduled_at_fixed_datetime is in the future and in UTC
  2. telnyx_agent_target is your purchased Telnyx number
  3. telnyx_end_user_target is the recipient number
  4. The purchased number is assigned to the TeXML app
422 "not available for inference"

The selected model is not enabled for your account.

List existing assistants to discover working models:

python
for a in client.ai.assistants.list().data:
    print(a.model)

© team-telnyx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/telnyx-ai-outbound-voice-python of team-telnyx/ai.

Open the folder on GitHubat commit 4d2ace0

Compare with similar skills

Telnyx AI Outbound Voice Python next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Telnyx AI Outbound Voice Python compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telnyx AI Outbound Voice Python this skillteam-telnyx/ai220—~2.3kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k48 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use28k6 repos~3kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 48 repos~2k tokens
    Documents & OfficeAuto-check passed
  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 14 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    28k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • PPT Master

    hugohe3/ppt-master

    Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.

    58k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-check passed

More from team-telnyx/ai

All 11 skills in this repo
  • Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps.

    220 GitHub stars~538 tokensUpdated today
    Auto-check passed
  • Manage email suppressions (blocks), import and export suppression lists, and manage unsubscribe groups.

    220 GitHub stars~5k tokensUpdated today
    Auto-check: notes
  • Telnyx Messaging Curl

    team-telnyx/ai

    Send and receive SMS/MMS, handle opt-outs and delivery webhooks.

    220 GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK.

    220 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Telnyx Email Curl

    team-telnyx/ai

    Send transactional email, batch sends, scheduled delivery, templates, email validation, and track delivery events.

    220 GitHub stars~6k tokensUpdated today
    Auto-check: notes
  • Manage email inboxes, list and search inbound messages, threads, sender filters, and reply to or forward messages.

    220 GitHub stars~5.4k tokensUpdated today
    Auto-check passed

Works with

Questions about Telnyx AI Outbound Voice Python

What does Telnyx AI Outbound Voice Python do?

End-to-end setup for making a Telnyx AI assistant call a phone number. Telnyx AI Outbound Voice Python is an agent skill from team-telnyx/ai. End-to-end setup for making a Telnyx AI assistant call a phone number.

How do I install Telnyx AI Outbound Voice Python in Claude Code?

Run `npx skills add team-telnyx/ai --skill telnyx-ai-outbound-voice-python -a claude-code`. Or copy the skill folder (skills/telnyx-ai-outbound-voice-python in team-telnyx/ai) into .claude/skills/telnyx-ai-outbound-voice-python in your project. Claude Code loads it when a task matches its description.

How do I install Telnyx AI Outbound Voice Python in Codex?

Run `npx skills add team-telnyx/ai --skill telnyx-ai-outbound-voice-python -a codex`. Or copy the skill folder (skills/telnyx-ai-outbound-voice-python in team-telnyx/ai) into .agents/skills/telnyx-ai-outbound-voice-python in your project. Codex loads it when a task matches its description.

Can I use Telnyx AI Outbound Voice Python in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add team-telnyx/ai --skill telnyx-ai-outbound-voice-python -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/telnyx-ai-outbound-voice-python, .gemini/skills/telnyx-ai-outbound-voice-python, .github/skills/telnyx-ai-outbound-voice-python and .opencode/skills/telnyx-ai-outbound-voice-python in your project.

What does Telnyx AI Outbound Voice Python need to run?

Going by SKILL.md and its folder, Telnyx AI Outbound Voice Python needs the command-line tools its instructions call (pip) and credentials named TELNYX_API_KEY. Our summary lists: Python 3; A credential in TELNYX_API_KEY.

Does Telnyx AI Outbound Voice Python access the network?

SKILL.md names 1 domain. In commands or code: api.telnyx.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Telnyx AI Outbound Voice Python safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Telnyx AI Outbound Voice Python use?

Telnyx AI Outbound Voice Python is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Telnyx AI Outbound Voice Python use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Telnyx AI Outbound Voice Python?

Skills that share tags, products or a category with Telnyx AI Outbound Voice Python: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Telnyx AI Outbound Voice Python?

team-telnyx (a GitHub organization) maintains it in team-telnyx/ai, which has 220 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: team-telnyx/ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.