Reference
?

session.end

Ends the session and releases the microphone.
session.end() → Promise<void>

Ends the call and releases the microphone. Along with mute, it is one of the two controls a voice UI must always keep visible and working.

End the call
await session.end();