Skip to content

Fix live voice leg correlation - #56

Closed
dimavrem22 wants to merge 8 commits into
mainfrom
fix/paired-call-live-voice
Closed

Fix live voice leg correlation#56
dimavrem22 wants to merge 8 commits into
mainfrom
fix/paired-call-live-voice

Conversation

@dimavrem22

@dimavrem22 dimavrem22 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Executive Summary

Makes live voice validation select the recipient-owned call leg precisely when paired-call correlation is available, while retaining a strict compatibility lookup for older responses.

Description

  • Reads the driver call's optional paired_call_id after completion.
  • Queries the recipient identity with that value and rejects missing or ambiguous matches.
  • Requires both remote and local speech on the recipient leg.
  • Restricts the driver-leg transcript assertion to driver-local speech.
  • Keeps the compatibility lookup bounded by baseline IDs, direction, endpoints, timestamps, and uniqueness.
  • Names the caller as the explicit SMS recipient and requires the hosted agent to persist and, on a timed corrective turn, verify the exact action before readback while keeping the strict marker assertion.
  • Gives realtime responses a 30-second media-peer window while retaining mandatory two-way transcript proof.
  • Places the recipient and run marker first in the spoken request and uses longer speech-safe marker words across TTS/PSTN/STT.
  • Uses only the production hosted-call action operations: record the exact action, then edit that same action if either required field does not match.

Reason

A managed call produces separate records for the driver and recipient. Requiring recipient speech on the driver-owned transcript validates the wrong record and can fail despite a successful two-way conversation.

Decisions

  • Preserve every existing intent, action, call-status, and speech-mode assertion.
  • Fall back only when the installed SDK/API response does not expose paired correlation.
  • Reject ambiguous fallback results instead of accepting the newest nearby call.
  • Coordinate typed correlation support with inkbox#138.

Testing

  • Full local suite: 444 passed, 23 skipped.
  • Added unit coverage for paired lookup, compatibility lookup boundaries, ambiguity rejection, owned-leg transcript assertions, and the hosted action correction contract.

@dimavrem22 dimavrem22 closed this Aug 7, 2026
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.

1 participant