Skip to main content
This page covers common issues with the Cognigy Click To Call SDK and how to resolve them.

Connection Issues

Symptom: Calling connect() or connectAndCall() throws an error or times out.Possible Causes and Solutions:
  • Incorrect endpoint URL. Verify that the endpointUrl in your configuration is correct and accessible. The URL must point to a valid Cognigy Click To Call configuration endpoint.
  • Network restrictions. Make sure your network allows WebSocket connections and UDP traffic. SIP/WebRTC communication needs both. Check firewall and proxy settings.
  • CORS issues. If the SDK canโ€™t fetch the SIP configuration, the endpoint server might not allow cross-origin requests from your domain.
Symptom: The registered event is never emitted, or the error event emits after connecting.
Endpoints that donโ€™t require SIP registration never emit the registered event. In this case, the missing event isnโ€™t an error.
Possible Causes and Solutions:
  • Invalid SIP credentials. The SIP configuration returned by the endpoint URL may contain invalid credentials. Contact your Cognigy administrator to verify the configuration.
  • SIP server unreachable. Ensure that the SIP server is reachable from the clientโ€™s network. Network firewalls may block the required ports.

Call Issues

Symptom: startCall() throws an error or doesnโ€™t initiate a call.Possible Causes and Solutions:
  • Client not connected. Call connect() and wait for it to finish before you call startCall(). If your endpoint requires registration, connect() finishes after the registered event. If you call startCall() before that, it fails with Client not connected. Call connect() first. or SIP client not registered. Alternatively, use connectAndCall() to combine both steps.
  • Microphone permission denied. The browser requires microphone access for Click To Call calls. Ensure that the user has granted microphone permission.
Symptom: The call connects, but no audio is heard.Possible Causes and Solutions:
  • Autoplay policy. Modern browsers block autoplay of media with audio. Start the call from a user gesture, for example, a button click. The SDK plays audio through an internal Audio element, but browser autoplay restrictions still apply.
  • No audio tracks in stream. The remote stream may not contain audio tracks. Check the browser developer console for warnings from the SDK such as โ€œStream has no audio tracksโ€.
Symptom: endCall(), mute(), sendInfo(), or sendDTMF() rejects with an error that contains No active session or Session not established.Possible Causes and Solutions:
  • Call not answered yet. These methods work only on an answered call. While the call is ringing, they fail. Wait for the answered event before you call them.
  • Call already ended. After the call ends or fails, no session is active.
The errors have the following format:The unmute() method does nothing if thereโ€™s no answered call and doesnโ€™t throw an error.
Symptom: The ended or failed event emits shortly after the call starts.Possible Causes and Solutions:
  • Network instability. Check the network connection. Click To Call is sensitive to network changes, especially on mobile devices.
  • Session timeout. The SIP server might have a session timeout configured. Check the cause, originator, and description fields of the CallEndInfo object. You get this object in the ended or failed event callback.

Transcription Issues

Symptom: The transcription event is never emitted during a call.Possible Causes and Solutions:
  • Transcription not enabled. Ensure that transcription is enabled in your Voice Gateway or Cognigy Flow configuration.
  • Info messages without _transcription. The SDK emits a transcription event only when an incoming info message contains a _transcription property. Regular info messages are emitted via infoReceived instead.

Browser Issues

Symptom: checkWebRTCSupport() returns { supported: false }.Possible Causes and Solutions:
  • Unsupported browser. The SDK requires a browser that supports WebRTC APIs: RTCPeerConnection, getUserMedia.
  • Insecure context. WebRTC APIs are only available in secure contexts such as HTTPS or localhost. Serve your application over HTTPS.
Symptom: The browser prompts for microphone access but the call fails.Possible Causes and Solutions:
  • Permission denied. The user must grant microphone permission. If the user denies it, the browser blocks access to the local audio stream.
  • Permission previously blocked. If the user blocked microphone access before, they must reset the permission manually in the browserโ€™s site settings.

Error Handling

The SDK supports two complementary approaches for catching errors.
All async methods return promises. Wrap them in the try and catch blocks:
Subscribe to the error event to catch asynchronous errors during the SDK lifecycle:
Combine both approaches. The try and catch blocks capture errors from direct calls, while the error event handles asynchronous errors.

Debugging Tips

Register listeners for all key events to trace the SDK lifecycle:
In Chrome, open chrome://webrtc-internals/. The page shows active WebRTC connections, including ICE candidates, codec negotiation, and media statistics.
Use the Network tab in the browserโ€™s DevTools. Inspect the WebSocket connections to check that the SIP signaling messages are exchanged correctly.
Last modified on October 23, 2026