traud / asterisk-amr

Asterisk 13 transcoding module: AMR-WB
The Unlicense
33 stars 19 forks source link

Noise in AMR-WB Conference #19

Closed hamidrhashmi closed 2 years ago

hamidrhashmi commented 4 years ago

I have been using Asterisk 16.8 for Call Conference. (ConfBridge). I am facing a noise at the start of the conference until any participant starts speaking. As any participant starts speaking clacking sound disappears.

traud commented 4 years ago

Puh. Need a bit more details as I have never ever used ConfBridge before. Can you give me a small How-To (configure and then use it)? Furthermore, right now, Asterisk 16 LTS is at version 16.13, with version 16.14 as release candidate already. Did you cross-checked that version or why are you at 16.8; is that a package variant of a distribution or is that the ‘certified’ variant?

hamidrhashmi commented 4 years ago

We have a bit different call flow due to 3GPP VoLTE Conference (TS 24.147). So we patched the chan_sip.c file according to the required flow. That's why we are still using Asterisk 16.8.

You can use the following basic dialplan to test App_ConfBridge

exten => 777,1,Answer()
exten => 777,n,ConfBridge(1234)

and you need 3 SIP phones which only supports AWR-WB/16000. Make a call to 777. The dialplan will add callers to the Conference room and there you can observe a clicking sound at start of the Conference until someone starts speaking.

Please find the attached video file which shows the clicking sound at the start of the conference. VoLTE-Conference.zip

traud commented 3 years ago

OK, I guess you are using ‘Certified Asterisk 16 LTS’, then.

  1. Are your changes/patches available somewhere, so I can look into those?

Today, I tried to investigate, at least to reproduce your issue – and I failed. I do not think, I am of any big help, even not able to ask the right questions. Furthermore, I am totally new to app_confbridge. For example, my personal Asterisk installation did not even had the module app_confbridge installed. Therefore, I recommend to find someone, for example via a bug bounty, who is able to analyze that together with you. Some questions, not sure if they make sense at all:

  1. Why do I need three user agents, why are two not enough? I guess this is because of 3GPP involved here, because with two you are not in app_confbridge but app_dial.
  2. Does this happen just with AMR-WB or with AMR as well?
  3. Does this happen with other high definition (HD) audio codecs as well? I guess your user agents do not offer G.722, therefore this question cannot be answered.
  4. Does this not happen with G.711 μ-law?

Another approach: On your Asterisk machine, are you able to run Wireshark and see the RTP frames:

  1. Do the frames differ in mode (0-8) or octet-alignment (OA) versus bandwidth-efficient (BE)?
  2. Do you see silence indicator description (SID) frames? The video sounds like an issue with Comfort Noise (CN). In that case:
  3. Are you using the AMR library from the open-source OpenCORE framework on your Asterisk? In that case:
  4. Are you using its latest version? Previous versions of that library did not handle SID frames correctly (see the other issue here in my GitHub).

Another approach: On your Asterisk machine, place debug statements into the module codecs/codec_amr:

  1. Does Asterisk ‘transcode’ the AMR(-WB) frames or are the frames simply ‘passed-through’ Asterisk?
traud commented 2 years ago

I have to reproduce a software bug. For this, more information was required. I do not need an answer to all questions. Actually, just one answered question would be enough so I can proceed and/or try again. I am closing this issue because a similar sounding issue was discussed within FreeSWITCH, which seemed to be related to the already fixed SID_UPDATE issue and the negative log_en after SID issue. The solution there: Update to the latest AMR libraries or apply those three patches to your AMR library.

If that does not fix your issue, please, you (or anyone else) reply to this issue, so it gets re-opened.