Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answer call from bluetooth headset. #966

Open
basulle opened this issue Dec 2, 2024 · 3 comments
Open

Answer call from bluetooth headset. #966

basulle opened this issue Dec 2, 2024 · 3 comments

Comments

@basulle
Copy link

basulle commented Dec 2, 2024

@benoit-martins Hi, facing an issue with your app and linphone-sdk version 5.3.96.

Answering a call from bluetooth headset (AirPods by double tapping) and then trying to switch the output device to Earpiece keeps playing it to Bluetooth, but showing that the output is Earpiece.

In linphone-sdk if you try to accept the call from bluetooth headsets, the earpiece output will not work for first time, if you try to select it again, it works. If you are using Bluetooth headsets but answering the call from the phone screen, then switching the output works correctly.

This issue is reproduced very consistently, but sometimes it works, but really often.

Using iPhone 13 Pro with iOS version 17.7.

This issue is still present in your Linphone application.

Thank you!

@benoit-martins
Copy link
Contributor

Hi,

Thank you for reporting this issue.

I’ve tested this scenario on my side using the master branch of the Linphone SDK (version 5.4.0) and could not reproduce the issue. However, I understand you are using version 5.3.96, which might behave differently.

Could you provide additional details to help us investigate further?

Have you tested with other Bluetooth headsets or devices to see if the issue is specific to AirPods?
Are there any logs or error messages available during the issue?
In the meantime, I recommend updating to the latest SDK version (5.4.0), which includes fixes and improvements that might address this behavior. If the issue persists after updating, we can investigate further.

Thank you for your patience and for bringing this to our attention!

Best regards,

@basulle
Copy link
Author

basulle commented Dec 5, 2024

Hi @benoit-martins , appreciate your attention and answer.

Currently I am able to test with AirPods. Another people are facing this issue using other headsets (not Apple products).

`
Message [mediastreamer] Card 'AU: [default]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AU: [iPhone Микрофон] [Microphone]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AU: [Speaker] [Speaker]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AQ: Audio Queue Device [Unknown]' added with capabilities [playback]
Message [liblinphone] [ setOutputAudioDeviceBySndCard ] on device: [default]
Message [liblinphone] [ setInputAudioDeviceBySndCard ] on device: [default]
Message [liblinphone] Linphone core [0x107032000] notified [audio_devices_list_updated]
Message [liblinphone] [MS2AudioStream] setting type of soundcard 0x30135fc00 to voice
Message [liblinphone] Call's input audio device is [default]

Message [liblinphone] Linphone core [0x107032000] notified [call_created]
Message [bctbx] Background task Liblinphone call notification started. Unknown remaining time since application is not fully in background.
Message [liblinphone] Starting background task [11] with name: [Liblinphone call notification] and expiration of [30]
Message [liblinphone] Notifying capture sound card that it is going to be used.
Message [liblinphone] Notifying playback sound card that it is going to be used.
Message [liblinphone] [ToneManager] destroyRingStream
Message [liblinphone] Native (ie platform dependant) ringing is enabled, so not ringing from liblinphone.
Message [liblinphone] CallSession [0x301b3c9b8] moving from state LinphoneCallIdle to LinphoneCallIncomingReceived

Message [mediastreamer] [IOS Audio Route Change] msiounit audio route change callback
Message [mediastreamer] [IOS Audio Route Change] Previous audio route: input=No input, output=AirPods, New audio route: input=No input, output=AirPods
Message [mediastreamer] [IOS Audio Route Change] Audio unit not initialized, ignore route change
Message [liblinphone] Incoming call ringing for 2 seconds
Message [liblinphone] [sqlite3][2067]abort at 27 in [INSERT into cfurl_cache_response (version, hash_value, storage_policy, request_key, partition) VALUES (?, ?, ?, ?, ?);]: UNIQUE constraint failed: cfurl_cache_response.request_key
Message [liblinphone] Incoming call ringing for 3 seconds
Message [liblinphone] Incoming call ringing for 4 seconds
Message [liblinphone] Incoming call ringing for 5 seconds
Message [liblinphone] Incoming call ringing for 6 seconds
Message [mediastreamer] au_update_ms_snd_card
Message [mediastreamer] Not activating the AVAudioSession because it is CallKit's job.
Message [mediastreamer] MSAURead/MSAUWrite: configureAudioSession() took 2 ms.

Message [belle-sip] Changing [server] [INVITE] transaction [0x30050df80], from state [PROCEEDING] to [ACCEPTED]
Message [belle-sip] Dialog [0x300c55c00]: now updated by transaction [0x30050df80].
Message [liblinphone] CallSession [0x301b3c9b8] moving from state LinphoneCallIncomingReceived to LinphoneCallConnected
Message [liblinphone] MainDb::addEvent() of type ConferenceCallConnected (value 21)
Message [liblinphone] Update conference call in database: [email protected]
Message [liblinphone] Linphone core [0x107032000] notified [call_log_updated]

Message [liblinphone] Linphone core [0x107032000] notified [audio_device_changed]
Message [mediastreamer] [IOS Audio Route Change] msiounit audio route change callback
Message [mediastreamer] [IOS Audio Route Change] Previous audio route: input=AirPods, output=AirPods, New audio route: input=iPhone Микрофон, output=Приемник
Message [mediastreamer] ms2 event : on_audio_route_changed_received

Message [mediastreamer] [IOS Audio Route Change] Previous audio route: input=iPhone Микрофон, output=Приемник, New audio route: input=AirPods, output=AirPods
Message [mediastreamer] [IOS Audio Route Change] new device AirPods available
Message [mediastreamer] ms2 event : on_audio_route_changed_received
tcp_input [C36.1.1:3] flags=[R] seq=2731307570, ack=0, win=0 state=CLOSED rcv_nxt=2731307570, snd_una=1243980765
Message [mediastreamer] Card 'AU: [default]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AU: [iPhone Микрофон] [Microphone]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AU: [AirPods] [Bluetooth] [capture, playback]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AU: [Speaker] [Speaker]' added with capabilities [capture, playback]
Message [mediastreamer] Card 'AQ: Audio Queue Device [Unknown]' added with capabilities [playback]
Message [liblinphone] [ setOutputAudioDeviceBySndCard ] on device: [iPhone Микрофон]
Message [liblinphone] [ setInputAudioDeviceBySndCard ] on device: [iPhone Микрофон]
Message [liblinphone] Call's input audio device is [iPhone Микрофон]
Message [liblinphone] Linphone core [0x107032000] notified [audio_devices_list_updated]
Message [liblinphone] [MS2AudioStream] setting type of soundcard 0x301355c20 to voice
Message [mediastreamer] audio_playback_set_internal_id(): Trying to change audio output route from [iPhone Микрофон] to [AirPods]
Message [mediastreamer] au_update_ms_snd_card
Message [mediastreamer] apply_sound_card_to_audio_session()
Message [mediastreamer] apply_sound_card_to_audio_session(): change AVAudioSession preferred input to AirPods.
Message [mediastreamer] [AudioStream] set output sound card for MSAUWrite:0x300168e60 to AU: [AirPods] [Bluetooth] [capture, playback]
Message [liblinphone] Linphone core [0x107032000] notified [audio_device_changed]
Message [liblinphone] Linphone core [0x107032000] notified [audio_device_changed]
Message [liblinphone] Bandwidth usage for CallSession [0x301b3c9b8]:
Stream #0 (audio) | cpu: 0.65 | RTP : [d=74.12,u=78.44] RTCP: [d=0.03,u=0.77] (kbits/sec)
Warning [mediastreamer] AudioUnit capture sample time discontinuity (current=235306, previous=107520, inNumberFrames=1024) ! This usually happens during audio route changes.
Warning [mediastreamer] AudioUnit playback discontinuity detected (current=128811, previous=106496, inNumberFrames=1024).
Message [mediastreamer] Adjusting output timestamp by 7280
Message [mediastreamer] sound/wall clock skew is average=2.669971 ms
Message [ortp] Sending RTCP SR compound message on session [0x107105c00].
Message [mediastreamer] MSAudio_stream_iterate[0x104dc6050], local statistics available:
Local current jitter buffer size: 397.0ms
Message [liblinphone] Linphone core [0x107032000] notified [call_stats_updated]
Message [liblinphone] Bandwidth usage for CallSession [0x301b3c9b8]:
Stream #0 (audio) | cpu: 1.56 | RTP : [d=76.90,u=11.20] RTCP: [d=0.00,u=0.00] (kbits/sec)
Message [liblinphone] Bandwidth usage for CallSession [0x301b3c9b8]:
Stream #0 (audio) | cpu: 1.81 | RTP : [d=77.30,u=78.42] RTCP: [d=0.00,u=1.12] (kbits/sec)
Message [ortp] Sending RTCP SR compound message on session [0x107105c00].
Message [mediastreamer] MSAudio_stream_iterate[0x104dc6050], local statistics available:
Local current jitter buffer size: 410.4ms
Message [liblinphone] Linphone core [0x107032000] notified [call_stats_updated]
Message [liblinphone] Bandwidth usage for CallSession [0x301b3c9b8]:
Stream #0 (audio) | cpu: 1.75 | RTP : [d=76.74,u=78.42] RTCP: [d=0.00,u=0.00] (kbits/sec)
`

If you need the full logs I can provide you via email or something.
About 5.4.0 version, I am not seeing it in https://download.linphone.org/releases/ios/novideo/

Cheers,

@basulle
Copy link
Author

basulle commented Dec 9, 2024

@benoit-martins Hi, any updates on this one?

And when linphone 5.4 will be available in https://download.linphone.org/releases/ios/novideo/ ?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants