Skip to content

Fix audio corruption in conference and audio playback on airoha

Grzegorz Sluja requested to merge fix_asterisk_hang_and_audio_corruption into devel

The commit contains 2 fixes:

  1. All changes about sequence number are connected with fixing audio corruption after call conference start and playback audio file. The problem is as following: We create RTP header in chan_voicemngr.c for each RTP packet, but sequence number we get from pjsip, otherwise no lost packets could be found - the fix for it created some time ago: https://dev.iopsys.eu/iopsys/asterisk-chan-voicemngr/-/commit/f97db2563743f3a41ab2b4653aaca8933f2bf9b9 The problem is though that after conference is started and when the audio file is played (howler) sequence number is 0 because frame->seqno. For broadcom DSP it does not cause any problems, but for airoha (mediatek DSP) sending RTP packets with the same "0" sequence number cause the audio heard is corrupted. The fix (to not break lost packets calculation on broadcom) is to use frame->seqno if its not 0, otherwise we use local sequence_number.

  2. Rarely asterisk hanged in my tests when I started conference. It was caused by deadlock (ast_channel_internal_bridge() was called without locking channel) and also conf_timer_removed was set in not proper way causing wrong behavior of code then.

Merge request reports