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).

ConnectRequest

Payload Schema

  • command (string, required) Connect message

  • version (integer, required) Protocol version

  • callId (string, required) Call unique identifier

  • applicationKey (string, required) Service unique identifier

  • codec (string, required) Audio codec used for encoding binary audio frames transmitted over the WebSocket connection. Audio frames are 16-bit signed linear PCM, mono (single channel), with little-endian byte order.

  • sampleRate (integer, required) Audio sample rate in Hertz (Hz). The value is negotiated at call setup via the SVAML connectStream command. Higher sample rates provide better audio quality but increase bandwidth and processing requirements.

  • 8000 Hz: Narrowband telephony quality (standard PSTN)

  • 16000 Hz: Wideband quality, suitable for most voice applications

  • 24000 Hz: High-quality voice

  • 44100 Hz: CD-quality audio

  • 48000 Hz: Professional audio standard

  • 96000 Hz: Ultra high-quality audio

For calls traversing the PSTN, audio is typically sampled at 8 kHz; using a higher value will not improve perceived quality. Enum: 8000, 16000, 24000, 44100, 48000, 96000

  • callHeaders (object, required) Arbitrary key/value pairs (header name -> header value).