Agent Skills by ALSEL
Anthropic ClaudeLLM・AI開発⭐ リポ 2,159品質スコア 95/100

retellai-webhooks-events

Retell AI webhookイベント — AI音声エージェントと電話自動化。 Retell AIで音声エージェント、電話通話、またはテレフォニーに対応する際に使用します。 「retell webhooks events」「retellai-webhooks-events」「voice agent」などのフレーズでトリガーできます。

description の原文を見る

Retell AI webhooks events — AI voice agent and phone call automation. Use when working with Retell AI for voice agents, phone calls, or telephony. Trigger with phrases like "retell webhooks events", "retellai-webhooks-events", "voice agent".

SKILL.md 本文

Retell AI Webhooks イベント

概要

Retell AI のウェブフックイベントを処理します。コール ライフサイクル、トランスクリプト、関数実行に対応しています。

前提条件

  • HTTPS ウェブフック エンドポイント
  • ウェブフック URL で設定されたエージェント

手順

ステップ 1: ウェブフック URL を設定

// エージェント設定にウェブフック URL を設定
await retell.agent.update(agentId, {
  webhook_url: 'https://your-app.com/webhooks/retell',
});

ステップ 2: ウェブフック エンドポイント

import express from 'express';

const app = express();
app.post('/webhooks/retell', express.json(), async (req, res) => {
  const { event, call } = req.body;

  switch (event) {
    case 'call_started':
      console.log(`Call started: ${call.call_id} from ${call.from_number}`);
      break;

    case 'call_ended':
      console.log(`Call ended: ${call.call_id}`);
      console.log(`  Duration: ${call.duration_ms}ms`);
      console.log(`  Status: ${call.call_status}`);
      if (call.transcript) {
        await saveTranscript(call.call_id, call.transcript);
      }
      break;

    case 'call_analyzed':
      console.log(`Analysis ready: ${call.call_id}`);
      console.log(`  Summary: ${call.call_analysis?.call_summary}`);
      break;

    default:
      console.log(`Unhandled event: ${event}`);
  }

  res.status(200).json({ received: true });
});

ステップ 3: 会話中の関数呼び出しを処理

// エージェントが関数をトリガーすると、Retell が URL を呼び出します
app.post('/functions/book-appointment', express.json(), async (req, res) => {
  const { patient_name, phone, date, time } = req.body.args;

  // 予約を処理
  const booking = await bookAppointment(patient_name, phone, date, time);

  // エージェントが話すための応答を返す
  res.json({
    result: `Appointment booked for ${patient_name} on ${date} at ${time}. Confirmation number: ${booking.id}`,
  });
});

出力

  • コール ライフサイクル イベント用のウェブフック処理
  • コール完了時のトランスクリプト保存
  • ライブ コール中の関数実行

エラー処理

問題原因解決策
ウェブフック イベントがないURL が設定されていないエージェントで webhook_url を設定する
関数がタイムアウトバックエンドが遅い5 秒以内に応答する
トランスクリプトが不足しているコールが短いトランスクリプトは 5 秒以上のコールのみ対象

リソース

次のステップ

よくあるエラー: retellai-common-errors

ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ

詳細情報

作者
jeremylongshore
リポジトリ
jeremylongshore/claude-code-plugins-plus-skills
ライセンス
MIT
最終更新
2026/5/12

Source: https://github.com/jeremylongshore/claude-code-plugins-plus-skills / ライセンス: MIT

本サイトは GitHub 上で公開されているオープンソースの SKILL.md ファイルをクロール・インデックス化したものです。 各スキルの著作権は原作者に帰属します。掲載に問題がある場合は info@alsel.co.jp または /takedown フォームよりご連絡ください。
原作者: jeremylongshore · jeremylongshore/claude-code-plugins-plus-skills · ライセンス: MIT