Skip to content
Sinch Voice API: Choosing between v1 and v2

For all new projects, please use Voice API v2. This is especially important for projects involving:

  • AI capabilities like Streams and Voice Relay
  • Voice campaigns like Batch calling

You should only use the older Voice API v1 if one of the following is a strict requirement:

  • The project must be in General Availability (GA).
  • The project requires In-App voice or Conferencing (until these features are available in v2).

Voice Relay Stream Control

Commands that can be executed on an ongoing stream.

Connection Flow Diagram

Customer WebSocket ServerSinch PlatformCustomer WebSocket ServerSinch PlatformWebSocket ConnectionStream endedalt[WS accepted][WS rejected]Session StartFirst protocol message.Server decides to accept or decline.Stream endedalt[Accepted][Declined]Live Relay LoopSTT (Platform to Server)TTS (Server to Platform)Multiple chunks allowed.A batch ends when isLast=true.Playback Status (Platform to Server)DTMF (Bidirectional)Interrupt Handlingalt[Manual stop requested]Playback continues normally.alt[Speech detected during TTS][No speech interruption]loop[While call is active]Call EndStream endedStream endedalt[Customer closes connection][Sinch ends call]WS connect requestAccept connectionNon-success responseConnectRequest{command: connect}AnswerResponse{command: answer}Close WebSocket (no answer)TextMessage{command: text}TextResponseMessage{command: text}PlaybackEvent{command: textPlaybackStart|textPlaybackStop|textPlaybackCancel}DtmfReceive{command: dtmf}DtmfSend{command: dtmf}InterruptDetect{command: interrupt}Interrupt{command: interrupt}WebSocket closeWebSocket close
Customer WebSocket ServerSinch PlatformCustomer WebSocket ServerSinch PlatformWebSocket ConnectionStream endedalt[WS accepted][WS rejected]Session StartFirst protocol message.Server decides to accept or decline.Stream endedalt[Accepted][Declined]Live Relay LoopSTT (Platform to Server)TTS (Server to Platform)Multiple chunks allowed.A batch ends when isLast=true.Playback Status (Platform to Server)DTMF (Bidirectional)Interrupt Handlingalt[Manual stop requested]Playback continues normally.alt[Speech detected during TTS][No speech interruption]loop[While call is active]Call EndStream endedStream endedalt[Customer closes connection][Sinch ends call]WS connect requestAccept connectionNon-success responseConnectRequest{command: connect}AnswerResponse{command: answer}Close WebSocket (no answer)TextMessage{command: text}TextResponseMessage{command: text}PlaybackEvent{command: textPlaybackStart|textPlaybackStop|textPlaybackCancel}DtmfReceive{command: dtmf}DtmfSend{command: dtmf}InterruptDetect{command: interrupt}Interrupt{command: interrupt}WebSocket closeWebSocket close