Route DIDs straight to an orchestration's Inbound Phone channel #74

Merged
Patrick merged 1 commit from patrick/did-to-orchestration into main 2026-11-07 10:04:14 -05:00 AGit
Owner

Lets a phone number route calls straight to an orchestration's Inbound Phone channel, without needing an AI extension.

  • DID form: new "Orchestration (Inbound Phone)" destination. It refuses to save until that channel has a persona and is connected to a flow.
  • Flow editor: the Inbound Phone channel's settings get an "Answered by" persona picker.
  • Routing: the DID's rule dials r{rule id}@livekit. The worker's room-name pattern accepts it, and AiCallTarget resolves it to the client, persona and entry flow.
  • Call sessions record their entry flow, so post-call actions and handoff numbers follow the path the call actually took.
  • Migration: widens the Postgres CHECK on routing_rules.destination_type. SQLite had silently lost this constraint, so the tests can't catch it. Please verify on Postgres before release.

Tests: 7 new in DidToOrchestrationTest; full suite 472 passed, 8 skipped.

🤖 Generated with Claude Code

Lets a phone number route calls straight to an orchestration's **Inbound Phone** channel, without needing an AI extension. - **DID form:** new "Orchestration (Inbound Phone)" destination. It refuses to save until that channel has a persona and is connected to a flow. - **Flow editor:** the Inbound Phone channel's settings get an "Answered by" persona picker. - **Routing:** the DID's rule dials `r{rule id}@livekit`. The worker's room-name pattern accepts it, and `AiCallTarget` resolves it to the client, persona and entry flow. - **Call sessions** record their entry flow, so post-call actions and handoff numbers follow the path the call actually took. - **Migration:** widens the Postgres CHECK on `routing_rules.destination_type`. SQLite had silently lost this constraint, so the tests can't catch it. **Please verify on Postgres before release.** Tests: 7 new in `DidToOrchestrationTest`; full suite 472 passed, 8 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Route DIDs straight to an orchestration's Inbound Phone channel
Some checks failed
Application Tests / frontend (pull_request) Successful in 43s
Application Tests / security-audit (pull_request) Failing after 1m41s
Application Tests / php (pull_request) Successful in 3m43s
Application Tests / tag (pull_request) Has been skipped
Application Tests / publish-images (., Dockerfile, laravel) (pull_request) Has been skipped
Application Tests / publish-images (agent-worker, Dockerfile, agent-worker) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk, Dockerfile, asterisk) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk-config-sync, Dockerfile, asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (agent-worker) (pull_request) Has been skipped
Application Tests / scan-images (asterisk) (pull_request) Has been skipped
Application Tests / scan-images (asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (laravel) (pull_request) Has been skipped
Application Tests / publish-helm (pull_request) Has been skipped
Application Tests / publish-archives (pull_request) Has been skipped
83c61e5cf7
A DID can now send calls to "Orchestration (Inbound Phone)" instead of
an extension. The Inbound Phone channel's settings in the flow editor
choose the persona that answers, and the call starts at the flow that
channel leads to. Extensions stay for people, internal transfers and
dialable AIs.

The DID's routing rule dials r{rule id} on the livekit endpoint, so the
room is agent-_r{rule}_...; the worker passes that back like an
extension number, and Orbital resolves either form to the client,
persona and entry flow (AiCallTarget).

Call sessions now record the flow they started in, so post-call actions
and handoff numbers follow the path the call actually took rather than
guessing from the persona's default.

Postgres kept the old enum CHECK on routing_rules.destination_type, so
the migration widens it to allow 'orchestration'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Patrick force-pushed patrick/did-to-orchestration from 83c61e5cf7
Some checks failed
Application Tests / frontend (pull_request) Successful in 43s
Application Tests / security-audit (pull_request) Failing after 1m41s
Application Tests / php (pull_request) Successful in 3m43s
Application Tests / tag (pull_request) Has been skipped
Application Tests / publish-images (., Dockerfile, laravel) (pull_request) Has been skipped
Application Tests / publish-images (agent-worker, Dockerfile, agent-worker) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk, Dockerfile, asterisk) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk-config-sync, Dockerfile, asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (agent-worker) (pull_request) Has been skipped
Application Tests / scan-images (asterisk) (pull_request) Has been skipped
Application Tests / scan-images (asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (laravel) (pull_request) Has been skipped
Application Tests / publish-helm (pull_request) Has been skipped
Application Tests / publish-archives (pull_request) Has been skipped
to 24dba4808d
All checks were successful
Application Tests / frontend (pull_request) Successful in 1m5s
Application Tests / security-audit (pull_request) Successful in 4m1s
Application Tests / php (pull_request) Successful in 4m30s
Application Tests / tag (pull_request) Has been skipped
Application Tests / publish-images (., Dockerfile, laravel) (pull_request) Has been skipped
Application Tests / publish-images (agent-worker, Dockerfile, agent-worker) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk, Dockerfile, asterisk) (pull_request) Has been skipped
Application Tests / publish-images (docker/asterisk-config-sync, Dockerfile, asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (agent-worker) (pull_request) Has been skipped
Application Tests / scan-images (asterisk) (pull_request) Has been skipped
Application Tests / scan-images (asterisk-config-sync) (pull_request) Has been skipped
Application Tests / scan-images (laravel) (pull_request) Has been skipped
Application Tests / publish-helm (pull_request) Has been skipped
Application Tests / publish-archives (pull_request) Has been skipped
2026-11-07 01:01:38 -05:00
Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
calltheory/orbital!74
No description provided.