Skip to content

feat(voice-call): support Twilio calls in IE1 and AU1#95832

Merged
steipete merged 1 commit into
openclaw:mainfrom
jodok:codex/twilio-regions
Jul 7, 2026
Merged

feat(voice-call): support Twilio calls in IE1 and AU1#95832
steipete merged 1 commit into
openclaw:mainfrom
jodok:codex/twilio-regions

Conversation

@jodok

@jodok jodok commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

AI-assisted: Codex.

What Problem This Solves

The voice-call plugin sends every Twilio Calls API request to US1. Calls and call records are region-specific, so IE1 and AU1 deployments cannot create, update, hang up, or inspect their calls through the US1 endpoint.

Closes #95828.

Why This Change Was Made

This adds one optional closed config field: twilio.region accepts us1, ie1, or au1. OpenClaw derives Twilio's documented REST hostname internally:

  • absent or us1api.twilio.com
  • ie1api.dublin.ie1.twilio.com
  • au1api.sydney.au1.twilio.com

The account-scoped base URL is prepared once and reused for mutations and status reads. Each path derives its SSRF allowlist from the actual request/base URL, so request routing and hostname policy cannot drift. No arbitrary base URL or user-selectable edge is exposed.

Config/default metric: one optional config surface added, zero defaults changed, zero config surfaces removed. Existing configs keep the shipped US1 behavior.

User Impact

Twilio voice-call users can target IE1 or AU1 with the Auth Token created in that Region. Existing US1 users see no behavior change. Unsupported region values fail config validation.

Evidence

  • Blacksmith Testbox tbx_01kwxddkwq631x975x00zmd94t: full voice-call extension suite passed — 50 files, 506 tests.
  • Same Testbox: changed-surface extension production/test typechecks, lint, import-cycle check, docs lane, and repository guards passed.
  • Same Testbox: pnpm docs:list passed; full docs check passed across 684 formatting/lint files, 700 MDX files, and 5,753 internal links with zero broken links.
  • Independent live probes returned HTTP 401 from api.twilio.com, api.dublin.ie1.twilio.com, and api.sydney.au1.twilio.com, confirming all three current HTTPS endpoints are active and enforce authentication.
  • Contributor credentialed proof: IE1 TwilioProvider.getCallStatus reached api.dublin.ie1.twilio.com with regional credentials and returned not-found for a deliberately nonexistent Call SID, without creating or modifying a call.
  • Fresh autoreview: no actionable findings, 0.93 confidence.
  • Current main and shipped v2026.6.11 both hardcode api.twilio.com; Twilio's current regional REST, edge, and regional-credential documentation were checked directly.

Known gap: no second maintainer-owned regional Twilio credential set was available. The contributor's credentialed IE1 provider proof covers the authenticated path; the maintainer pass independently verified all three live endpoints and the full test/docs surface.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call size: M size: S and removed size: M labels Jun 22, 2026
@jodok jodok changed the title [codex] Support Twilio regional API routing feat(voice-call): support Twilio calls in IE1 and AU1 Jun 22, 2026
@jodok
jodok marked this pull request as ready for review June 22, 2026 19:02
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 22, 2026
@clawsweeper

clawsweeper Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 4:54 PM ET / 20:54 UTC.

Summary
The PR adds optional twilio.region voice-call config, derives Twilio US1/IE1/AU1 REST hostnames, applies them to Twilio POST/status requests and SSRF allowlists, and updates docs, manifest metadata, and tests.

PR surface: Source +54, Tests +88, Docs +7. Total +149 across 12 files.

Reproducibility: yes. at source level: current main and v2026.6.11 hardcode Twilio REST requests and SSRF allowlists to api.twilio.com, with no twilio.region config. I did not run a credentialed current-main regional failure path.

Review metrics: 1 noteworthy metric.

  • Plugin config surface: 1 added, 0 changed, 0 removed; 0 env vars added. twilio.region is a new persisted plugin config key that steers Twilio REST routing and region-specific credential use.

Stored data model
Persistent data-model change detected: serialized state: extensions/voice-call/src/providers/twilio/api.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #95828
Summary: This PR is the open implementation candidate for the canonical Twilio regional voice-call REST routing feature request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Have a maintainer explicitly accept or reject the new twilio.region public config contract before merge.

Risk before merge

  • [P1] Merging adds a new public bundled-plugin config key and changes Twilio provider routing/auth expectations, so maintainers should explicitly accept the closed us1 | ie1 | au1 contract before merge.
  • [P1] Credentialed real behavior proof covers an IE1 status lookup through the regional hostname; create/update/hangup use the same API target path and are covered by tests, but were not live-mutated in the posted proof.

Maintainer options:

  1. Accept the region-only Twilio contract (recommended)
    Maintainers can accept the new public twilio.region contract and merge with the current redacted IE1 provider proof plus green PR checks.
  2. Ask for broader live call-control proof
    Before merge, require a redacted live Twilio proof that exercises a non-US create, update, or hangup mutation in addition to the status lookup.
  3. Pause if bundled voice-call config should stay smaller
    If maintainers do not want this routing option in the bundled plugin, keep the linked feature issue as the product decision point and close or narrow this PR.

Next step before merge

  • [P2] The remaining action is maintainer review of the new public Twilio region config and auth-routing contract, not a narrow automated repair.

Security
Cleared: No concrete security or supply-chain issue found; the SSRF-sensitive hostname change is enum-derived and the PR adds no dependencies, scripts, workflows, or credential exposure.

Review details

Best possible solution:

Land the region-only twilio.region contract if maintainers accept the new config surface, keeping exact enum-derived Twilio hostnames coupled to SSRF allowlists and the linked feature issue as the product record.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main and v2026.6.11 hardcode Twilio REST requests and SSRF allowlists to api.twilio.com, with no twilio.region config. I did not run a credentialed current-main regional failure path.

Is this the best way to solve the issue?

Yes, if maintainers accept the new config contract: the PR avoids arbitrary base URLs, derives exact Twilio hostnames from a closed region enum, and keeps SSRF policy coupled to the request host. The main alternative, exposing both edge and region, adds invalid combinations without useful REST ingress control.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 010b61746379.

Label changes

Label justifications:

  • P2: This is a bounded voice-call provider-routing feature with limited blast radius but real impact for IE1/AU1 Twilio deployments.
  • merge-risk: 🚨 auth-provider: The PR changes Twilio REST hostname selection and documents region-specific credentials, so provider routing/auth behavior needs maintainer acceptance beyond green tests.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes redacted copied live output from a credentialed IE1 status lookup through api.dublin.ie1.twilio.com, showing after-fix regional authentication and routing without mutating call state.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted copied live output from a credentialed IE1 status lookup through api.dublin.ie1.twilio.com, showing after-fix regional authentication and routing without mutating call state.
Evidence reviewed

PR surface:

Source +54, Tests +88, Docs +7. Total +149 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 7 63 9 +54
Tests 3 97 9 +88
Docs 2 7 0 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 167 18 +149

What I checked:

Likely related people:

  • steipete: Peter Steinberger restored the voice-call plugin parity surface, split the Twilio provider/API helper path, and is the dominant author in shortlog history for the central Twilio/config files. (role: feature owner; confidence: high; commits: 42c17adb5e4d, e4c3c02a36ff, 6f0b4caa266f; files: extensions/voice-call/src/providers/twilio.ts, extensions/voice-call/src/providers/twilio/api.ts, extensions/voice-call/src/config.ts)
  • garnetlyx: garnetlyx added the provider-backed call-status verification path, which is one of the Twilio regional-routing surfaces changed by this PR. (role: adjacent owner; confidence: medium; commits: ffa7c13c9b1c; files: extensions/voice-call/src/providers/twilio.ts, extensions/voice-call/src/runtime.ts)
  • vincentkoc: Vincent Koc appears in recent git log -S history for the current Twilio/config files through the latest release commit, though the commit subject is release/CI-oriented rather than a focused voice-call ownership change. (role: recent area contributor; confidence: low; commits: e085fa1a3ffd; files: extensions/voice-call/src/providers/twilio.ts, extensions/voice-call/src/providers/twilio/api.ts, extensions/voice-call/src/config.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@jodok

jodok commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 23, 2026
@jodok

jodok commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

anything I can do from my side to get this merged?

@steipete steipete self-assigned this Jul 7, 2026
Co-authored-by: Jodok Batlogg <158125+jodok@users.noreply.github.com>
@steipete
steipete force-pushed the codex/twilio-regions branch from 368ac48 to 3da7d02 Compare July 7, 2026 04:54
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Maintainer rewrite is land-ready at 3da7d0264d26dd2dc54cb8f6efb0cc05684ba28d.

What changed:

  • rebased onto current main and reduced the public surface to one optional twilio.region value (us1, ie1, or au1)
  • derived Twilio's documented regional REST hostname internally and reused it for mutations, status reads, and the exact SSRF allowlist
  • kept absent/us1 configuration byte-for-byte on the shipped api.twilio.com path; removed the contributor branch's extra API-target abstraction

Proof:

  • Blacksmith Testbox tbx_01kwxddkwq631x975x00zmd94t: pnpm test extensions/voice-call — 50 files, 506 tests passed
  • same Testbox: changed-surface extension typecheck, lint, import-cycle, docs, and repository guard lanes passed
  • same Testbox: pnpm docs:list and pnpm check:docs passed; 5,753 internal links, zero broken
  • fresh autoreview: clean, 0.93 confidence
  • exact-head hosted CI: https://github.com/openclaw/openclaw/actions/runs/28842517273 — passed
  • live unauthenticated endpoint probes: US1, IE1, and AU1 REST hosts each returned HTTP 401, confirming active endpoints with authentication enforcement
  • contributor credentialed IE1 proof reached Dublin and returned the expected Twilio not-found result for a deliberately nonexistent Call SID

Known gap: no second maintainer-owned regional Twilio credential set was available; the contributor's credentialed IE1 proof is retained, and the complete provider/config/SSRF matrix is covered by Testbox.

@steipete
steipete merged commit a2f95de into openclaw:main Jul 7, 2026
107 checks passed
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Jodok Batlogg <158125+jodok@users.noreply.github.com>
sheyanmin pushed a commit to sheyanmin/openclaw that referenced this pull request Jul 8, 2026
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Jodok Batlogg <158125+jodok@users.noreply.github.com>
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Jodok Batlogg <158125+jodok@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support Twilio Region configuration in voice-call

2 participants