WebRTCClientConfig
The configuration object passed tocreateWebRTCClient().
WebRTCClient
The main client interface returned bycreateWebRTCClient(). Provides all call control, state query, and event handling methods.
CallSession
Represents an active call session.SessionStatus
CallEndInfo
Contains information about why a call ended.Transcription Data
Thetranscription event emits the value of the _transcription property from incoming SIP INFO messages. The structure depends on your Cognigy Voice Gateway configuration, but typically has the following shape:
This is not a formally defined SDK interface. The transcription data is passed through as-is from the SIP INFO message body. The actual structure depends on your Voice Gateway configuration.
WebRTCClientEvents
Type map of all event names to their callback signatures. Use this for type-safe event handling. The following events are emitted by the client:TypeScript Usage
The SDK is written in TypeScript and ships comprehensive type definitions. All interfaces and types can be imported directly:Type-Safe Event Handling
Use theWebRTCClientEvents type map for fully typed event callbacks:
Type-Safe Info Messages
When sending structured data viasendInfo(), you can define your data shape: