在为Voip Flutter应用程序实现linphone iOS本机时,我遇到了一个问题。当然,应用程序必须使用callkit来通知是否有一个呼叫正在合并。当用户接听电话时,音频活动良好。但是,在那之后,我开始喊,却没有音频。我尝试了很多解决方案,但都不起作用(延迟启动呼叫、强制设置活动AVAudioSession…(,但运气不好,请帮我处理这个问题。非常感谢。
测试设备:iPad pro 2020-iOS 14.1,iPhone 11-iOS 14.1
2020-11-03 12:27:28:484 liblinphone-error-Failed in creating AVAudioPlayer: The operation couldn’t be completed. (OSStatus error 2003334207.)
Call incoming.
call coming objetc:
Optional(linphonesw.Call)
2020-11-03 12:27:28.486837+0700 Runner[673:109546] flutter: call click in coming true
2020-11-03 12:27:28.486967+0700 Runner[673:109546] flutter: incoming true
accept call objetc:
Optional(linphonesw.Call)
2020-11-03 12:27:28:487 ortp-warning-Fail to set IPv4 packet info on RTP socket: Invalid argument.
2020-11-03 12:27:28:487 ortp-warning-Fail to set IPv4 packet info on RTCP socket: Invalid argument.
We are connected !
2020-11-03 12:27:28:487 liblinphone-warning-Advanced adaptive rate control requested but avpf-tmmbr is not activated in this stream. Reverting to basic rate control instead
2020-11-03 12:27:28:487 ortp-warning-Fail to set IPv4 packet info on RTP socket: Invalid argument.
2020-11-03 12:27:28:487 ortp-warning-Fail to set IPv4 packet info on RTCP socket: Invalid argument.
2020-11-03 12:27:28:498 mediastreamer-error-Unable to activate audio session because : The operation couldn’t be completed. (OSStatus error 561017449.)
2020-11-03 12:27:28:570 mediastreamer-warning-MSAudio MSTicker: We are late of 59 miliseconds.
2020-11-03 12:27:28:643 mediastreamer-warning-MSAudio MSTicker: We are late of 62 miliseconds.
2020-11-03 12:27:28:709 mediastreamer-warning-MSAudio MSTicker: We are late of 58 miliseconds.
2020-11-03 12:27:28:786 mediastreamer-warning-MSAudio MSTicker: We are late of 56 miliseconds.
2020-11-03 12:27:28.813295+0700 Runner[673:109315] [aurioc] AURemoteIO.cpp:1095:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 48000 Hz, Int16> inf< 1 ch, 48000 Hz, Int16>)
2020-11-03 12:27:28:813 mediastreamer-error-Cannot start audioUnit because [!pri]
2020-11-03 12:27:28:813 mediastreamer-error-AudioUnit error for AudioUnitInitialize(card->audio_unit): ret=unknown error (561017449) (/Users/belledonne/builds/2jexENcu/2/BC/public/linphone-sdk/mediastreamer2/src/audiofilters/msiounit.m:349)
2020-11-03 12:27:28.822813+0700 Runner[673:109315] [aurioc] AURemoteIO.cpp:1095:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 48000 Hz, Int16> inf< 1 ch, 48000 Hz, Int16>)
2020-11-03 12:27:28:822 mediastreamer-error-Cannot start audioUnit because [!pri]
2020-11-03 12:27:28:822 mediastreamer-error-AudioUnit error for (auresult = AudioOutputUnitStart(card->audio_unit)): ret=unknown error (561017449) (/Users/belledonne/builds/2jexENcu/2/BC/public/linphone-sdk/mediastreamer2/src/audiofilters/msiounit.m:379)
2020-11-03 12:27:28.831621+0700 Runner[673:109315] [aurioc] AURemoteIO.cpp:1095:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 48000 Hz, Int16> inf< 1 ch, 48000 Hz, Int16>)
2020-11-03 12:27:28:831 mediastreamer-error-Cannot start audioUnit because [!pri]
2020-11-03 12:27:28:831 mediastreamer-error-AudioUnit error for AudioUnitInitialize(card->audio_unit): ret=unknown error (561017449) (/Users/belledonne/builds/2jexENcu/2/BC/public/linphone-sdk/mediastreamer2/src/audiofilters/msiounit.m:349)
2020-11-03 12:27:28.839506+0700 Runner[673:109315] [aurioc] AURemoteIO.cpp:1095:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 48000 Hz, Int16> inf< 1 ch, 48000 Hz, Int16>)
2020-11-03 12:27:28:839 mediastreamer-error-Cannot start audioUnit because [!pri]
2020-11-03 12:27:28:839 mediastreamer-error-AudioUnit error for (auresult = AudioOutputUnitStart(card->audio_unit)): ret=unknown error (561017449) (/Users/belledonne/builds/2jexENcu/2/BC/public/linphone-sdk/mediastreamer2/src/audiofilters/msiounit.m:379)
这通常是由与Callkit的错误集成引起的。事实上,liblinphone和callkit操作必须根据某些规则进行协调,以便iOS系统授予使用音频设备的权限。请参阅liblinphone的相关文档:
https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HCallKitintegration
致问候,
Simon