@framers/agentos-ext-voice-telnyx

中文文档
0.2.3发布于 2026/11/11Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 2万

Telnyx voice call provider for AgentOS — outbound/inbound calls via Telnyx Call Control v2

原始使用文档
文档目录9 节
  1. Installation
  2. Usage
  3. Configuration
  4. Tools
  5. telnyxVoiceCall parameters
  6. Notes
  7. Host call manager binding
  8. Releases
  9. License

Telnyx voice calls

This pack gives an agent a phone call tool and voice provider using the telnyx SDK and Telnyx Call Control. It places outbound calls, speaks text into calls, hangs up calls and normalizes webhook events.

Installation

npm install @framers/agentos-ext-voice-telnyx

Peer dependency: @framers/agentos, at the minimum version declared by this package.

Usage

import { AgentOS } from '@framers/agentos';

const agentos = await AgentOS.create({
  extensionManifest: {
    packs: [
      {
        package: '@framers/agentos-ext-voice-telnyx',
        options: {
          apiKey: process.env.TELNYX_API_KEY,
          connectionId: process.env.TELNYX_CONNECTION_ID,
          publicKey: process.env.TELNYX_PUBLIC_KEY,
          fromNumber: process.env.TELNYX_FROM_NUMBER,
        },
      },
    ],
  },
});

Configuration

Credentials resolve from direct options, then options.secrets, then the listed environment variables in order.

OptionSecret idEnvironment variableRequiredDefault
apiKeytelnyx.apiKeyTELNYX_API_KEY, TELNYX_API_V2_KEYYesNone, throws if absent
connectionIdtelnyx.connectionIdTELNYX_CONNECTION_ID, TELNYX_APP_IDYesNone, throws if absent
publicKeytelnyx.publicKeyTELNYX_PUBLIC_KEYNoundefined
fromNumberNoneTELNYX_FROM_NUMBERNoundefined in service, empty string in manager config
webhookBaseUrlNoneNoneNoundefined
priorityNoneNoneNo50
secretsMap containing the secret ids aboveNoneNoundefined
callManagerNoneNoneNoExposed pack-owned manager

Tools

ToolWhat it does
telnyxVoiceCallMakes and manages phone calls via Telnyx, including outbound calling, in-call TTS, hangup and status queries.

telnyxVoiceCall parameters

ParameterTypeRequiredDescription
actionstring, enum: call, speak, hangup, status, listYesThe voice call action to perform
toNumberstringNoE.164 phone number to call (required for "call" action)
messagestringNoMessage to speak (for "call" in notify mode, or "speak" action)
modestring, enum: notify, conversationNoCall interaction mode (default: "conversation")
callIdstringNoCall ID (required for "speak", "hangup", and "status" actions)

Notes

The package requires Node.js >=22. Activation dynamically loads the SDK and initializes the service. Deactivation disposes only the original pack-owned manager and releases the SDK client reference.

The tool has side effects: call places a phone call, speak sends a TTS command and hangup ends a call. Runtime checks require toNumber for call, callId and message for speak, and callId for hangup or status. The schema requires only action.

The provider uses the configured connection ID, caller number and webhook URL. notify enables answering machine detection. conversation passes a media stream URL with the inbound track. Call state is encoded into the outbound request. The service defaults TTS to a female voice and en-US with a text payload.

The provider parses call initiation, answer, hangup, machine detection and stream connection events. It attempts signature verification when publicKey is set and rejects missing signature headers, failed verification or timestamps outside its freshness window. Without publicKey, it accepts webhooks without signature verification.

The pack registers voice-provider named telnyx and delegates call management to CallManager. Its files do not start an HTTP webhook listener or implement a media socket server.

Host call manager binding

The returned pack exposes the manager used by its call tool through binding.manager. Supply options.callManager to use a host-owned manager; otherwise the exposed default belongs to the pack. binding.setManager(next) registers the same provider on the replacement and changes subsequent tool operations. The host drains or transfers active calls before rebinding; no call state is migrated by the binding.

The voice-provider descriptor preserves the raw Telnyx provider and adds a read-only binding property. Registry consumers and the returned pack therefore reach the same manager and tool handler. Deactivation disposes only the originally pack-owned manager, including when it has been replaced. Host-owned managers are never disposed by this extension. Construction places no carrier call.

This repair does not change the legacy carrier protocol, signature policy or callback behavior. Use the core carrier profile explicitly for its durable guarantees. The declared core peer floor is required for this binding API.

Releases

New versions are published from framerslab/agentos-extensions by GitHub Actions through npm trusted publishing, with a provenance statement.

License

Apache-2.0

版本与发布记录

@framers/agentos-ext-voice-telnyx 共发布 10 个版本,首次发布于 2026/02/08;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.3latest2026/11/114 天前
0.2.22026/11/0114 天前
0.2.12026/11/0115 天前
0.2.02026/10/151 个月前
0.1.52026/10/121 个月前
0.1.42026/10/111 个月前

关于 @framers/agentos-ext-voice-telnyx 的常见问题

@framers/agentos-ext-voice-telnyx 是什么?

Telnyx voice call provider for AgentOS — outbound/inbound calls via Telnyx Call Control v2

如何安装 @framers/agentos-ext-voice-telnyx?

在项目目录运行 npm install @framers/agentos-ext-voice-telnyx,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@framers/agentos(>=0.13.104)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@framers/agentos-ext-voice-telnyx 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@framers/agentos-ext-voice-telnyx 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@framers/agentos-ext-voice-telnyx 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@framers/agentos-ext-voice-telnyx 可以商用吗?

@framers/agentos-ext-voice-telnyx 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@framers/agentos-ext-voice-telnyx 的下载量有多少?

根据 npm 官方下载统计,@framers/agentos-ext-voice-telnyx 在 2026/10/16 – 2026/11/14 这 30 天内被下载 20,333 次,日均约 678 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@framers/agentos-ext-voice-telnyx 还在维护吗?

最新版本 0.2.3 发布于 2026/11/11(4 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/02/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。