From 91d1065f52a0f8dca8a440f85935f35a1094aae4 Mon Sep 17 00:00:00 2001 From: giumex Date: Sat, 28 Feb 2026 14:51:55 +0100 Subject: [PATCH] fix(voice-call): add missing region/edge uiHints, schema patterns, docs - Add twilio.region and twilio.edge uiHints to index.ts (was only in openclaw.plugin.json) - Add pattern constraints to JSON schema to match Zod validation - Allow digits in edge regex (^[a-z0-9-]+$) for future-proofing - Mention region/edge in SKILL.md Twilio config line --- extensions/voice-call/index.ts | 10 ++++++++++ extensions/voice-call/openclaw.plugin.json | 6 ++++-- extensions/voice-call/src/config.ts | 2 +- skills/voice-call/SKILL.md | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extensions/voice-call/index.ts b/extensions/voice-call/index.ts index d110dcc9c24..8947de7e59f 100644 --- a/extensions/voice-call/index.ts +++ b/extensions/voice-call/index.ts @@ -46,6 +46,16 @@ const voiceCallConfigSchema = { "telnyx.publicKey": { label: "Telnyx Public Key", sensitive: true }, "twilio.accountSid": { label: "Twilio Account SID" }, "twilio.authToken": { label: "Twilio Auth Token", sensitive: true }, + "twilio.region": { + label: "Twilio Region", + help: "Processing region: ie1 (Ireland) or au1 (Australia). Omit for US1 (default). Requires region-specific auth credentials.", + advanced: true, + }, + "twilio.edge": { + label: "Twilio Edge Location", + help: "Edge location (e.g. dublin, sydney, ashburn). Auto-inferred from region if omitted.", + advanced: true, + }, "outbound.defaultMode": { label: "Default Call Mode" }, "outbound.notifyHangupDelaySec": { label: "Notify Hangup Delay (sec)", diff --git a/extensions/voice-call/openclaw.plugin.json b/extensions/voice-call/openclaw.plugin.json index 2a15ac647fd..8e80d5b3a11 100644 --- a/extensions/voice-call/openclaw.plugin.json +++ b/extensions/voice-call/openclaw.plugin.json @@ -206,10 +206,12 @@ "type": "string" }, "region": { - "type": "string" + "type": "string", + "pattern": "^[a-z0-9]+$" }, "edge": { - "type": "string" + "type": "string", + "pattern": "^[a-z0-9-]+$" } } }, diff --git a/extensions/voice-call/src/config.ts b/extensions/voice-call/src/config.ts index dd74b3d4a5c..26852d2b3d0 100644 --- a/extensions/voice-call/src/config.ts +++ b/extensions/voice-call/src/config.ts @@ -78,7 +78,7 @@ export const TwilioConfigSchema = z */ edge: z .string() - .regex(/^[a-z-]+$/) + .regex(/^[a-z0-9-]+$/) .optional(), }) .strict(); diff --git a/skills/voice-call/SKILL.md b/skills/voice-call/SKILL.md index 7cfb5769252..bfc0a516596 100644 --- a/skills/voice-call/SKILL.md +++ b/skills/voice-call/SKILL.md @@ -39,7 +39,7 @@ Notes: - Requires the voice-call plugin to be enabled. - Plugin config lives under `plugins.entries.voice-call.config`. -- Twilio config: `provider: "twilio"` + `twilio.accountSid/authToken` + `fromNumber`. +- Twilio config: `provider: "twilio"` + `twilio.accountSid/authToken` + `fromNumber`. Optional `twilio.region` (ie1, au1) and `twilio.edge` (dublin, sydney) for non-US regions. - Telnyx config: `provider: "telnyx"` + `telnyx.apiKey/connectionId` + `fromNumber`. - Plivo config: `provider: "plivo"` + `plivo.authId/authToken` + `fromNumber`. - Dev fallback: `provider: "mock"` (no network).