Openclaw 电话
使用 CallMyCall API 启动、结束和检查 AI 电话呼叫,并在聊天中返回结果。当用户要求呼叫某人、安排呼叫、结束呼叫时使用。
技能说明
name: openclaw-phone description: Use CallMyCall API to start, end, and check AI phone calls, and return results in chat. Use when the user asks to call someone, schedule a call, end a call, or fetch call results. homepage: https://api.callmycall.com
CallMyCall (OpenClaw Skill)
This skill helps you operate CallMyCall from chat. It is pull based (no webhook callbacks): you start a call, store the returned call ID in state, and later fetch status and results on demand.
API Key Resolution (OpenClaw best practice)
Resolve credentials in this order:
- Environment variable:
CALLMYCALL_API_KEY(preferred) - OpenClaw user config:
~/.openclaw/openclaw.jsonunderskills.openclaw-phone.apiKey - If still missing, first ask if the user wants to save the key in
~/.openclaw/openclaw.jsonfor future use.- If yes: ask for the key, then persist it.
- If no: ask for the key for one-time use only (do not persist).
Persistence rules:
- Never store API keys in
SKILL.md, examples, references, or memory/state files. - Do not write API keys into
recent_callsor any conversation-visible output. Do not tell the user “I won’t echo it back.” - If user declines persistence, use the provided key for the current task only.
How This Skill Should Work
- Resolve API key using the order in "API Key Resolution (OpenClaw best practice)".
- Collect required call info using a layered gating flow (below).
- Present a short review summary and ask for confirmation.
- On confirmation, call
POST /v1/start-call. - Store the returned
sidin state as a recent call.
Required Auth
Send the API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Never echo the API key back to the user or include it in logs/summaries.
Stateful Calls List (required)
Maintain a list (last 10) of recent calls in state:
recent_calls: array of objectsid(call SID)phone_numbertaskstarted_atstatus(optional, updated when you fetch)
Use this list to let the user say "end call 1" or "show results for call 2".
Layered Gating Flow (copy from web app)
Do not rely on a single validation step. Use all layers below.
Layer 1: Structured collection contract
Do not finalize a task until all required fields exist:
phone_numberlanguagecall_brief(background + goals)
Layer 2: Task gap analysis
When the user gives the initial request, analyze what is missing. Then ask only for missing info. If the user answers partially, repeat analysis and keep asking for the remaining gaps.
Layer 3: Prompt level enforcement
While missing info exists, continue gathering required fields. Do not proceed to the call until all required fields are present.
Layer 4: Runtime validation before finalizing
Before sending the call request:
- Ensure phone exists and is E.164
- Block emergency or premium numbers
- Ensure
from_numberis not the same asphone_number - Normalize
language; normalize voice fields (genderVoice,openaiVoice) only if provided - If scheduling is present, parse and clamp to a valid time
Layer 5: Human review gate
Present a short review summary:
- Phone number
- Call brief (background + goals)
- Language (and voice if provided)
- Any schedule
Ask: "Confirm and place the call?" Do not proceed without explicit confirmation.
Workflows
Start a Call
- Collect required fields using the layered gating flow.
- If a schedule/time is requested, follow Scheduled Calls below instead of calling the API immediately.
- Otherwise call
POST /v1/start-call. - Store the returned
sidinrecent_calls. - Reply with confirmation and the call ID.
Scheduled Calls (OpenClaw-side)
Because the API has no scheduling field, schedule via OpenClaw:
- Collect all required fields now.
- Save a compact call plan in skill state (phone, brief, language/voice, any options).
- Create a
cronjob at the target time that runs anagentTurnto place the call. - At fire time, load the stored plan, call
POST /v1/start-call, store thesid, and report back with call IDs.
If the user asks to schedule a call for later, schedule it on the OpenClaw side (cron) since the API does not support scheduling. Collect all required fields now, store a compact call plan in state, and create a cron job to execute start-call at the target time. At fire time, place the call and report back with call IDs.
List Recent Calls
- Read
recent_callsfrom state. - For each call, fetch status via
GET /v1/calls/:callIdif needed. - Display a numbered list.
Retry Until Answered (important)
When the user asks to call repeatedly until answered:
- Place one call with
POST /v1/start-call. - Poll
GET /v1/calls/:callIduntil terminal status. - Treat response as either flat (
status,duration) or nested (call.status,call.duration). - If status is
busy,no-answer,failed, orcanceled, wait requested interval and place next call. - Stop retry loop when:
- status is
in-progress, or - status is
completedwithduration > 0.
- status is
- Report each attempt (call ID + status) back to user.
Implementation note: keep one base URL per run (https://call-my-call-backend.fly.dev preferred) and use it consistently for both start + status endpoints.
End a Call
If the user says "end the call" without specifying which, list recent calls and ask which one.
If there is only one active call, confirm and end it.
Call:
POST /v1/end-callwith{ callSid }.
Get Results
When the user asks for call results:
- Fetch status via
GET /v1/calls/:callId. - If available, fetch transcript via
GET /v1/calls/:callId/transcripts/stream. - If the call was recorded, fetch recording URL via
GET /v1/calls/:callSid/recording.
Return:
- Status (completed, failed, canceled)
- Short summary (1 to 3 bullets)
- Transcript excerpt (first few lines)
- Recording URL (if present)
Safety and UX
- If user input is ambiguous, ask a clarification question.
- Never expose secrets or store API keys in transcript.
- If a request fails, show the HTTP error and suggest next steps.
References
- Full API reference:
references/api.md - Examples:
examples/prompts.md
如何使用「Openclaw 电话」?
- 打开小龙虾AI(Web 或 iOS App)
- 点击上方「立即使用」按钮,或在对话框中输入任务描述
- 小龙虾AI 会自动匹配并调用「Openclaw 电话」技能完成任务
- 结果即时呈现,支持继续对话优化