VAPI-2990 Add connect status callbacks for Connect verb#13
Open
smoghe-bw wants to merge 2 commits into
Open
Conversation
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>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
onConnectStatuscallback toBandwidthRTCClient— fires when the gateway reports the outcome of a<Connect>verbConnectStatusenum (INITIATED,COMPLETED,TIMED_OUT,DENIED,CANCELED,FAILED) and connect status fields toReadyMetadatareadynotification withconnectStatuspopulated (not a separateconnectStatusevent); thereadyhandler dispatches toonConnectStatuswhen present,onReadyotherwiseTest plan
testReadyEventWithConnectStatusFiresOnConnectStatusCallback— ready with connectStatus firesonConnectStatuswith all fieldstestReadyEventWithConnectStatusDoesNotFireOnReady— ready with connectStatus does NOT fireonReadytestReadyEventWithoutConnectStatusFiresOnReady— plain ready still firesonReadytestConnectStatusEventNoLongerRegistered— no staleconnectStatusevent handler registeredtestEstablishedEventNoLongerRegistered—establishedhandler removed (prior fix)Implements VAPI-2990. Gateway-side handling: https://github.com/Bandwidth/pv-gateway/pull/44
🤖 Generated with Claude Code