voiceip / tinyphone

Minimalist Windows / OSx / Linux SIP Softphone with API Control
GNU General Public License v3.0
122 stars 36 forks source link

Error connecting to sound card on VM #72

Closed SylPro closed 1 year ago

SylPro commented 1 year ago

Hello, We use Tinyphone successfully on physical computer having a sound card. But when installing it on a VM machine having also a sound card (virtual or shared from the hardware) we always have an error when tinyphone connect to audio device.

Error : "ERROR Connecting Audio device, Please contact Floor IT Support"

We don't figure what is missing in this context so tinyphone can open a channel to audio device. Do someone have an ideas?


In the log of Tinyphone, the différence begin with line "pjsua_aud.c !Conf connect: 0 --> 0" appearing when the problem occurs.


Part of Tinyphone Log when connect ok : 2022-12-20 14:38:49.465 phone.cpp Found Device #6 SPDIF Out (Realtek HDA SPDIF Out) 2022-12-20 14:38:49.465 phone.cpp Found Device #7 Mixage stéréo (Realtek HD Audio Stereo input) 2022-12-20 14:38:49.465 phone.cpp Using Default Audio Device(s) 2022-12-20 14:38:49.465 pjsua_aud.c Set sound device: capture=-1, playback=-2 2022-12-20 14:38:49.465 pjsua_aud.c Set sound device: capture=-1, playback=-2 2022-12-20 14:38:49.465 pjsua_aud.c .No changes in capture and playback devices 2022-12-20 14:38:49.466 phone.cpp Restoring User Accounts 0 2022-12-20 14:38:53.182 pjsua_core.c !.RX 264 bytes Request msg OPTIONS/cseq=1 (rdata004B09FC) from UDP 68.67.53.126:5060: OPTIONS sip:216.226.54.101:65476 SIP/2.0 Via: SIP/2.0/UDP 68.67.53.126:5060;branch=z9hG4bK7205733 From: sip:keepalive@68.67.53.126;tag=6fd74539 To: sip:216.226.54.101:65476 Call-ID: 799ac93e-9923afc2-2fbe1e8@68.67.53.126 CSeq: 1 OPTIONS Content-Length: 0


Part of Tinyphone Log when error occurs : 2022-12-20 14:19:34.932 phone.cpp Found Device #6 Speakers (USB Audio Device) 2022-12-20 14:19:34.932 phone.cpp Found Device #7 Microphone (USB Audio Device) 2022-12-20 14:19:34.932 phone.cpp Using Default Audio Device(s) 2022-12-20 14:19:34.932 pjsua_aud.c Set sound device: capture=-1, playback=-2 2022-12-20 14:19:34.932 pjsua_aud.c Set sound device: capture=-1, playback=-2 2022-12-20 14:19:34.932 pjsua_aud.c .No changes in capture and playback devices 2022-12-20 14:19:34.938 phone.cpp Restoring User Accounts 0 2022-12-20 14:19:35.089 pjsua_aud.c !Conf connect: 0 --> 0 ** DIFFERENCE HERE ** 2022-12-20 14:19:35.089 pjsua_aud.c .Set sound device: capture=-1, playback=-2 2022-12-20 14:19:35.089 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@8000/1/20ms 2022-12-20 14:19:35.673 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@44100/1/20ms 2022-12-20 14:19:35.688 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@48000/1/20ms 2022-12-20 14:19:35.702 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@32000/1/20ms 2022-12-20 14:19:35.715 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@16000/1/20ms 2022-12-20 14:19:35.729 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@8000/1/20ms 2022-12-20 14:19:35.742 pjsua_aud.c ..Unable to open sound device: Unanticipated host error [status=469998] 2022-12-20 14:19:35.742 pjsua_aud.c .Error opening sound device: Unanticipated host error [status=469998] 2022-12-20 14:19:35.742 media.cpp pjsua_conf_connect(id, sink.id) error: Unanticipated host error (status=469998) [E:\lib\pjproject\pjsip\src\pjsua2\media.cpp:218] 2022-12-20 14:19:35.755 phone.cpp TestAudioDevice Error Unanticipated host error

SylPro commented 1 year ago

It seems we found the problem. Application didn't had access to the Microphone on the server version of Windows.