I am integrating CallKit with VOIP app. I was able to make incoming and outgoing calls. I followed the step:
- ConfigureAudioSession
- startAudio in (didActivate)
- stopAudio in (didDeActivate)
I have implemented the callbacks for DTMF provider delegate as shown below:
func provider(_ provider: CXProvider, perform action: CXPlayDTMFCallAction) {
print("Provider - CXPlayDTMFCallAction")
let dtmfDigts:String = action.digits
for (index, _) in dtmfDigts.characters.enumerated() {
let dtmfDigit = dtmfDigts.utf8CString[index]
print("Processing dtmfDigit:\(dtmfDigit)" )
self.softphone.dtmf(on:dtmfDigit)
}
self.softphone.dtmfOff()
// Signal to the system that the action has been successfully performed.
action.fulfill()
}
I don't hear key-press sound i.e., local dtmf sounds when I press a number on the native in-call UI during the call.
From https://developer.apple.com/reference/callkit/cxplaydtmfcallaction:
"CallKit automatically plays the corresponding DTMF frequencies for any digits transmitted over a call. The app is responsible for managing the timing and handling of digits as part of fulfilling the action."
Is this a known issue or callkit doesn't play the local dtmf key press sounds?