Skip to content

VAPI-2990 Add connect status callbacks for Connect verb#13

Open
smoghe-bw wants to merge 2 commits into
mainfrom
VAPI-2990-connect-status-callbacks
Open

VAPI-2990 Add connect status callbacks for Connect verb#13
smoghe-bw wants to merge 2 commits into
mainfrom
VAPI-2990-connect-status-callbacks

Conversation

@smoghe-bw

@smoghe-bw smoghe-bw commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds onConnectStatus callback to BandwidthRTCClient — fires when the gateway reports the outcome of a <Connect> verb
  • Adds ConnectStatus enum (INITIATED, COMPLETED, TIMED_OUT, DENIED, CANCELED, FAILED) and connect status fields to ReadyMetadata
  • Routes correctly: the gateway sends a ready notification with connectStatus populated (not a separate connectStatus event); the ready handler dispatches to onConnectStatus when present, onReady otherwise

Test plan

  • testReadyEventWithConnectStatusFiresOnConnectStatusCallback — ready with connectStatus fires onConnectStatus with all fields
  • testReadyEventWithConnectStatusDoesNotFireOnReady — ready with connectStatus does NOT fire onReady
  • testReadyEventWithoutConnectStatusFiresOnReady — plain ready still fires onReady
  • testConnectStatusEventNoLongerRegistered — no stale connectStatus event handler registered
  • testEstablishedEventNoLongerRegisteredestablished handler removed (prior fix)

Implements VAPI-2990. Gateway-side handling: https://github.com/Bandwidth/pv-gateway/pull/44

🤖 Generated with Claude Code

smoghe-bw and others added 2 commits April 27, 2026 11:32
Surface connectStatus events from the gateway so SDK consumers can
react to the terminal outcome of a <Connect> verb (completed, timed out,
denied, canceled, failed). Extends ReadyMetadata with connect status
fields and adds a dedicated onConnectStatus callback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tStatus

The gateway intercepts connectStatus from the sidecar and forwards it to
the SDK as a ready notification with connect status fields embedded. Remove
the connectStatus event handler and instead route ready notifications to
onConnectStatus when connectStatus is present, onReady otherwise.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@smoghe-bw smoghe-bw requested review from a team as code owners April 29, 2026 16:02
@bwappsec

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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