Vignesh
Vignesh

Reputation: 644

iOS Amazon Chime SDK - Maintaining Audio During Incoming GSM Call (Not Answered)

I am using the Amazon Chime SDK for implementing audio and video calls in my iOS application. I have encountered a scenario where the Chime audio call gets disconnected automatically when a GSM call is received, even if the GSM call is not answered.

Expected Behavior: When an incoming GSM call is received but not answered, the Chime call's audio should remain active, similar to how other VoIP applications like Slack or WhatsApp handle such scenarios.

Current Issue: Whenever a GSM call is received, the Chime call disconnects, regardless of whether the GSM call is answered or dismissed. I have attempted configuring the AVAudioSession as follows:

swift

func configureAudioSession() {
        let audioSession = AVAudioSession.sharedInstance()
        do {
            if audioSession.category != .playAndRecord {
                try audioSession.setCategory(AVAudioSession.Category.playAndRecord,
                                             options: AVAudioSession.CategoryOptions.allowBluetooth)
                try audioSession.setActive(true, options: .notifyOthersOnDeactivation)
            }
            if audioSession.mode != .voiceChat {
                try audioSession.setMode(.voiceChat)
            }
        } catch {
            logger.error(msg: "Error configuring AVAudioSession: \(error.localizedDescription)")
        }
    }

However, this configuration did not prevent the disconnection of the Chime call during an incoming GSM call.

Questions:

Is there any recommended configuration or specific setup in the Chime SDK to prevent call disconnections when GSM calls are received but not answered? Does the Chime SDK have limitations in handling such scenarios compared to other VoIP apps like Slack, which manage to keep their calls active during an incoming GSM call? Are there any workarounds or updates planned to address this behavior? Any guidance or best practices to resolve this issue would be highly appreciated.

logs:

[INFO] MeetingModel - API/DefaultAudioVideoFacade/stop
[INFO] MeetingModel - Stopping VideoClient
[ERROR] MeetingModel - xal_apple: timed out waiting for spk shutdown
[ERROR] MeetingModel - media stream: failed to stop mic audio; err=7
[ERROR] MeetingModel - failed to stop media stream; err=8
[INFO] MeetingModel - AudioClient State: finishDisconnecting Status: ok
"ok"
[INFO] MeetingModel - API/DefaultAudioVideoFacade/stop
[INFO] MeetingModel - Stopping VideoClient
[INFO] MeetingModel - videoClientDidStop
[INFO] MeetingModel - VideoClient is being destroyed
[INFO] MeetingModel - VideoClient is being destroyed 

Thanks

Upvotes: 0

Views: 43

Answers (1)

Vignesh
Vignesh

Reputation: 644

The Chime SDK supports three configurations: incoming, outgoing, and disabled.

The incoming and outgoing configurations use CallKit, enabling the VoIP call to behave like a native phone call.

The disabled configuration relies on AVAudioSession, meaning that streaming will be interrupted, and the call will disconnect if AVAudioSession is interrupted.

When a GSM call is received, the VoIP call will automatically disconnect, even if the GSM call is not answered.

Upvotes: 0

Related Questions