Skip to content

feat: AgentHook, GPT-Live phone path, and call transfer - #37

Merged
MatthewHsu1 merged 6 commits into
mainfrom
feat/hooks-and-gpt-live
Oct 5, 2026
Merged

MatthewHsu1 merged 6 commits into
mainfrom
feat/hooks-and-gpt-live

Conversation

@MatthewHsu1

Copy link
Copy Markdown
Owner

Change

  • AgentHook. Hosts can now see and gate the run. There are gates (Hooks.Gates) and notices (Hooks.Notices), with a HookScope for each call.
  • GPT-Live phone path. A GPT-Live call now runs through PhoneCall. It can greet first, and its greeting and settings come from configuration.
  • Conversation actions. A tool can ask the channel to act on the call through IConversationChannel. The answer is a ConversationActionResult.
  • Call transfer. TransferAction moves a GPT-Live call to another line. The transfer waits until the caller has heard the answer.
    • The default is OpenAI's SIP refer. OpenAI never reports the result of a REFER (probe T1). So when the peer closes the AI leg within the wait, the transfer worked.
    • A host can register its own ICallTransfer as a singleton. Its answer (Taken / NotTaken) is the outcome.
    • With TransferAction.IfFailed set, a failed transfer does not hang up. GPT-Live says the host's words, and the call goes on.
  • Routing and authentication for the Telnyx and OpenAI Live vendors.

Public API

All changes add API. Nothing in PublicAPI.Shipped.txt was removed.

Tests

OpenAiLiveTransferTests covers a refer the peer accepts, a refer it refuses, a host transfer that was taken, a host transfer that failed (the call goes on), and a call that cannot transfer.

@MatthewHsu1
MatthewHsu1 merged commit 28c5377 into main Oct 5, 2026
1 check passed
@MatthewHsu1
MatthewHsu1 deleted the feat/hooks-and-gpt-live branch October 5, 2026 19:09
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