Bad audio in initally on session

SK
Serdar KOYLU
Tue, Apr 7, 2020 1:42 PM

I use PJSIP with ARM based embedded boards. My latest project, have an "Olimex A20 SOM board". Abstractly, Allwinner A20 CPU (2x Core @1GHz), 1GB RAM, internal audio codec etc. Extra hardware as "10Mbit (Ten Megabit) USB Ethernet" with PoE ps system. I build PJSIP 2.9 (Latest version for compile time) with:
$ ./aconfigure --prefix=/usr

After make etc.. System uses Armbian 5.92.2 and stock libraries, no PulseAudio, but ALSA generally worked (Alsamixer don't have capture source). Our application uses pjsua calls for SIP/VoIP functionality. 
System uses direct remote calls to known adresses, but many functions completed trough an asterisk pbx server. 
Generally, i can't have biggest problems. But, on initial state, after SIP handshake, tx sound (captured and sended to remote) very low, have distortion like crushed talk. For 3-4 seconds voice too poor. We say "test, one, two, three...", this words very bad, but following words succesfully transmitted: no distortion, with normal volume level. 
Log records not help me. I forced VAD enable/disable, used Speex codec (usually system prefer PCMU/8000), change clocks, buffer sizes, but not any change occurred. 
I test capture/play subsystem with "arecord test" and "aplay test", no problems occurred. I use same capture and play settings both apps: alsa and pjsip. 
If you think a suggestion for this problem, please help me. 
Thanks

I use PJSIP with ARM based embedded boards. My latest project, have an "Olimex A20 SOM board". Abstractly, Allwinner A20 CPU (2x Core @1GHz), 1GB RAM, internal audio codec etc. Extra hardware as "10Mbit (Ten Megabit) USB Ethernet" with PoE ps system. I build PJSIP 2.9 (Latest version for compile time) with: $ ./aconfigure --prefix=/usr After make etc.. System uses Armbian 5.92.2 and stock libraries, no PulseAudio, but ALSA generally worked (Alsamixer don't have capture source). Our application uses pjsua calls for SIP/VoIP functionality.  System uses direct remote calls to known adresses, but many functions completed trough an asterisk pbx server.  Generally, i can't have biggest problems. But, on initial state, after SIP handshake, tx sound (captured and sended to remote) very low, have distortion like crushed talk. For 3-4 seconds voice too poor. We say "test, one, two, three...", this words very bad, but following words succesfully transmitted: no distortion, with normal volume level.  Log records not help me. I forced VAD enable/disable, used Speex codec (usually system prefer PCMU/8000), change clocks, buffer sizes, but not any change occurred.  I test capture/play subsystem with "arecord test" and "aplay test", no problems occurred. I use same capture and play settings both apps: alsa and pjsip.  If you think a suggestion for this problem, please help me.  Thanks