Skip to main content
Listen with agent.on(name, handler), and stop with agent.off(name, handler). Add your listeners before you call start(), so you don’t miss the first events. The SDK keeps them from call to call, so add them once.

Show a live transcript

In a voice call, messageReceived sends the agent’s and the visitor’s words as they’re spoken. One sentence arrives several times while it grows, with the same id, and isFinal is true on the last time:
answerReceived (the agent) and transcriptionReceived (the visitor) send the same words as plain text. They fire for the partial text too, and don’t say when it’s final, so use messageReceived for a transcript.

All events

The call

The agent

The conversation

Microphone and audio

The connection

Analytics

Page tools

Data messages

Hamsa agents send their call logs as data messages, so these fire during most calls. What’s in them isn’t a stable interface: don’t build on their content.

Warn about a bad connection

Read call statistics

During a call you can read these at any time. They return null (or an empty list) when there’s no call.

During a call

End, pause, mute, volume and keypad digits.

Reference

Every option and method, with types.