技能 编程开发 Retell AI电话呼叫自动化工作流

Retell AI电话呼叫自动化工作流

v20260423
retellai-core-workflow-b
该工作流专为使用Retell AI进行高级语音代理和电话通信自动化设计。它支持管理完整的电话呼叫生命周期,包括执行批量外呼活动、处理呼叫转接以及管理并发呼叫。用户可以列出通话详情,并检索完整的通话录音和文字记录,进行深入分析。
获取技能
474 次下载
概览

Retell AI Core Workflow B

Overview

Manage phone calls: outbound campaigns, call transfers, recordings, and concurrent call handling.

Prerequisites

  • Completed retellai-core-workflow-a

Instructions

Step 1: Outbound Call Campaign

const phoneNumbers = ['+14155551001', '+14155551002', '+14155551003'];

for (const number of phoneNumbers) {
  try {
    const call = await retell.call.createPhoneCall({
      from_number: process.env.RETELL_PHONE_NUMBER!,
      to_number: number,
      override_agent_id: agentId,
      metadata: { campaign: 'appointment-reminder', date: '2026-04-01' },
    });
    console.log(`Called ${number}: ${call.call_id}`);
  } catch (err) {
    console.error(`Failed to call ${number}: ${err.message}`);
  }
  // Rate limit: space calls apart
  await new Promise(r => setTimeout(r, 2000));
}

Step 2: List and Filter Calls

const calls = await retell.call.list({
  sort_order: 'descending',
  limit: 20,
});
for (const call of calls) {
  console.log(`${call.call_id}: ${call.call_status} — ${call.end_timestamp - call.start_timestamp}ms`);
}

Step 3: Get Call Recording and Transcript

const callDetail = await retell.call.retrieve(callId);
if (callDetail.recording_url) {
  console.log(`Recording: ${callDetail.recording_url}`);
}
if (callDetail.transcript) {
  console.log(`Transcript:\n${callDetail.transcript}`);
}

Output

  • Outbound call campaign with rate limiting
  • Call listing with status and duration
  • Recordings and transcripts retrieved

Error Handling

Error Cause Solution
Call fails immediately Bad phone number format Use E.164 format
No recording Recording not enabled Enable in agent settings
Concurrent limit Too many active calls Upgrade plan or queue calls

Resources

Next Steps

Handle call events: retellai-webhooks-events

信息
Category 编程开发
Name retellai-core-workflow-b
版本 v20260423
大小 2.55KB
更新时间 2026-04-28
语言