phone-calls

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI Phone Calls with StablePhone

借助StablePhone实现AI电话呼叫

Make AI-powered phone calls, buy phone numbers, and get transcripts via x402 payments at
https://stablephone.dev
.
通过x402支付,在
https://stablephone.dev
平台发起AI驱动的电话呼叫、购买电话号码并获取通话记录。

Setup

设置

See rules/getting-started.md for installation and wallet setup.
请查看rules/getting-started.md了解安装和钱包设置步骤。

Quick Reference

快速参考

TaskEndpointPrice
Make a call
https://stablephone.dev/api/call
$0.54
Check call status
GET https://stablephone.dev/api/call/{call_id}
Free
Buy phone number
https://stablephone.dev/api/number
$20.00
Top up number (30d)
https://stablephone.dev/api/number/topup
$15.00
List your numbers
GET https://stablephone.dev/api/numbers?wallet=0x...
Free
任务Endpoint价格
发起通话
https://stablephone.dev/api/call
$0.54
查看通话状态
GET https://stablephone.dev/api/call/{call_id}
免费
购买电话号码
https://stablephone.dev/api/number
$20.00
号码续费(30天)
https://stablephone.dev/api/number/topup
$15.00
列出你的号码
GET https://stablephone.dev/api/numbers?wallet=0x...
免费

Make a Call

发起通话

bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Call this person and ask if they are available for a meeting tomorrow at 2pm. Be polite and professional."
}'
Required:
  • phone_number
    — E.164 format (e.g.
    +14155551234
    )
  • task
    — instructions for the AI agent (what to say, how to behave)
Optional:
  • from
    — outbound caller ID (must be an active StablePhone number)
  • first_sentence
    — specific opening line
  • voice
    — voice preset (see Voice Options below)
  • max_duration
    — max call length in minutes (1-30, default 5)
  • wait_for_greeting
    — wait for recipient to speak first (default false)
  • record
    — record call audio (default true)
  • model
    "base"
    (default, best quality) or
    "turbo"
    (lowest latency)
  • transfer_phone_number
    — number to transfer to if caller requests a human
  • voicemail_action
    "hangup"
    (default),
    "leave_message"
    , or
    "ignore"
  • voicemail_message
    — message to leave (required when action is
    "leave_message"
    )
  • metadata
    — custom key-value data to attach
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Call this person and ask if they are available for a meeting tomorrow at 2pm. Be polite and professional."
}'
必填参数:
  • phone_number
    — E.164格式(例如
    +14155551234
  • task
    — AI Agent的指令(说什么、如何表现)
可选参数:
  • from
    — 外呼显示号码(必须是有效的StablePhone号码)
  • first_sentence
    — 特定开场白
  • voice
    — 语音预设(见下方语音选项)
  • max_duration
    — 最长通话时长(单位:分钟,范围1-30,默认5)
  • wait_for_greeting
    — 是否等待接听方先说话(默认false)
  • record
    — 是否录制通话音频(默认true)
  • model
    "base"
    (默认,音质最佳)或
    "turbo"
    (延迟最低)
  • transfer_phone_number
    — 当呼叫方请求转接时的目标号码
  • voicemail_action
    "hangup"
    (默认)、
    "leave_message"
    "ignore"
  • voicemail_message
    — 要留下的语音信息(当action为
    "leave_message"
    时为必填项)
  • metadata
    — 附加的自定义键值对数据

Check Call Status

查看通话状态

Poll until
completed
is true:
bash
npx agentcash fetch https://stablephone.dev/api/call/{call_id}
Response fields:
  • status
    — call status
  • completed
    — boolean, true when call is done
  • answered_by
    "human"
    ,
    "voicemail"
    , or
    "no_answer"
  • call_length
    — duration in seconds
  • summary
    — AI-generated call summary
  • transcript
    — full text transcript
  • transcripts
    — array of timestamped transcript segments
  • recording_url
    — URL to call recording
  • price
    — actual cost
Poll every 5-10 seconds. Calls typically complete in 1-5 minutes depending on
max_duration
.
轮询直到
completed
为true:
bash
npx agentcash fetch https://stablephone.dev/api/call/{call_id}
响应字段:
  • status
    — 通话状态
  • completed
    — 布尔值,通话结束时为true
  • answered_by
    "human"
    ,
    "voicemail"
    , or
    "no_answer"
  • call_length
    — 通话时长(秒)
  • summary
    — AI生成的通话摘要
  • transcript
    — 完整文字记录
  • transcripts
    — 带时间戳的通话记录片段数组
  • recording_url
    — 通话录音的URL
  • price
    — 实际费用
每5-10秒轮询一次。根据
max_duration
设置,通话通常在1-5分钟内完成。

Voice Options

语音选项

VoiceDescription
nat
American female (default)
josh
Articulate American male
maya
Young American female, soft
june
American female
paige
Calm, soft-tone female
derek
Soft and engaging male
florian
German male
Voice描述
nat
美国女性(默认)
josh
表达清晰的美国男性
maya
年轻美国女性,语气柔和
june
美国女性
paige
冷静、语调柔和的女性
derek
语气柔和有吸引力的男性
florian
德国男性

Buy a Phone Number

购买电话号码

Buy a number to use as outbound caller ID:
bash
npx agentcash fetch https://stablephone.dev/api/number -m POST -b '{"area_code": "415", "country_code": "US"}'
Optional:
  • area_code
    — 3-digit US/CA area code (random if omitted)
  • country_code
    "US"
    (default) or
    "CA"
Numbers expire after 30 days. Top up to extend.
购买号码用作外呼显示ID:
bash
npx agentcash fetch https://stablephone.dev/api/number -m POST -b '{"area_code": "415", "country_code": "US"}'
可选参数:
  • area_code
    — 美国/加拿大的3位区号(省略则随机分配)
  • country_code
    "US"
    (默认)或
    "CA"
号码30天后过期,可续费延长使用期限。

Top Up a Number

号码续费

bash
npx agentcash fetch https://stablephone.dev/api/number/topup -m POST -b '{"phone_number": "+14155551234"}'
Extends by 30 days from current expiry. Top-ups stack. Anyone can top up any number.
bash
npx agentcash fetch https://stablephone.dev/api/number/topup -m POST -b '{"phone_number": "+14155551234"}'
从当前过期时间起延长30天。续费可叠加,任何人都可为任何号码续费。

List Your Numbers

列出你的号码

bash
npx agentcash fetch https://stablephone.dev/api/numbers?wallet=YOUR_WALLET_ADDRESS
bash
npx agentcash fetch https://stablephone.dev/api/numbers?wallet=YOUR_WALLET_ADDRESS

Workflows

工作流

Quick Call

快速呼叫

  • (Optional) Check balance:
    npx agentcash wallet info
  • Make call with task instructions
  • Poll status until completed
  • Review transcript and summary
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Ask if the business is open on weekends and what their hours are."
}'
  • (可选)查看余额:
    npx agentcash wallet info
  • 携带任务指令发起呼叫
  • 轮询状态直到通话完成
  • 查看通话记录和摘要
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Ask if the business is open on weekends and what their hours are."
}'

Leave a Voicemail

留下语音信箱

bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Leave a voicemail about the appointment.",
  "voicemail_action": "leave_message",
  "voicemail_message": "Hi, this is a reminder about your appointment tomorrow at 3pm. Please call back to confirm."
}'
For natural voicemail delivery, use
"voicemail_action": "ignore"
which bypasses detection and lets the AI speak naturally into the voicemail system.
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Leave a voicemail about the appointment.",
  "voicemail_action": "leave_message",
  "voicemail_message": "Hi, this is a reminder about your appointment tomorrow at 3pm. Please call back to confirm."
}'
如需自然的语音信箱投递效果,请使用
"voicemail_action": "ignore"
,该设置会跳过检测,让AI自然地在语音信箱系统中留言。

Call with Transfer

可转接的通话

bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Qualify this lead. Ask about their budget and timeline. If they are interested, offer to transfer to a sales rep.",
  "transfer_phone_number": "+14155559999",
  "voice": "josh",
  "max_duration": 10
}'
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "task": "Qualify this lead. Ask about their budget and timeline. If they are interested, offer to transfer to a sales rep.",
  "transfer_phone_number": "+14155559999",
  "voice": "josh",
  "max_duration": 10
}'

Set Up Dedicated Number

设置专用号码

  • Buy a phone number ($20)
  • Use it as caller ID for outbound calls
  • Top up before expiry ($15/30 days)
bash
npx agentcash fetch https://stablephone.dev/api/number -m POST -b '{"area_code": "212", "country_code": "US"}'
Then use it as
from
:
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "from": "+12125551234",
  "task": "Confirm the reservation for Friday at 7pm."
}'
  • 购买电话号码(20美元)
  • 将其用作外呼显示ID
  • 过期前续费(15美元/30天)
bash
npx agentcash fetch https://stablephone.dev/api/number -m POST -b '{"area_code": "212", "country_code": "US"}'
然后将其作为
from
参数使用:
bash
npx agentcash fetch https://stablephone.dev/api/call -m POST -b '{
  "phone_number": "+14155551234",
  "from": "+12125551234",
  "task": "Confirm the reservation for Friday at 7pm."
}'

Cost Estimation

费用估算

TaskCost
Single call$0.54
Call + dedicated number$20.54
Monthly number maintenance$15.00
10 calls/month + number$20.00 + $5.40 = $25.40 first month
任务费用
单次通话$0.54
通话+专用号码$20.54
号码月度维护费$15.00
每月10次通话+号码首月20.00美元 + 5.40美元 = 25.40美元