Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

31006: Audio device error


ERROR: 31006

error-31006 page anchor
VOICE
ERROR

Twilio raises this Voice error when it can't start the audio device.

Possible causes

possible-causes page anchor
  • The browser has not been granted microphone access.
  • A USB headset is disconnected or faulty.
  • Headset driver issues are preventing the audio device from starting.
  • Ask for microphone access before you create the Device object by calling navigator.mediaDevices.getUserMedia({ audio: true }), and stop the tracks right away if you only need the device list. This helps surface getUserMedia errors early.
  • Update your device picker when device.audio.on('deviceChange', ...) fires so the UI reflects microphones or headsets that are plugged in, unplugged, or relabeled.
  • If users select a specific microphone, call device.audio.setInputDevice() before device.connect() or call.accept(), then call device.audio.unsetInputDevice() after the call disconnects so future calls can fall back to the default input device.
  • If you use Flex, keep initial audio device check enabled so Flex verifies device health at startup, on browser refresh, and when the available device list changes.

Additional resources

additional-resources page anchor