baresip / baresip-ios

Baresip for iOS
46 stars 33 forks source link

No audio recording #31

Closed Koshub closed 3 years ago

Koshub commented 3 years ago

Thank you for your work on baresip! Is it possible to understand how it should work? It seems the audio module doesn't record the audio. How to check is it active at all? Use baresip version 1.0 with EXTRA_MODULES='g711 srtp audiounit avcapture opus'

aucodec: PCMA/8000/1
...
avcapture: found video device 'Back Camera'
avcapture: found video device 'Front Camera'
medianat: stun
medianat: turn
medianat: ice
....
Populated 2 audio codecs
Populated 0 audio filters
Populated 0 video codecs
Populated 0 video filters
...
ua: using best effort AF: af=AF_INET
call: alloc with params laddr=<redacted>, af=AF_INET, use_rtp=1
call: use_video=0
call: connecting to <redacted>..
audio: start
...
call: SIP Progress: 100 Trying (/)
call: SIP Progress: 100 Giving it a try (/)
call: SIP Progress: 180 Ringing (/)
CALL_RINGING
....
call: got SDP answer (244 bytes)
call: update media
CALL_REMOTE_SDP
stream: update 'audio'
stream: audio: starting RTCP with remote <redacted>
audio: Set audio decoder: PCMA 8000Hz 1ch
audio: start
audio: Set audio encoder: PCMA 8000Hz 1ch
audio: start
audio tx pipeline:       (src) ---> PCMA
audio rx pipeline:      (play) <--- PCMA
call: stream start (active=1)
audio: start
audio: start
<redacted>: Call established: <redacted>
CALL_ESTABLISHED
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:00] audio=0/0 (bit/s)    
[0:00:01] audio=0/0 (bit/s)    
.....
[0:00:13] audio=0/0 (bit/s)    
[0:00:13] audio=0/0 (bit/s)    
[0:00:13] audio=0/0 (bit/s)    
[0:00:13] audio=0/0 (bit/s)    
[0:00:14] audio=0/0 (bit/s)    
[0:00:14] audio=0/0 (bit/s)    
[0:00:14] audio=0/0 (bit/s) 
.....
<redacted>: session closed: Connection reset by peer
CALL_CLOSED
sip:bonjour@local: Call with <redacted> terminated (duration: 14 secs)
audio: destroyed (started=1)
Koshub commented 3 years ago

Something is wrong with the audio and the connection is terminating due, for example, Audio stream timeout (message from Blink client logs).

What I make working is only the version that uses the CoreAudio framework. For example from this repo where the baresip version is 0.4.20. And that works only because it contains already compiled libs. For now, it is not possible to compile that stuff since iOS14 SKD is no longer supports a lot of the symbols from there.

Is there any support for iOS?

Koshub commented 3 years ago

Ok. The configuration process is not so clear. I think this should be applied by default on iOS target for config default template (not the CoreAudio one since it doesn't work in baresip for iOS):

audio_player        audiounit,default
audio_source        audiounit,default
audio_alert     audiounit,default
module          audiounit.so