AVAudioSession Error: Domain Error = NSOSStatusErrorDomain Code = 561017449: Audio Unit Error Integrating CallKit API into Objective-C

I am developing a VoIP application using Pjsip in Objective-C.

I want to try integrating CallKit, but I got a configureAudioSession error message. I copied AudioController.h and AudioController.mm from SpeakerBox from Apple to my project.

And I added this code:

  AudioController *audioController; - (void)configureAudioSession { if (!audioController) { audioController = [[AudioController alloc] init]; } } - (void)handleIncomingCallFrom:(NSString *)dest { CXCallUpdate *callUpdate = [[CXCallUpdate alloc] init]; [callUpdate setLocalizedCallerName:dest]; [callUpdate setHasVideo:NO]; CXHandle *calleeHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:dest]; [callUpdate setRemoteHandle:calleeHandle]; [provider reportNewIncomingCallWithUUID:[NSUUID UUID] update:callUpdate completion:^(NSError *error){ [self configureAudioSession]; }]; } 

The phone rings, I can handle the call, but it fails when I answer. I get this error:

  AVAudioSession error activating: Error Domain=NSOSStatusErrorDomain Code=561017449 "(null)" 2017-03-09 18:17:48.830893 MyVoIPProject[1620:971182] [aurioc] 892: failed: '!pri' (enable 3, outf< 1 ch, 16000 Hz, Int16> inf< 1 ch, 16000 Hz, Int16>) 2017-03-09 18:17:48.841301 MyVoIPProject[1620:971182] [aurioc] 892: failed: '!pri' (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) 2017-03-09 18:17:48.850282 MyVoIPProject[1620:971182] [aurioc] 892: failed: '!pri' (enable 3, outf< 1 ch, 48000 Hz, Int16> inf< 1 ch, 48000 Hz, Int16>) . . . . 

Can you tell me how I can integrate Callkit?

+5
source share
1 answer

This error causes you to forget to add the Mircophone description to Info.plist.

Link: Apple iOS SpeakerBox - AudioUnitInitialize returns error code 561017449

-1
source

Source: https://habr.com/ru/post/1265291/


All Articles