Author Message
RogerLi
Joined: Mar 25, 2017
Messages: 10
Offline
Hi Experts,

In most of the scenarios, the demo app can play incoming call tone when receives a incoming call. But for the below 2 kind of scenarios, the app do not play the tone. Please give me some advice how to fix the tone playing issue.

1st scenario, when the app completes registration to the Aura. It cannot play the incoming call tone for the first incoming call.
I caught the output from console:
2017-04-09 15:00:51.100 CommunicationSampleApp[4206:1882080] -[SDKManager callService:didReceiveIncomingCall:] (null) call(Call 1 (Alerting): 810228, 810228 <sip:810228@106.75.23.75:5080>)
2017-04-09 15:00:51.100 CommunicationSampleApp[4206:1882080] SCPAPI: -[CSAudioFilePlayerImpl startPlaying]
2017-04-09 15:00:51.100 CommunicationSampleApp[4206:1882080] CWebRTCAudioEngine[0x0x125808f30]::StartPlayingTone : tone:1 sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 15:00:51.101 CommunicationSampleApp[4206:1882080] CWebRTCAudioEngine[0x0x125808f30]::StartPlayingFileOnEventLoop : file:'ringinside.wav' sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 15:00:51.101 CommunicationSampleApp[4206:1882132] CWebRTCAudioEngine[0x0x125808f30]::StartPlayingFileOnEventLoop : file:'ringinside.wav' sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 15:00:51.420 CommunicationSampleApp[4206:1882132] CWebRTCAudioEngine[0x0x125808f30]::CreateFilePlayCall : m_nPlaybackChannelId: 0
2017-04-09 15:00:51.421 CommunicationSampleApp[4206:1882131] : WARNING ; (15: 0:51:421 | 1) TRANSPORT: 1 0; 25367; _localIP was not specified. RTP socket will be bound to all interfaces. IP = 0.0.0.0
2017-04-09 15:00:51.422 CommunicationSampleApp[4206:1882131] : WARNING ; (15: 0:51:422 | 1) TRANSPORT: 1 0; 25367; _localIP was not specified. RTCP socket will be bound to all interfaces. IP = 0.0.0.0
2017-04-09 15:00:51.440 CommunicationSampleApp[4206:1882132] 15:00:51.439 ERROR: [Avaya Media Services Event Loop] 1233: AUIOClient_StartIO failed (-66637)
2017-04-09 15:00:51.440 CommunicationSampleApp[4206:1882131] : ERROR ; (15: 0:51:440 | 17) AUDIO DEVICE: 1 99; 25367; StartPlayout: Failed to start playout. Error code: -66637. Line: 1549
2017-04-09 15:00:51.440 CommunicationSampleApp[4206:1882132] CWebRTCAudioEngine[0x0x125808f30]::DestroyFilePlayCall : m_nPlaybackChannelId: 0
2017-04-09 15:00:51.440 CommunicationSampleApp[4206:1882131] : ERROR ; (15: 0:51:440 | 0) VOICE: 1 99; 25367; StartPlayout() failed to start playout
2017-04-09 15:00:51.441 CommunicationSampleApp[4206:1882131] : ERROR ; (15: 0:51:440 | 0) VOICE: 1 99; 25367; StartPlayout() failed to start playout, error = 10028



2nd scenario, when I put the app to background for 15 min or longer, it cannot play the incoming call tone for the next incoming call. I have already implemented background code to wake up the app every 10 min for re-registration.

Here is my codes:
- (void)applicationDidEnterBackground:(UIApplication *)application {
NSLog(@"KeepAlive?????%f?",UIMinimumKeepAliveTimeout);
[application setKeepAliveTimeout:UIMinimumKeepAliveTimeout handler:^{
[self.client prepareForBackgroundInterval:UIMinimumKeepAliveTimeout];
}];
}

I caught the xocde console output for this scenario and found it indicates "Failed to initialize Audio Unit". Console output:
2017-04-09 18:36:32.099 CommunicationSampleApp[4319:1931665] -[SDKManager callService:didReceiveIncomingCall:] (null) call(Call 1 (Alerting): 810228, 810228 <sip:810228@106.75.23.75:5080>)
2017-04-09 18:36:32.101 CommunicationSampleApp[4319:1931665] SCPAPI: -[CSAudioFilePlayerImpl startPlaying]
2017-04-09 18:36:32.102 CommunicationSampleApp[4319:1931665] CWebRTCAudioEngine[0x0x1265e1c10]::StartPlayingTone : tone:1 sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 18:36:32.102 CommunicationSampleApp[4319:1931665] CWebRTCAudioEngine[0x0x1265e1c10]::StartPlayingFileOnEventLoop : file:'ringinside.wav' sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 18:36:32.102 CommunicationSampleApp[4319:1931930] CWebRTCAudioEngine[0x0x1265e1c10]::StartPlayingFileOnEventLoop : file:'ringinside.wav' sessionId:-1 loop:1 durationMs:0 gain:255 speaker: 1 callback:1
2017-04-09 18:36:32.329 CommunicationSampleApp[4319:1931930] 18:36:32.328 ERROR: [Avaya Media Services Event Loop] >aurioc> 807: failed: '!int' (enable 1, outf< 1 ch, 0 Hz, Float32> inf< 1 ch, 16000 Hz, Int16>)
2017-04-09 18:36:32.329 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:329 | 226) AUDIO DEVICE: 1 99; 27667; InitializeAudioUnit: Failed to initialize Audio Unit. Line: 512
2017-04-09 18:36:32.330 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:329 | 0) AUDIO DEVICE: 1 99; 27667; int webrtc::AudioDeviceIOS::InitializeRecordingAudioUnit(): Failed to create recoriding audio unit instance. Line: 464
2017-04-09 18:36:32.330 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:329 | 0) VOICE: 1 99; 27667; StartRecording() failed to start recording. Will deregister monitor module
2017-04-09 18:36:32.330 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:330 | 1) VOICE: 1 99; 27667; failed to start recording
2017-04-09 18:36:32.330 CommunicationSampleApp[4319:1931930] CWebRTCAudioEngine[0x0x1265e1c10]::CreateFilePlayCall : m_nPlaybackChannelId: 0
2017-04-09 18:36:32.334 CommunicationSampleApp[4319:1931929] : WARNING ; (18:36:32:333 | 1) TRANSPORT: 1 0; 27667; _localIP was not specified. RTP socket will be bound to all interfaces. IP = 0.0.0.0
2017-04-09 18:36:32.334 CommunicationSampleApp[4319:1931929] : WARNING ; (18:36:32:334 | 1) TRANSPORT: 1 0; 27667; _localIP was not specified. RTCP socket will be bound to all interfaces. IP = 0.0.0.0
2017-04-09 18:36:32.349 CommunicationSampleApp[4319:1931930] 18:36:32.349 ERROR: [Avaya Media Services Event Loop] >aurioc> 807: failed: '!pla' (enable 2, outf< 2 ch, 16000 Hz, Int16, inter> inf< 1 ch, 0 Hz, Float32>)
2017-04-09 18:36:32.349 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:349 | 14) AUDIO DEVICE: 1 99; 27667; InitializeAudioUnit: Failed to initialize Audio Unit. Line: 512
2017-04-09 18:36:32.349 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:349 | 0) AUDIO DEVICE: 1 99; 27667; int webrtc::AudioDeviceIOS::InitializePlayoutAudioUnit(): Failed to create playout audio unit instance. Line: 442
2017-04-09 18:36:32.350 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:350 | 1) VOICE: 1 99; 27667; StartPlayout() failed to start playout
2017-04-09 18:36:32.350 CommunicationSampleApp[4319:1931929] : ERROR ; (18:36:32:350 | 0) VOICE: 1 99; 27667; StartPlayout() failed to start playout, error = 10028
Pavel_K
Joined: Dec 20, 2016
Messages: 67
Offline
Sorry for our delayed response to your issue. Our technical team is investigating and will get back to you shortly.
Pavel_K
Joined: Dec 20, 2016
Messages: 67
Offline
Hi RogerLi,

What kind of device do you use? If you use iOS simulator, then the issue can be due to it. We have never observe this behavior with real device.
Go to:   
Mobile view