Skip to content

Add incoming call forwarding to SDKs and CLI - #153

Merged
dimavrem22 merged 6 commits into
mainfrom
feat/incoming-call-forwarding
Aug 23, 2026
Merged

Add incoming call forwarding to SDKs and CLI#153
dimavrem22 merged 6 commits into
mainfrom
feat/incoming-call-forwarding

Conversation

@dimavrem22

@dimavrem22 dimavrem22 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Executive Summary

Adds incoming-call forwarding configuration and history to every supported SDK and the CLI.

  • Configures identity-wide forwarding to one complete E.164 number or SIP URI.
  • Preserves omitted values separately from explicit clears across Python, TypeScript, and Rust.
  • Exposes chronological forwarding attempts without changing the call lifecycle status.

Description

Python, TypeScript, and Rust now expose the forward incoming-call action, typed phone/SIP destinations, phone-number and identity projections, and the additive PhoneCall.forwardings history. Older call responses without forwarding history continue to parse as an empty list, and call lifecycle webhook receiver types expose the same additive history.

The CLI adds mutually exclusive --forward-to-phone and --forward-to-sip flags to both identity incoming-action updates and phone-number updates. Public examples, package changelogs, exports, exact wire tests, and a shared cross-language fixture are included; no packages are published by this PR.

Reason

Customers need to route inbound identity calls to an external phone or SIP destination while retaining a consistent configuration and call-history contract across all clients.

Decisions

  • Clear semantics: Omitted forwarding fields preserve saved values while explicit null clears them; clearing an active target requires switching away from forward in the same update so the resulting configuration stays valid.
  • Destination shape: Callers provide one complete E.164 number or a SIP URI with a public DNS hostname; the SDKs do not introduce templates, authentication, headers, or transport controls.
  • History shape: PhoneCall.forwardings is an oldest-first array separate from PhoneCall.status, and V1 exposes only incoming_action as its trigger.
  • Rust compatibility: The existing positional set method remains unchanged, while set_with_options adds forwarding and explicit-clear support.

Testing

  • Python incoming_call_action.set, phone-number updates, config parsing, and call-history parsing: 49 focused tests passed; related identity coverage passed in a 92-test focused run.
  • TypeScript incoming action, phone-number update, call parsing, and identity delegator: 102 focused tests passed; npm run build passed.
  • Rust phone resources and types: 54 tests passed, including exact forwarding request bodies and shared-fixture parsing; cargo fmt --check passed.
  • CLI phone incoming-action forward --forward-to-sip: 19 phone-command tests passed; npm run build and npm pack --dry-run passed.
  • Python package: ruff check passed and uv build produced both source and wheel artifacts.
  • Compatibility wording follow-up: 27 Python resource tests and 21 TypeScript resource tests passed; Python lint and TypeScript/CLI builds passed.

Dependency

Built directly on #154; that dependency head is a Git ancestor of this branch.

Compatibility and rollout

Deploy the backend migration and API first. Publish the Python, TypeScript, Rust, and CLI release next and wait for registry propagation before enabling forwarding in the customer Console or publishing the Website docs. Python and Rust releases older than this change use closed IncomingCallAction enum decoding; after an identity is configured with forward, those older clients can fail while reading that identity or its incoming-call configuration. Deploy Admin Console only after the migration, then customer Console, then Website docs. This is additive for clients on the new release, but it is not read-compatible with strict older Python/Rust clients.

No packages are published by this PR.

@dimavrem22
dimavrem22 force-pushed the feat/incoming-call-forwarding branch 3 times, most recently from 87c80a4 to a33de2f Compare August 22, 2026 01:19
@dimavrem22
dimavrem22 force-pushed the feat/incoming-call-forwarding branch from a33de2f to 848778d Compare August 22, 2026 08:34
@dimavrem22
dimavrem22 marked this pull request as ready for review August 22, 2026 22:32
@dimavrem22
dimavrem22 merged commit 28e55c8 into main Aug 23, 2026
12 checks passed
@dimavrem22
dimavrem22 deleted the feat/incoming-call-forwarding branch August 23, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants