Someone could tell me why this happen?
iOS10, iPhone5s, VOIP Siphon pjsip2.5.5.
These issue was not appear every time,it came sometimes when you want to make call or answer call (add at:20161226).
Error opening sound device:
14:06:03.137742 pjsua_aud.c  ....Set sound device: capture=-1, playback=-2
14:06:03.137775 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@16000/1/20ms
14:06:03.137837 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.147404 acquire_call enter,call_id:2
14:06:03.233365 level:4,msg:14:06:03.233    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@44100/1/20ms
14:06:03.233488 level:4,msg:14:06:03.233 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.263379 AVAudioSessionRouteChangeNotification ..changeReason..3
14:06:03.439201    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@48000/1/20ms
14:06:03.444813 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.518592    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@32000/1/20ms
14:06:03.518731 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.587808    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@16000/1/20ms
14:06:03.587936 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.659660    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@8000/1/20ms
14:06:03.659837 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.734433    pjsua_aud.c  .....Unable to open sound device: Unknown OpenSSL error 503317117 [status=506637]
14:06:03.734512    pjsua_aud.c  ....Error opening sound device: Unknown OpenSSL error 503317117 [status=506637]
14:06:03.734534    pjsua_aud.c  ...Conf connect: 0 --> 2
14:06:03.734555    pjsua_aud.c  ....Set sound device: capture=-1, playback=-2
14:06:03.734586    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@16000/1/20ms
14:06:03.734651 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.799718    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@44100/1/20ms
14:06:03.799847 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.868825    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@48000/1/20ms
14:06:03.869031 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:03.936294    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@32000/1/20ms
14:06:03.936423 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:04.006834    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@16000/1/20ms
14:06:04.006962 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:04.075150    pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@8000/1/20ms
14:06:04.075288 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
14:06:04.144082    pjsua_aud.c  .....Unable to open sound device: Unknown OpenSSL error 503317117 [status=506637]
14:06:04.144165    pjsua_aud.c  ....Error opening sound device: Unknown OpenSSL error 503317117 [status=506637]
14:06:04.144186 pjsua_conf_connect:pjsua_conf_connect_value 506637 ret 506637
today(2016-12-16),I get the same bug,but the error number is different(iphone5 ios10.1.1 siphone pjsip2.5.5)
316-981188544 2016-12-16 10:52:29.160553 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@44100/1/20ms
316-981188544 2016-12-16 10:52:29.160689 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
316-981188544 2016-12-16 10:52:29.167254 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@48000/1/20ms
316-981188544 2016-12-16 10:52:29.167391 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
316-981188544 2016-12-16 10:52:29.172857 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@32000/1/20ms
316-981188544 2016-12-16 10:52:29.172994 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
316-981188544 2016-12-16 10:52:29.178400 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@16000/1/20ms
316-981188544 2016-12-16 10:52:29.178539 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
316-981188544 2016-12-16 10:52:29.184486 pjsua_aud.c  .....Opening sound device (speaker + mic) PCM@8000/1/20ms
316-981188544 2016-12-16 10:52:29.184631 coreaudio_dev.  ......Using VoiceProcessingIO audio unit
316-981188544 2016-12-16 10:52:29.195032 pjsua_aud.c  .....Unable to open sound device: Unknown error -1701297535 [status=-1701297535]
316-981188544 2016-12-16 10:52:29.195105 pjsua_aud.c  ....Error opening sound device: Unknown error -1701297535 [status=-1701297535]
				
                        
At last,I fix this bug with IOS's CallKit,take a look at this website: https://trac.pjsip.org/repos/ticket/1941
Details: CallKit framework allows apps to use the native phone UI to receive incoming calls and make outgoing calls. In order to achieve this, CallKit requires the call audio to start only when audio session has been activated, thus it's recommended that when using PJSIP, you open the sound device only when necessary. It can be done by:
Starting PJSIP with no sound device (by calling pjsua_set_no_snd_dev() after startup). Close the sound device when unused, also with the same API (pjsua_set_no_snd_dev()). Upon audio session activation, open the sound device with the API pjsua_set_snd_dev(). Below is an example on how to integrate CallKit with PJSIP, with the delegate functions taken from ​Speakerbox sample app provided by Apple.
To make outgoing call:
To handle incoming call:
To start sound device: