Open figaro2015 opened 1 year ago
can we have the full debug log of the call ?
Please see the full debug log with the SIP trace turned on attached. Thanks!
I see the leg is in conference, does it happen without conference too (eg: answer, record_session and playback something) ? does it happen with jitter buffer enabled ? Is it the same if the reinvite is sent from Linphone ?
Yes to all questions. The quintessential scenario which causes the problem to be exposed is OPUS codec audio being added to the existing video-only calls. When both media components (video and audio) are present at the initial call establishment - everything works fine. Also, everything seems to be working fine with any other audio codec (PCMU, PCMA, G722).
Describe the bug Audio with the OPUS codec is broken when added to a video-only call.
To Reproduce Steps to reproduce the behavior:
Expected behavior Clear audio should be heard from the VoIP softphone client.
Package version or git hash FreeSWITCH Version 1.10.9-dev+git~20221107T233635Z~bb682fc5b4~64bit (git bb682fc 2022-11-07 23:36:35Z 64bit)
Trace logs Here is the console output which gets produced by the OPUS codec when opus_debug is turned on:
2022-11-17 10:17:35.955789 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [93] FEC[no] channels[1] 2022-11-17 10:17:35.955789 99.93% [DEBUG] mod_opus.c:507 decode: opus_frames [2] samples [480] audio bandwidth [NARROWBAND] bytes [49] FEC[no] channels[1] 2022-11-17 10:17:35.975790 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [98] FEC[no] channels[1] 2022-11-17 10:17:35.975790 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:35.995789 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:35.995789 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [96] FEC[no] channels[1] 2022-11-17 10:17:35.995789 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.015799 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.015799 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [106] FEC[no] channels[1] 2022-11-17 10:17:36.015799 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.015799 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.035805 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [104] FEC[no] channels[1] 2022-11-17 10:17:36.035805 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.055799 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.055799 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [101] FEC[no] channels[1] 2022-11-17 10:17:36.055799 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.055799 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.075799 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [100] FEC[no] channels[1] 2022-11-17 10:17:36.075799 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.095789 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.095789 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [97] FEC[no] channels[1] 2022-11-17 10:17:36.095789 99.93% [ERR] mod_opus.c:497 decode: OPUS_INVALID_PACKET ! frames: -4 2022-11-17 10:17:36.115788 99.93% [ERR] mod_opus.c:921 Decoder Error: corrupted stream fs:4080 plc:false! 2022-11-17 10:17:36.115788 99.93% [DEBUG] mod_opus.c:507 encode: opus_frames [1] samples [960] audio bandwidth [FULLBAND] bytes [96] FEC[no] channels[1]
Analysis Audio with OPUS codec works perfectly fine when both audio and video media components are present when the initial call is established. Something gets configured wrong only when the audio component is getting added only after the video-only call is established. Important to note that video in all scenarios is perfectly fine. By adding some debugging I can confirm that OPUS codec in all cases is getting configured identically. Based on that, looks like it is reasonable to suspect some issue with either buffers allocation or timing of the audio packets.