datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
273 stars 229 forks source link

Frames discarded and the voice is cut at the beginning #165

Open harelhanum opened 5 years ago

harelhanum commented 5 years ago

Hello guys, Everything works perfectly on IOS. But most of the android devices have the following problem.

When I make a phone call and the other side answers the voice is cut off at the beginning of the call, sometimes the first 1-4 seconds and sometimes it reaches 10+ seconds. Rarely it works fine, and I noticed it depends on Jitter Buffer . I saw this line in the logs : Jitter buffer starts returning normal frames (after 102 empty/lost)

When the number is below 30 there is no cut at all. You can hear the first "Hello" of the other side, but when the number is somthing like 80 or 100 the other side can say "Hello" one or two times but you wont hear that . this is not a delay, the voice is cut.

I'd be happy to get help with this. How to prevent the audio cut? thank you all!

Logs after received response:

2019-02-09 20:10:22.318 24214-24338/? D/PjSipLogWriter: 20:10:22.318 tsx0xb20e9864 .State changed from Terminated to Destroyed, event=TIMER 2019-02-09 20:10:22.318 24214-24338/? D/PjSipLogWriter: 20:10:22.318 tsx0xb20e9864 Transaction destroyed! 2019-02-09 20:10:22.377 24214-31570/? D/PjSipLogWriter: 20:10:22.377 strm0xbcf83014 !Jitter buffer is bufferring (prefetch=0), plc invoked 2019-02-09 20:10:22.378 24214-31570/? D/PjSipLogWriter: 20:10:22.378 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:22.980 24214-31570/? D/PjSipLogWriter: 20:10:22.979 strm0xbcf83014 VAD re-enabled 2019-02-09 20:10:23.453 24214-31570/? D/PjSipLogWriter: 20:10:23.452 strm0xbcf83014 Starting silence 2019-02-09 20:10:23.878 24214-31570/? D/PjSipLogWriter: 20:10:23.877 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:23.880 24214-31570/? D/PjSipLogWriter: 20:10:23.879 strm0xbcf83014 Starting silence 2019-02-09 20:10:24.298 24214-31570/? D/PjSipLogWriter: 20:10:24.297 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:24.300 24214-31570/? D/PjSipLogWriter: 20:10:24.299 strm0xbcf83014 Starting silence 2019-02-09 20:10:24.384 24214-24337/? D/PjSipLogWriter: 20:10:24.384 strm0xbcf83014 !RTP status: badpt=0, badssrc=0, dup=0, outorder=0, probation=-1, restart=0 2019-02-09 20:10:24.412 24214-31570/? D/PjSipLogWriter: 20:10:24.412 strm0xbcf83014 !Jitter buffer starts returning normal frames (after 102 empty/lost) 2019-02-09 20:10:24.414 24214-31570/? D/PjSipLogWriter: 20:10:24.414 strm0xbcf83014 Jitter buffer empty (prefetch=0), plc invoked 2019-02-09 20:10:24.464 24214-31570/? D/PjSipLogWriter: 20:10:24.464 strm0xbcf83014 Jitter buffer starts returning normal frames (after 1 empty/lost) 2019-02-09 20:10:24.711 24214-31570/? D/PjSipLogWriter: 20:10:24.710 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:24.713 24214-31570/? D/PjSipLogWriter: 20:10:24.712 strm0xbcf83014 Starting silence 2019-02-09 20:10:25.065 24214-31570/? D/PjSipLogWriter: 20:10:25.065 strm0xbcf83014 Jitter buffer empty (prefetch=0), plc invoked 2019-02-09 20:10:25.125 24214-31570/? D/PjSipLogWriter: 20:10:25.124 strm0xbcf83014 Jitter buffer starts returning normal frames (after 1 empty/lost) 2019-02-09 20:10:25.126 24214-31570/? D/PjSipLogWriter: 20:10:25.125 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:25.130 24214-31570/? D/PjSipLogWriter: 20:10:25.129 strm0xbcf83014 Starting silence 2019-02-09 20:10:25.198 24214-31570/? D/PjSipLogWriter: 20:10:25.198 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:25.200 24214-31570/? D/PjSipLogWriter: 20:10:25.199 strm0xbcf83014 Starting silence 2019-02-09 20:10:25.202 24214-31570/? D/PjSipLogWriter: 20:10:25.201 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:25.328 24214-31570/? D/PjSipLogWriter: 20:10:25.328 strm0xbcf83014 Starting silence 2019-02-09 20:10:25.729 24214-31570/? D/PjSipLogWriter: 20:10:25.728 strm0xbcf83014 Start talksprut.. 2019-02-09 20:10:25.730 24214-31570/? D/PjSipLogWriter: 20:10:25.730 strm0xbcf83014 Starting silence 2019-02-09 20:10:25.969 24214-31570/? D/PjSipLogWriter: 20:10:25.968 strm0xbcf83014 Jitter buffer empty (prefetch=0), plc invoked 2019-02-09 20:10:25.996 24214-24334/? D/PjSipService: Handle "call_hangup" action ({"callback_id":48,"call_id":1}) 2019-02-09 20:10:25.996 24214-24334/? D/PjSipLogWriter: 20:10:25.996 pjsua_call.c !Call 1 hanging up: code=0.. 2019-02-09 20:10:25.997 24214-24334/? D/PjSipLogWriter: 20:10:25.996 endpoint ..Request msg BYE/cseq=3926 (tdta0xb8f30000) created. 2019-02-09 20:10:25.997 24214-24334/? D/PjSipLogWriter: 20:10:25.997 inv0xad04f064 ..Sending Request msg BYE/cseq=3926 (tdta0xb8f30000) 2019-02-09 20:10:25.997 24214-24334/? D/PjSipLogWriter: 20:10:25.997 dlg0xad04f064 ...Sending Request msg BYE/cseq=3926 (tdta0xb8f30000) 2019-02-09 20:10:25.997 24214-24334/? D/PjSipLogWriter: 20:10:25.997 tsx0xacfcf864 ....Transaction created for Request msg BYE/cseq=3925 (tdta0xb8f30000) 2019-02-09 20:10:25.997 24214-24334/? D/PjSipLogWriter: 20:10:25.997 tsx0xacfcf864 ...Sending Request msg BYE/cseq=3925 (tdta0xb8f30000) in state Null

--end msg--
rodrigowbazevedo commented 5 years ago

Having the same issue, especially with Samsung devices.