Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

telnyx-ai-outbound-voice-pythontelnyx AI outbound voice Python 搜索

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

346

周安装

14

GitHub Stars

169

下载量

109
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:telnyx-ai-outbound-voice-python(telnyx AI outbound voice Python 搜索)
来源仓库:https://github.com/team-telnyx/skills
仓库路径:skills/telnyx-ai-outbound-voice-python
安装命令:
npx skills add https://github.com/team-telnyx/skills --skill telnyx-ai-outbound-voice-python
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/team-telnyx/skills --skill telnyx-ai-outbound-voice-python

简介

辅助 Python 项目开发、测试与依赖管理。

  • 适合阅读代码、定位问题、整理运行命令或分析数据处理逻辑。
  • 需确认项目虚拟环境和依赖版本后使用。
  • 涉及执行脚本或访问外部 API 时应明确输入输出范围。
  • telnyx-ai-outbound-voice-python 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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

pip install telnyx requests

Setup

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:

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

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.

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.

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.

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

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:

client.ai.assistants.update(
    assistant_id="your-assistant-id",
    telephony_settings={"default_texml_app_id": app_id},
)

Step 6: Trigger an outbound call

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

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

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:

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:

"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:

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.99%
按下载量换算40

Claude

29.2%
按下载量换算32

Cursor

19.91%
按下载量换算22

Gemini CLI

8.26%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills