6

We write VoIP application using CallKit and PortSIP and here is a problem is reproduced only on iOS 11.2.x. When user taps speaker button on CallKit provided screen system enables speaker but icon remains in disabled state. If user taps again system also turns speaker on and forgets about button. To disable speaker user should tap button twice. Has anybody met this bug? And what was your solution? (:

Thanks.

Alex Zaikin
  • 213
  • 3
  • 9

2 Answers2

13
    RTCDispatcher.dispatchAsync(on: RTCDispatcherQueueType.typeAudioSession) {
        let audioSession = RTCAudioSession.sharedInstance()
        audioSession.lockForConfiguration()
        let configuration = RTCAudioSessionConfiguration.webRTC()
        configuration.categoryOptions = [AVAudioSessionCategoryOptions.allowBluetoothA2DP,AVAudioSessionCategoryOptions.duckOthers,
                                         AVAudioSessionCategoryOptions.allowBluetooth]
        try? audioSession.setConfiguration(configuration)
        audioSession.unlockForConfiguration()
    }

It helps me for CallKit. Speaker button works as expected.

-1

The same issue has been experienced in the previous versions as well. So this is not the new issue happening on the call kit.

This issue has to be resolved from iOS. We don't have any control over this.

RJV Kumar
  • 2,283
  • 16
  • 28