Cognigy Click To Call SDK - Cognigy Documentation

Cognigy Click To Call SDK

Cognigy Click To Call SDK is a JavaScript/TypeScript SDK for adding SIP-based voice calling to web applications using WebRTC. Built on JsSIP, the SDK provides APIs to manage voice sessions, SIP signaling, audio streams, and transcription. The SDK is designed for developers building custom voice interfaces on top of the Cognigy.AI platform and Cognigy Voice Gateway.

What’s in This SDK?

SDK Purpose

The Click To Call SDK helps developers:

Requirements

Requirement Details
Language JavaScript or TypeScript. The SDK works with any framework, including React, Angular, Vue, or vanilla JS.
Node.js 18 or later
Package manager npm
Browsers Modern web and mobile browsers. For more information, refer to Supported Browsers.
Network HTTPS or localhost. WebSocket and UDP traffic must be allowed.
Backend A Cognigy.AI Flow with a configured Voice Gateway Endpoint.

Use Cases

Key Features

Feature Description
Custom Audio Handling The automatic audio playback uses an internal Audio element. For advanced use cases, enable captureAudio: true in the client config to receive the raw MediaStream. The audioEnded event signals when playback stops. See Custom Audio.
Full Call Control The complete call management includes start, end, mute, unmute, and info messages as async methods. See API Reference.
Multimodality The multimodal interactions combine voice, text, and structured data in real time. The sendInfo method allows sending text and optional structured data during calls. See API Reference: sendInfo.
Event-Driven Architecture The event system provides 17 events covering connection state, call state, audio, transcription, and errors. See Event Reference.
Real-Time Transcription The transcription events are received during calls and automatically filtered from regular info messages. See Event Reference: transcription.

Changelog Reference

The latest SDK version is available on npm as @cognigy/click-to-call-sdk. For updates and fixes, refer to the Cognigy Click To Call SDK GitHub repository.

License

The Cognigy Click To Call SDK is licensed under the MIT License.

What’s Next?