-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Description
Voice calls work great with and without a headset but if we have 2 devices connected invite call throws an error:
Failed to make call: NotReadableError: Could not start audio source
The code that calls it:
try {
// Construct full SIP URI if only number is provided
const fullUri = targetUri.includes('@') ? targetUri : getSIPUri(sipConfig, targetUri);
const inviter = new window.SIP.Inviter(userAgentRef.current, window.SIP.UserAgent.makeURI(fullUri), { extraHeaders });
setCurrentCall(inviter);
setCallStatus(CallStatus.Calling);
addNotification('call', `Calling ${targetUri}`);
// Set up session state change handler
inviter.stateChange.addListener((newState) => {
switch (newState) {
case window.SIP.SessionState.Establishing:
setCallStatus(CallStatus.Connecting);
break;
case window.SIP.SessionState.Established:
setCallStatus(CallStatus.Connected);
setupAudio(inviter);
addNotification('call', 'Call connected');
break;
case window.SIP.SessionState.Terminated:
setCallStatus(CallStatus.Ended);
setCurrentCall(null);
cleanupAudio();
addNotification('call', 'Call ended');
setTimeout(() => setCallStatus(CallStatus.Idle), 2000);
break;
}
});
await inviter.invite();
} catch (error) {
console.error('Failed to make call:', error);
setCallStatus(CallStatus.Idle);
setCurrentCall(null);
addNotification('error', `Failed to make call: ${error.message}`);
}
The error happens on the await inviter.invite(); line.
To Reproduce
Steps to reproduce the behavior:
- Connect two headsets to the same computer
- Make a call that normally works (
makeCall)
Expected behavior
The call works as usual
Observed behavior
We receive an error, the call fails
Failed to make call: NotReadableError: Could not start audio source

Environment Information
- Checked in Chrome Version 142.0.7444.176 (Official Build) (64-bit)
Additional context
- Google Meet works in the same browser with the same setup, so may be something could be done to fix it?
Metadata
Metadata
Assignees
Labels
No labels